From 5862fb0b3f511df6fce0c0027378f50d7981dc47 Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Wed, 15 Apr 2026 13:17:44 -0700 Subject: [PATCH 1/3] Add source suggestion to fix env variables missing --- ros2/stretch_simulation.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ros2/stretch_simulation.md b/ros2/stretch_simulation.md index df5d0f9..0d2eeff 100644 --- a/ros2/stretch_simulation.md +++ b/ros2/stretch_simulation.md @@ -96,6 +96,9 @@ curl -sL https://raw.githubusercontent.com/hello-robot/stretch_ros2/refs/heads/h # Add ROS 2 environment to your shell profile (optional but recommended) echo 'source ~/ament_ws/install/setup.bash' >> ~/.bashrc + +# Then source .bashrc to continue using this terminal +source ~/.bashrc ``` **Troubleshooting**: If you encounter a numpy header error during compilation: @@ -559,4 +562,4 @@ ros2 topic info /stretch/cmd_vel - Ensure `use_sim_time:=true` is set for navigation nodes -The simulation provides a safe environment to test your code before deploying to the real robot. Happy coding! \ No newline at end of file +The simulation provides a safe environment to test your code before deploying to the real robot. Happy coding! From fcc59898d8f9cc6a50e29437714f19ababf78d58 Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Wed, 15 Apr 2026 14:17:00 -0700 Subject: [PATCH 2/3] Add demo instruction patches --- ros2/stretch_simulation.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ros2/stretch_simulation.md b/ros2/stretch_simulation.md index 0d2eeff..c0fbb45 100644 --- a/ros2/stretch_simulation.md +++ b/ros2/stretch_simulation.md @@ -232,13 +232,25 @@ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel: ### Web Interface Control -The web interface provides a graphical way to control the robot: +The web interface provides a graphical way to control the robot. + +We will use the uncalibrated model for this demo. ```bash # Set up web teleop (one-time setup) cd ~/ament_ws/src/stretch_ros2/stretch_description/urdf cp ./stretch_uncalibrated.urdf stretch.urdf +``` + +Patch the controller calibration to use the factor default one. Open `export_urdf.sh` and search for `controller_calibration_head`. Update that `cp` command with the following: + +```bash +cp `ros2 pkg prefix stretch_core`/share/stretch_core/config/controller_calibration_head_factory_default.yaml ./exported_urdf/ +``` +Complete the model export: + +```bash sudo apt install rpl ./export_urdf.sh @@ -246,7 +258,16 @@ mkdir -p $HELLO_FLEET_PATH/$HELLO_FLEET_ID/exported_urdf cp -r ./exported_urdf/* $HELLO_FLEET_PATH/$HELLO_FLEET_ID/exported_urdf ``` +Finally, before launching, copy and rename the certificates to match the expected names: + +``` bash +cd ~/ament_ws/src/stretch_web_teleop/certificates +cp stretch-se3-local+6.pem server.crt +cp stretch-se3-local+6-key.pem server.key +``` + Launch web teleop: + ```bash # Terminal 1: Simulation with cameras MUJOCO_GL=egl ros2 launch stretch_simulation stretch_mujoco_driver.launch.py use_mujoco_viewer:=false mode:=position use_cameras:=true From 97cea0b34b91b7b029ef48e94383301bcebc3c55 Mon Sep 17 00:00:00 2001 From: Kenneth Yang <82800265+kjy5@users.noreply.github.com> Date: Wed, 15 Apr 2026 14:24:49 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ros2/stretch_simulation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ros2/stretch_simulation.md b/ros2/stretch_simulation.md index c0fbb45..97d347c 100644 --- a/ros2/stretch_simulation.md +++ b/ros2/stretch_simulation.md @@ -242,7 +242,7 @@ cd ~/ament_ws/src/stretch_ros2/stretch_description/urdf cp ./stretch_uncalibrated.urdf stretch.urdf ``` -Patch the controller calibration to use the factor default one. Open `export_urdf.sh` and search for `controller_calibration_head`. Update that `cp` command with the following: +Patch the controller calibration to use the factory default one. Open `export_urdf.sh` and search for `controller_calibration_head`. Update that `cp` command with the following: ```bash cp `ros2 pkg prefix stretch_core`/share/stretch_core/config/controller_calibration_head_factory_default.yaml ./exported_urdf/ @@ -260,7 +260,6 @@ cp -r ./exported_urdf/* $HELLO_FLEET_PATH/$HELLO_FLEET_ID/exported_urdf Finally, before launching, copy and rename the certificates to match the expected names: -``` bash cd ~/ament_ws/src/stretch_web_teleop/certificates cp stretch-se3-local+6.pem server.crt cp stretch-se3-local+6-key.pem server.key