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.

37 lines
1.4 KiB

  1. # Spawning Stretch in Simulation (Gazebo)
  2. !!! note
  3. ROS 2 tutorials are still under active development.
  4. !!! note
  5. Simulation support for Stretch in ROS 2 is under active development. Please reach out to us if you want to work with Stretch in a simulated environment like Gazebo/Ignition in ROS 2.
  6. Refer to the instructions below if you want to test this functionality in ROS 1.
  7. ### Empty World Simulation
  8. To spawn the Stretch in gazebo's default empty world run the following command in your terminal.
  9. ```{.bash .shell-prompt}
  10. roslaunch stretch_gazebo gazebo.launch
  11. ```
  12. This will bringup the robot in the gazebo simulation similar to the image shown below.
  13. <!-- <img src="images/stretch_gazebo_empty_world.png" width="500" align="center"> -->
  14. ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/stretch_gazebo_empty_world.png)
  15. ### Custom World Simulation
  16. In gazebo, you are able to spawn Stretch in various worlds. First, source the gazebo world files by running the following command in a terminal
  17. ```{.bash .shell-prompt}
  18. echo "source /usr/share/gazebo/setup.sh"
  19. ```
  20. Then using the world argument, you can spawn the stretch in the willowgarage world by running the following
  21. ```{.bash .shell-prompt}
  22. roslaunch stretch_gazebo gazebo.launch world:=worlds/willowgarage.world
  23. ```
  24. ![image](https://raw.githubusercontent.com/hello-robot/stretch_tutorials/ROS2/images/stretch_willowgarage_world.png)