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

To automate the "snapping" from one coordinate frame to another, consider writing either a new program which links against "librviz" or writing a Display plugin for rviz.

In either case, your code will have access to rviz::VisualizationManager and its function setFixedFrame(). If you leave the target frame set to "<fixed frame="">" then changes to the fixed frame will be reflected in the target frame automatically. If you don't want that, you can call setTargetFrame().

The whole-new-program approach is described in the librviz tutorial, and the display plugin approach is described in the imu display tutorial.

With the plugin version, your new Display class could listen to a topic which publishes the currently-desired map frame name, and just call setFixedFrame() with the result each time.

With the librviz version, you could really do anything you want, integrate an rviz 3d view window into an existing Qt application, listen for messages, whatever.

These comments are relevant to the Fuerte version of RViz.