Visualization Tools

edufford edited this page Apr 8, 2018 · 5 revisions

This project includes some visualization tools for monitoring data while running the simulation using RQT and RViz. The related layout files are stored in the /ros/src/visualization/ folder.

RQT (multipurpose dashboard)

  • Setup: For plotting data in RQT, the rqt_multiplot_plugin is used instead of the base rqt_plot for better plotting features and performance. To install the multiplot plugin, run:

    sudo apt-get update
    sudo apt-get install ros-kinetic-rqt-multiplot
    rqt --force-discover
    

    If successful, the multiplot plugin should be available in the RQT menu Plugins > Visualization > Multiplot.

    After installing the multiplot plugin, a basic RQT layout can be imported by going to the RQT menu Perspectives > Import and select the rqt_basic.perspective file.

  • Operation: To use RQT to monitor data, after roslaunching the styx program and connecting to the simulator, start another shell in the /ros/ folder and run:

    source devel/setup.bash
    rqt
    

    Switch to the Basic perspective if not already loaded by default, and confirm communication by enabling one of the topics in the Topic Monitor. To start the plots, click the play all button at the top right of the multiplot pane.

RViz (3D scene view)

  • Setup: To visualize the car's position relative to the waypoints and traffic lights in an RViz 3D scene, a visualization node is used to publish a /visualization_marker_array topic to populate the objects and a /visualization_basewp_path topic to populate a path line.

    The visualization node publishes when the parameter vis_enabled == True, set by default in the styx.launch file. When using site.launch in the actual vehicle, the visualization node is not launched to reduce bandwidth.

    RViz is included in the ROS desktop install, so no additional setup is needed.

  • Operation: RViz can be run either as a stand-alone program or as a plug-in within RQT, but there is a bug in the RQT plug-in that causes a crash when rendering the base waypoint path so RViz should be run as stand-alone. To use it as a stand-alone program, after roslaunching the styx program and connecting to the simulator, start another shell in the /ros/ folder and run:

    source devel/setup.bash
    rviz
    

    A basic RViz layout can by loaded by going to the RViz menu File > Open Config and select the rviz_basic.rviz file. In the RViz layout, the view can be switched between saved view settings in the Views list on the right side. The mouse wheel and left/middle buttons can be used to move/zoom the camera.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.