1. A Stretch RE1 or RE2 robot, turned on and connected to a keyboard, mouse, and monitor
- Alternatively, setup [untethered operation](https://docs.hello-robot.com/0.2/stretch-tutorials/getting_started/untethered_operation/). This avoids the HDMI/USB cables getting pulled while the robot is moving.
2. Running the Ubuntu 20.04 software stack
- All RE2s ship with Ubuntu 20.04, however RE1s had shipped with Ubuntu 18.04 until summer 2022. RE1 users should run `lsb_release -sd` in a terminal and confirm "Ubuntu 20.04.5 LTS" or similar is printed out. If you are running Ubuntu 18.04, follow the [upgrade guide](https://docs.hello-robot.com/0.2/stretch-install/docs/robot_install/).
3. Already went through the [Start Coding section of the Getting Started guide](../getting_started/quick_start_guide_re2.md#start-coding) (hello_robot_xbox_teleop must not be running in the background)
### Connecting a Monitor
If you cannot access the robot through ssh due to your network settings, you will need to connect an HDMI monitor, USB keyboard, and mouse to the USB ports in the robot's trunk.
## Switching to ROS2
<!-- ## Setting Up Stretch in Simulation
Users who don’t have a Stretch, but want to try the tutorials can set up their computer with Stretch Gazebo.
It's recommended that ROS1 and ROS2 systems not run at the same time. Therefore, the default installation starts with ROS1 enabled and ROS2 disabled. This is configured in the "STRETCH BASHRC SETUP", which you can see by running `gedit ~/.bashrc` in a terminal and scrolling to the bottom.
Although lower specifications might be sufficient, for the best experience we recommend the following for running the simulation:
**Processor**: Intel i7 or comparable
**Memory**: 16 GB
**Storage**: 50 GB
**OS**: Ubuntu 20.04
**Graphics Card**: NVIDIA GTX2060 (optional)
![](./images/bashrc_setup_noetic.png)
### Setup
Hello Robot is currently running Stretch on Ubuntu 20.04 and ROS 2 Galactic. To begin the setup, follow the [Run the new robot installation script](https://github.com/hello-robot/stretch_install/blob/master/docs/robot_install.md#run-the-new-robot-installation-script) on your system.
We will disable ROS1 by commenting out the ROS1 related lines by adding '#' in front of them, and enable ROS2 by uncommenting the ROS2 related lines by deleting the '#' in front of them. The result will look like:
Finally, follow the [Creating a new ROS workspace](https://github.com/hello-robot/stretch_install/blob/master/docs/ros_workspace.md) guide to create a fresh catkin workspace complete with all the dependencies.
![](./images/bashrc_setup_galactic.png)
To begin working with a simulated Stretch, follow the [Gazebo basics](https://docs.hello-robot.com/0.2/stretch-tutorials/ros1_melodic/gazebo_basics/) tutorial. -->
Save this configuration using **Ctrl + S**. Close out of the current terminal and open a new one. ROS2 is now enabled!
## Refreshing the ROS2 workspace
While Stretch ROS2 is in beta, there will be frequent updates to the ROS2 software. Therefore, it makes sense to refresh the ROS2 software to the latest available release. In the ROS and ROS2 world, software is organized into "ROS Workspaces", where packages can be developed, compiled, and be made available to run from the command line. We are going to refresh the ROS2 workspace, which is called "~/ament_ws" and available in the home directory. Follow the [Create a new ROS Workspace guide](https://docs.hello-robot.com/0.2/stretch-install/docs/ros_workspace/) to run the `stretch_create_ament_workspace.sh` script. This will delete the existing "~/ament_ws", create a new one with all of the required ROS2 packages for Stretch, and compile it.
## Testing Keyboard Teleop
We can test whether the ROS2 workspace was enabled successfully by testing out the ROS2 drivers package, called "stretch_core", with keyboard teleop. In one terminal, we'll launch Stretch's ROS2 drivers using:
In the second terminal, launch the keyboard teleop node using:
```bash
ros2 run stretch_core keyboard_teleop
```
The following menu will be outputted to the terminal and you can press a key to move the corresponding joint on the robot. When you're ready to exit, press **Ctrl + C**.
```
[INFO] [1672878953.011453154] [keyboard_teleop]: keyboard_teleop started
[INFO] [1672878953.041154084] [keyboard_teleop]: Node keyboard_teleop connected to /stop_the_robot service.
---------- KEYBOARD TELEOP MENU -----------
i HEAD UP
j HEAD LEFT l HEAD RIGHT
, HEAD DOWN
7 BASE ROTATE LEFT 9 BASE ROTATE RIGHT
home page-up
8 LIFT UP
up-arrow
4 BASE FORWARD 6 BASE BACK
left-arrow right-arrow
2 LIFT DOWN
down-arrow
w ARM OUT
a WRIST FORWARD d WRIST BACK
x ARM IN
5 GRIPPER CLOSE
0 GRIPPER OPEN
step size: b BIG, m MEDIUM, s SMALL
q QUIT
-------------------------------------------
```
ROS2 is setup! Move onto the next tutorial: [Follow Joint Trajectory Commands](follow_joint_trajectory.md).