Posted by
Samim-17 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/implementing-rtabmap-drone-example-in-real-drone-tp10688p10819.html
roslaunch rtabmap_launch rtabmap.launch \
rtabmap_args:="--delete_db_on_start" \
left_image_topic:=/camera/infra1/image_rect_raw \
right_image_topic:=/camera/infra2/image_rect_raw \
left_camera_info_topic:=/camera/infra1/camera_info \
right_camera_info_topic:=/camera/infra2/camera_info \
stereo:=true
I used this to test if msckf_vio is working with Odom/Strategy set to 8. But as you see in the picture above the odom quality is 0 but in rtabmap gui the features are coming but are in opposite direction the ir images

when setting these same parameters in the slam.launch file for rtabmap_drone_example I get errors.
[ INFO] [1735471624.723013700]: Odom: quality=0, std dev=0.013451m|0.015811rad, update time=0.007419s, delay=0.051344s
[ INFO] [1735471624.762384399]: Odom: quality=0, std dev=0.013852m|0.015811rad, update time=0.015196s, delay=0.057370s
[ INFO] [1735471624.786541107]: Odom: quality=0, std dev=0.014729m|0.015811rad, update time=0.006580s, delay=0.048158s
What may be the issue?
Also take a look at this on real drone implemenation of MSCKF_VIO

[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.208419 acc=-0.043486 0.096491 9.811581 gyr=-0.007254 0.003139 -0.001783
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.218429 acc=-0.027667 0.084424 9.809449 gyr=-0.007284 0.001291 -0.001756
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.223419 acc=-0.027667 0.084424 9.809449 gyr=-0.007457 0.000939 -0.001546
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.238429 acc=-0.051082 0.075744 9.792781 gyr=-0.007713 0.000141 -0.001119
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.243429 acc=-0.051082 0.075744 9.792781 gyr=-0.006932 -0.000172 -0.000932
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:808::computeTransform() IMU update stamp=1735475088.268429 acc=-0.025140 0.075903 9.807644 gyr=-0.006304 -0.002918 -0.001023
[DEBUG] (2024-12-29 18:09:48.271) Odometry.cpp:342::process() Processing image data 640x480: rgbd models=0, stereo models=1
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:800::computeTransform()
[DEBUG] (2024-12-29 18:09:48.271) OdometryMSCKF.cpp:837::computeTransform() Image update stamp=1735475088.251797
[ INFO] (2024-12-29 18:09:48.276) OdometryMSCKF.cpp:989::computeTransform() Odom update time = 0.005081s p=xyz=0.000053,0.001984,-0.001811 rpy=0.008455,0.006167,-0.002073
[ INFO] [1735475088.277201802]: Odom: quality=0, std dev=0.013525m|0.015811rad, update time=0.005467s, delay=0.025365s
Here is a small part of launch file which I think will be necessary
<include file="$(find rtabmap_launch)/launch/rtabmap.launch">
<arg name="localization" value="$(arg localization)"/>
<arg name="stereo" value="true"/>
<arg name="args" value="$(arg pre_args) --Odom/Strategy 8 --Optimizer/GravitySigma 0.1 --Vis/FeatureType 10 --Kp/DetectorStrategy 10 --Grid/MapFrameProjection true --NormalsSegmentation false --Grid/MaxGroundHeight 1 --Grid/MaxObstacleHeight 1.6 --RGBD/StartAtOrigin true" />
<arg name="rtabmap_viz" value="$(arg rtabmap_viz)" />
<arg name="frame_id" value="base_link" />
<arg name="odom_guess_frame_id" value="base_link_stabilized" />
<arg name="left_image_topic" value="/camera/infra1/image_rect_raw" />
<arg name="right_image_topic" value="/camera/infra2/image_rect_raw" />
<arg name="left_camera_info_topic" value="/camera/infra1/camera_info" />
<arg name="right_camera_info_topic" value="/camera/infra2/camera_info" />
<arg name="imu_topic" value="/mavros/imu/data"/>
<arg name="wait_imu_to_init" value="true"/>
<arg name="approx_sync" value="true"/>
<arg if="$(arg ground_truth)" name="ground_truth_frame_id" value="world"/>
<arg if="$(arg ground_truth)" name="ground_truth_base_frame_id" value="base_link_gt"/>
</include>
"I would expect that IMU delay is always smaller than the the camera delay, so if IMU data received after image, there is something wrong about the driver. " I installed the latest librealsense driver if the driver you are talking about is the camera driver.