Skip to content

Hello Robot Stretch 3

GitHub code build GitHub last commit

DockerHub image Docker image arch Docker image version Docker image size

Please note that this workspace is only tested in simulation.

Last tested on commit a9e1166 by @j3soon.

🐳 Start Container

Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.

Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X or ssh -Y).

cd ~/ros2-essentials/stretch3_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.

If your user's UID is 1000, you may replace the docker compose build command with docker compose pull.

The commands in the following sections assume that you are inside the Docker container:

# in a new terminal
docker exec -it ros2-stretch3-ws bash

If the initial build somehow failed, run:

rm -r build install
colcon build --symlink-install

Once you have finished testing, you can stop and remove the container with:

docker compose down

If you encountered unexpected issues when using Isaac Sim, see Known Issues for more details.

Isaac Sim Keyboard Control

Run ~/isaacsim/isaac-sim.sh and open /home/ros2-essentials/stretch3_ws/isaacsim/assets/stretch3_og_wasd.usda in Isaac Sim, and then press Play and use WASD to control the robot.

ROS2 Keyboard Control

ros2 run teleop_twist_keyboard teleop_twist_keyboard

RTAB-Map SLAM Demo

Use tmux to open multiple terminals:

  1. Run ~/isaacsim/isaac-sim.sh and open /home/ros2-essentials/stretch3_ws/isaacsim/assets/stretch3_og_wasd.usda in Isaac Sim, and then press Play.

  2. Launch rtabmap SLAM:

    ros2 launch stretch3_navigation rtabmap.launch.py
    

  3. Launch rviz2:

    ros2 launch stretch3_navigation rviz.launch.py
    

In rviz2, use 2D Goal Pose to set a goal pose for the robot. Nav2 system will guide the robot to the goal pose.

RTAB-Map SLAM Demo

Cartographer SLAM Demo

Use tmux to open multiple terminals:

  1. Run ~/isaacsim/isaac-sim.sh and open /home/ros2-essentials/stretch3_ws/isaacsim/assets/stretch3_og_wasd.usda in Isaac Sim, and then press Play.

  2. Launch cartographer SLAM:

    ros2 launch stretch3_navigation cartographer.launch.py
    

  3. Launch rviz2:

    ros2 launch stretch3_navigation rviz.launch.py
    

In rviz2, use 2D Goal Pose to set a goal pose for the robot. Nav2 system will guide the robot to the goal pose.

Cartographer SLAM Demo

Known Issues

If the robot moves too fast, it will cause skidding and the robot will need sometime to correct itself.

Also, the robot turning very slowly, sometimes it stuck when turning around.

References