problems with px4 realsense camera and rtab-map
Hello,
I'm testing our RTAB-MAP for use with PX4 SITL. I think that I have everything set up ok, but when I rotate the drone around, the costmap gets these slices in it, as you can see in RVIZ.
I'm using the librealsense_gazebo_plugin.so attached to the drone. I'm pretty sure it has to do with my camera intrinsics or maybe the incorrect placement on the drone.
I'm launching RTAB-MAP in a fairly standard way:
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
<arg name="rtabmap_args" value="--delete_db_on_start"/>
<!-- <arg name="rtabmap_args" value="-delete_db_on_start -Optimizer/GravitySigma 0.3" make it double dashes in args-->
<!--arg name="frame_id" value="sim_camera_left"/-->
<arg name="visual_odometry" value="false"/>
<!--arg name="rgbd_topic" value="/rgbd_image"/-->
<arg name="odom_topic" value="/mavros/local_position/odom"/>
<arg name="rgb_topic" value="/camera/camera/color/image_raw"/>
<arg name="depth_topic" value="/camera/camera/depth/image_raw"/>
<arg name="camera_info_topic" value="/camera/camera/color/camera_info"/>
<arg name="approx_sync" value="true"/>
<arg name="queue_size" value="10"/>
<arg name="rviz" value="true"/>
<arg name="rtabmapviz" value="true"/>
<!-- use actionlib to send goals to move_base -->
<param name="use_action_for_goal" type="bool" value="true"/>
<remap from="move_base" to="/move_base"/>
</include>
Does anyone have suggestions as to how to resolve this problem? Thank you in advance!
It could be that this shows the error between localization and odometry, shown in queue_size. As when it localizes it paints a new picture, but due to queue it keeps śhowing the "old" one as well. It seems from the picture it could be 10 overlays. You might also try rtab-maps odometry. Iam not sure about the quality of your odometry source, but I have had bad experience with consumer IMU based odometry specially in yaw.
Either
/mavros/local_position/odom
is drifting, or if your odom is perfect in the simulator, I would say camera/odom synchronization may not be that great. Useodom_frame_id
instead of the topic, and setapprox_sync
to false. You may also explicitly set theframe_id
to base frame of the drone.ok, I think I have found a clue. When looking at the depth cloud generated by the camera system, I am seeing this correct depth estimation, However the rtab grid map is very scewed. I cannot figure out why this is happening.
http://kiphaynes.com/LIL/skewedRTAB.JPG