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

The same way you created your rviz::Display* grid_ (assuming this is what you did), you should create an additional display in your code for each corresponding display you would add if you were using RViz itself.

For instance, to add a LaserScan display, you should add to your header file:

rviz::Display* laser_;

Then, in your source file, you should do something like:

laser_ = manager_->createDisplay("rviz/LaserScan", "Laser scan", true);
// configure rviz/LaserScan
laser_->subProp("Topic")->setValue("fts/laserscan_front");
laser_->subProp("Style")->setValue("Boxes");

You can add the display in RViz and check which settings/properties you would be able to change there. Then just adapt the lines of code above to set the properties you want. The same idea works for any other display type you can add in RViz.