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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

yonim

Dear sir,

For the Kinect + 2D laser example, how do you provide (in a file using static transform publishers) the TF transforms for  "/odom", "/base_link", "/base_laser_link" and "/camera_link"?

Thank you
Reply | Threaded
Open this post in threaded view
|

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

matlabbe
Administrator
/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
Reply | Threaded
Open this post in threaded view
|

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

yonim
Thank you !!