ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

All you need to do is publish each laser scan message with a different "frame_id" set in the message, see the "header" of this message:

http://docs.ros.org/api/sensor_msgs/html/msg/LaserScan.html

Then you need to publish a static transform between the two frame_id's you chose, and you can use the static_transform_publisher for that, see:

http://wiki.ros.org/tf#static_transform_publisher

Then in rviz set the "fixed frame" to that of parent link. In this case the parent link is the "link1_parent" in the example in the previous link. tf is a tree structure so you always have parent child relationships between links. Another option would be to define a "world" link and then provide static transforms to each of the laser links, where the world link might be at the same position and orientation as one of the laser links. You can use the tf view in rviz to see how you've got it setup and remember to always set the fixed frame to the most parent link in your tf tree.

Hope that helps.