發表文章

目前顯示的是 8月 22, 2021的文章

Change docker image storage location to SSD on your NVIDIA Xavier

圖片
1. Install a SSD on the device and give it a mount name [1] 2. Copy docker to the SSD mount folder and add "data-root" parameter in the daemon script. [2] $ sudo service docker stop $ sudo rsync -aP /var/lib/docker/ /path/to/your/docker $ gedit /etc/docker/daemon.json $ sudo mv /var/lib/docker /var/lib/docker.old $ sudo service docker start 3. Pull PyTorch container and run [3] $ docker pull nvcr.io/nvidia/l4t-pytorch:r32.6.1-pth1.9-py3 $ sudo docker run -it --rm --runtime nvidia --network host -v /home/user/project:/location/in/container nvcr.io/nvidia/l4t-pytorch:r32.6.1-pth1.9-py3 Another useful commands:  $ sudo docker info $ sudo docker images $ sudo rmi REPOSITORY:TAG [4] $ cat /etc/nv_tegra_release $ systemctl start docker Reference: [1]  Install Solid State Disk - Jetson AGX Xavier   [2]  https://forums.developer.nvidia.com/t/change-docker-image-storage-location-to-nvme-ssd/156882 [3]  docker pull nvcr.io/nvidia/l4t-pytorch:r32.6.1-pth1.9-py3 [4]  https://docs.docker.

PX4 Flight Log Analysis

圖片
1.  Flight review 2.  pyulog 3. pyFLightAnalysis 4. FlightPLot Reference: [1]  https://logs.px4.io/ [2]  https://github.com/PX4/pyulog [3]  https://github.com/Marxlp/pyFlightAnalysis [4]  https://github.com/PX4/FlightPlot

Steps for recording data for VIO analysis

1. Ground truth: Optitrack system (1) Calibration (2) Set original point (3) Attach reflective ball on the drone and put it in the view of cameras (4) Create a rigid body of the drone Published position is in the topic:   /vrpn_client_node/<rigid body name>/pose 2. Image source: intel realsense r200 $ roscd realsense_camera/ $ cd launch $ roslaunch r200_nodelet_rgbd.launch Published images are in the topic: /camera/rgb/image_raw  /camera/depth/image_raw 3. IMU $ roscd drone_mocap/ $ cd launch $ roslaunch drone_mocap.launch Published IMU datas are in the topic: /mavros/imu/data_raw  /mavros/imu/data *Record:  rosbag record /vrpn_client_node/intelRTF/pose /camera/rgb/image_raw /camera/d epth/image_raw /mavros/imu/data_raw /mavros/imu/data Reference: [1] https://github.com/OsloMet1811/Digital-Twin/tree/master/drone_mocap [2]  https://github.com/intel-aero/meta-intel-aero/wiki/05-Autonomous-drone-programming-with-ROS

Run VIORB and save its result as a .tum output for evo analysis

1. Install VIORB [1] * Solution for the compiling error: " usleep was not declared in this scope " => Add #include <unistd.h> in all the files reported. * Solution for the compiling error: "usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:745:3: error: static assertion failed :" => refer to [2] * Solution for the compiling error about ROS_PACKAGE_PATH : see [3] * Solution for the OpenCV version incompatible issue: modify the written required version in the CMakeLists.txt. (path: ~/LearnVIORB, ~/LearnVIORB/Examples/ROS/ORB_VIO/) 2. Run EuRoC using EuRoC dataset * Modify the desired path in config/euroc.yaml. $ roslaunch testeuroc.launch (~/LearnVIORB/Examples/ROS/ORB_VIO/launch) * Solution for the reported problem " Framebuffer with requested attributes not available " while running:  Reference: [1] https://github.com/jingpang/LearnVIORB [2]  https://www.cnblogs.com/shishiteng/p/5799406.html [3] https://blog.c

Upload a project to github

