You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.3 KiB

  1. ## Visualizing with RViz
  2. !!! note
  3. ROS 2 tutorials are still under active development.
  4. You can utilize RViz to visualize Stretch's sensor information. To begin, run the stretch driver launch file.
  5. ```{.bash .shell-prompt}
  6. ros2 launch stretch_core stretch_driver.launch.py
  7. ```
  8. Then run the following command to bring up a simple RViz configuration of the Stretch robot.
  9. ```{.bash .shell-prompt}
  10. ros2 run rviz2 rviz2 -d `ros2 pkg prefix --share stretch_calibration`/rviz/stretch_simple_test.rviz
  11. ```
  12. An RViz window should open, allowing you to see the various DisplayTypes in the display tree on the left side of the window.
  13. ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/simple_rviz.png)
  14. If you want to visualize Stretch's [tf transform tree](http://wiki.ros.org/rviz/DisplayTypes/TF), you need to add the display type to the RViz window. First, click on the *Add* button and include the *TF* type to the display. You will then see all of the transform frames of the Stretch robot and the visualization can be toggled off and on by clicking the checkbox next to the tree. Below is a gif for reference.
  15. ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/rviz_adding_tf.gif)
  16. There are further tutorials for RViz that can be found [here](http://wiki.ros.org/rviz/Tutorials).