Re: Providing the TF transforms for "/odom", "/base_laser_link" and "/camera_link"

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Providing-the-TF-transforms-for-odom-base-laser-link-and-camera-link-tp7634p7636.html

/odom to /base_link TF would be published by an odomety node (in rtabmap examples, it could be from rgbd_odometry, stereo_odometry, icp_odometry or robot's wheel encoders).

For base_link to sensor frames, in a final solution they would be published by a robot_state_publisher using an URDF in which those frames are set.

For prototyping without having to do an URDF, you can publish the static transforms with static_transform_publishers:

<launch>
<node pkg="tf" type="static_transform_publisher" name="base_to_scan"
        args="0 0 0.3 0 0 0 base_link base_link 100" /> 
<node pkg="tf" type="static_transform_publisher" name="base_to_camera"
        args="0 0 0.5 0 0 0 base_link camera_link 100" /> 
</launch>

In this example, the lidar would be 30 cm over base_link, can the camera 20 cm over the lidar. It is important that those transforms match the reality of where the sensors are actually placed on the robot. The 6 first values are "x y z yaw pitch roll".

The advantage of URDF is tht it could be re-used in gazebo and you can also see visuals in RVIZ (robot_description) instead of just frames.

cheers,
Mathieu