1. Create a new repository 2. git clone "path of new repository" 3. cd "project name" 4. echo "# project name" >> README.md 5. git init 6. git add README.md 7. move all codes to the path under the project folder 8. git status (optional) 9. git add . 10. git commit -m "first commit" 11. git push / git push --set-upstream origin master *If you got the message: Could not resolve host: github.com key in: $ git config --global --unset http.proxy $ git config --global --unset https.proxy and then restart the linux system, the problem will be solved. Reference: [1]  GitHub 入門(二) — 使用終端機上傳檔案到GitHub [2]  https://markdown.tw/ [3]  GitHub不再支援密碼驗證解決方案,怎麼辦? [4]  使用 Git LFS 上傳大型檔案 [5]  Git Large File Storage - How to Work with Big Files

maplab(2) - multi-session reconstruction

0. Download VI maps from Sample-Datasets  and open maplab console 1. Load all maps load --map_folder <dataset_folder>/euroc_ml1  load --map_folder <dataset_folder>/euroc_ml2  load --map_folder <dataset_folder>/euroc_ml3 2. Select map select_map --map_key euroc_ml1  3. Re-triangulate the landmarks  rtl   4. Optimize the map to get a better initial map state for loop-closure  optvi   5. Run loop closure   lc  6. Run bundle adjustment  optvi  7. Save the optimized map   save --map_folder <dataset_folder>/euroc_ml1_opt 8. Repeat the same for map 2 and 3 Reference: [1]  https://github.com/ethz-asl/maplab/wiki/Preparing-a-multi-session-map [2]  https://github.com/ethz-asl/maplab/wiki/Dense-Reconstruction

Auto flight using a Qualcomm Snapdragon Flight platform (7) - Visual inertial odometry (VIO)

圖片
1. Sensor calibration (1) snav_calibration_manager (2) Navigator SDK (3) RC 2. Configure the VIO parameters and active it (1) Enable VIO in the snav_params.xml (/usr/lib/rfsa/adsp/snav_params.xml) <pos_hold_mode_params>    <param name="enable_vio" value="1"/>    <param name="enable_gps" value="0"/>    <param name="enable_dft" value="0"/> </pos_hold_mode_params> (2)  Configure Qualcomm Navigator to use VIO $ sudo /etc/snav/configure_vio.sh $ snav_dft_vio_app ( *mv_1.1.9 should be installed. ) (3) Check the VIO positioning result $ snav_inspector 3. Record  (1) Machine vision logs Setting the enable_srw_writer parameter in /etc/snav/app_params.snav_dft_vio_app.excelsior to 1 .  MV sequences are logged to /data/logs/snav/mv_sequence Copy data to the host (ex: adb pull /data/logs/snav/mv_sequence/snav_mv_seq_00018/snav_dft_vio_camera/ '/home/shomin/images_

Kalibr: a tool for calibrating camera and IMU

1. Installation (1)  Using the CDE package (2) Building from source 2. Camera calibration (1) Prepare a calibration target. (2) Prepare a image bag file & target.yaml file Command: ./kalibr_calibrate_cameras --target april_intel.yaml --bag rgb_mono.bag --model pinhole-equi --topics /camera/rgb/image_mono Output: camchain-%BAGNAME%.yaml results-cam-%BAGNAME%.txt report-cam-%BAGNAME%.pdf 3. Find IMU parameters (1) From product datasheet (ex: BMI160 ) (2) From the Allan standard deviation (AD) 4. Camera IMU calibration Command: ./kalibr_calibrate_imu_camera --target april_intel.yaml --cam camchain-homenamikidrone2kalibr-cdergb_mono.yaml --imu imu_intel.yaml --bag rgb_mono_imu.bag 5. Convert calibration results to the accessible files in the maplab (1) Building from source *source ~/kalibr_workspace/devel/setup.bash (2) rosrun kalibr kalibr_maplab_config --to-ncamera --label <your_label> --cam <your_cam_chain_yaml> Reference [1]  http