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.

41 lines
1.9 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. ## Visualizing with RViz
  2. You can utilize RViz to visualize Stretch's sensor information. To begin, in a terminal, run the stretch driver launch file.
  3. ```{.bash .shell-prompt}
  4. roslaunch stretch_core stretch_driver.launch
  5. ```
  6. Then, run the following command in a separate terminal to bring up a simple RViz configuration of the Stretch robot.
  7. ```{.bash .shell-prompt}
  8. rosrun rviz rviz -d `rospack find stretch_core`/rviz/stretch_simple_test.rviz
  9. ```
  10. An RViz window should open, allowing you to see the various DisplayTypes in the display tree on the left side of the window.
  11. <p align="center">
  12. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/simple_rviz.png"/>
  13. </p>
  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 the *Add* button and include the *TF* type in 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. <p align="center">
  16. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/rviz_adding_tf.gif"/>
  17. </p>
  18. There are further tutorials for RViz which can be found [here](http://wiki.ros.org/rviz/Tutorials).
  19. ## Running RViz and Gazebo (Simulation)
  20. Let's bring up Stretch in the willow garage world from the [gazebo basics tutorial](gazebo_basics.md) and RViz by using the following command.
  21. ```{.bash .shell-prompt}
  22. roslaunch stretch_gazebo gazebo.launch world:=worlds/willowgarage.world rviz:=true
  23. ```
  24. The `rviz` flag will open an RViz window to visualize a variety of ROS topics.
  25. <p align="center">
  26. <img src="https://raw.githubusercontent.com/hello-robot/stretch_tutorials/noetic/images/willowgarage_with_rviz.png"/>
  27. </p>
  28. Bring up the [keyboard teleop](teleoperating_stretch.md) node to drive Stretch and observe its sensor input.