Why doesn't RTABmap use my optical rotation?

asked 2019-03-26 07:55:22 -0600

EdwardNur gravatar image

When i run RTABmap, the poincloud is located on z axis of my base_footprint frame. My TF tree is quite simple: image description

I also apply optical transform from camera_link to duo3d_camera:

<launch>
    <arg name="pi/2" value="1.5707963267948966" />
    <node pkg="tf" type="static_transform_publisher" name="duo3d_base_link" args="0 0 0 -$(arg pi/2) 0 $(arg pi/2) camera_link duo3d_camera 100" />

But that does not change anything.

My point cloud:

edit retag flag offensive close merge delete

Comments

Make sure frame_id parameter of rtabmap node is set to base_footprint. Also make sure the frame_id set in image topics is duo3d_camera.

matlabbe gravatar image matlabbe  ( 2019-03-26 10:43:32 -0600 )edit

arg name="pi/2"

I don't think that's a legal name for a ROS resource. If it is, I would still not recommend embedding / in a resource name.

Refer to wiki/names for more info on legal names.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-26 12:06:57 -0600 )edit

@matlabbe The frame_id on my camera_info is duo3d_camera so my guess is that RTABmap will produce point cloud based on duo3d_camera. It means I need to transform from duo3d_camera to camera_link and make frame_id to be duo3d_camera instead of base_footprint. Am I correct?

EdwardNur gravatar image EdwardNur  ( 2019-03-26 13:29:00 -0600 )edit

@matlabbe Also, from my previous question: https://answers.ros.org/question/3195... Setting master_uri on host pc did make a trick but after a while, I again got that error, that RTABmap did not receive the topics. Is that really due to time sync problem? Did you ever encounter such problem?

EdwardNur gravatar image EdwardNur  ( 2019-03-26 13:31:01 -0600 )edit

Please post how rtabmap is launched (i.e., the launch file used), I am not sure if you set frame_id parameter correctly. The frame_id of the camera messages should be duo3d_camera. The frame_id parameter of rtabmap nodes should be base_footprint.

matlabbe gravatar image matlabbe  ( 2019-03-31 16:57:55 -0600 )edit