Congratulations on your Stretch 2! This guide will get you started with your new robot.
Stretch has the potential to cause harm if not properly used. All users should review the Stretch Safety Guide before operating the robot.
Please watch the Stretch Unboxing Video. Please note that the unboxing instructions for a Stretch 2 are the same as for a Stretch RE1.
A few items you'll want to know about before getting started.
The entire robot powers up and down with the On/Off switch. When powering down, we recommend selecting 'Power Off' from the Ubuntu Desktop prior to hitting the Off switch
The illuminated button on the head is its Runstop. Just tap it, you'll hear a beep and it will start flashing. This will pause the motion of the primary robot joints during operation. This can be useful if the robot makes an unsafe motion, or if you just want to free up the robot motors while you roll it around.
To allow motion once again, hold the button down for two seconds. After the beep, the motion can resume.
The LED lightbar in the base provides a simple way to quickly ascertain the robot's state. At all times its color indicates the battery voltage.
More information on the voltage display is available in the Battery Maintenance Guide
The lightbar will also flash as follows:
Mode | Flashing |
---|---|
Normal Operation | None |
Runstopped | Rapid flash at 1 Hz |
Charger plugged in | Slow strobe at 0.5 Hz |
Stretch comes ready to run out of the box. The Xbox Teleoperation demo will let you quickly test out the robot's capabilities by teleoperating it with an Xbox Controller.
Note: You will find the USB Dongle already plugged into the USB port of the base trunk.
To start the demo after unboxing and turning the power on:
You're ready to go! A few things to try:
If you're done, let's power down. First, attach the clip-clamp just below the shoulder as shown.
Hold down the Shutdown PC button on the Xbox controller for 2 seconds. This will cause the PC to turn off. You can then power down the robot with the On/Off switch.
Now that you're familiar with the robot, take a minute to watch the Stretch Powered Best Practices Video. Please note that the best practice instructions for a Stretch 2 are the same as for a Stretch RE1.
Like any robot, it is possible to break Stretch if you're not careful. Use common sense when applying forces to its joints, transporting it, etc.
The Stretch Unpowered Best Practices Video provides a quick overview of how to work with the robot. Please note that the best practice instructions for a Stretch 2 are the same as for a Stretch RE1.
Things that won't hurt the robot:
Things to be mindful of:
Things that can hurt the robot:
The provided battery charger can be plugged and unplugged at any time during operation. Stretch uses the following charger modes:
Mode | Function |
---|---|
STANDBY | Charger not charging the robot |
12V AGM | Charging while robot is powered down |
SUPPLY | 1) Power the robot during tethered use 2) Repair damaged batteries. |
REPAIR | Repair damaged batteries. |
Please review the Battery Maintenance Guide for proper care and charging of Stretch batteries.
Let's get plugged in.
Log in to the robot computer. The default user credentials came in the box with the robot.
Python is the easiest way to begin writing code for the robot. This section will give you a quick look at Stretch Body, which is the low-level Python interface to the robot. Detailed information on the Stretch Body Interface can be found here.
Stretch is configured to run the Xbox Controller demo in the background at startup. To run your own code you'll need to kill this process so that it doesn't contend with your code.
pkill -f stretch_xbox*
While you're at it, disable this autoboot feature. You can always turn it back on later.
Search for 'Startup' from Ubuntu Activities. Uncheck the box for 'hello_robot_xbox_teleop'
Now open up a Terminal. From the command line, first, verify that all of the hardware is present and happy
stretch_robot_system_check.py
You may see a few joints reported in red because they haven't yet been calibrated. If so, home the robot
stretch_robot_home.py
Once the robot has homed, let's write some quick test code:
ipython
Now let's move the robot around using the Stretch Body Robot API. Try typing in these interactive commands in the iPython prompt:
import stretch_body.robot
robot=stretch_body.robot.Robot()
robot.startup()
robot.stow()
robot.arm.move_to(0.25)
robot.push_command()
robot.arm.move_to(0.0)
robot.push_command()
robot.lift.move_to(0.4)
robot.push_command()
robot.pretty_print()
robot.lift.pretty_print()
robot.head.pose('tool')
robot.head.pose('ahead')
robot.end_of_arm.move_to('wrist_yaw',0)
robot.end_of_arm.move_to('stretch_gripper',50)
robot.end_of_arm.move_to('stretch_gripper',-50)
robot.stow()
robot.stop()
Finally, we recommend that you change the login credentials for the default user, hello-robot.
sudo passwd hello-robot
If you'd like to set up a new user account, check out the Stretch Installation Guide. In a lab setting, it's useful for lab members to have their own user accounts to run experiments.
The recommended power-down procedure is
Join the Hello Robot Community. We'd welcome hearing your feedback as you get to know your robot.
Hello Robot support monitors the forum closely and will quickly get back to you on any questions or issues you post.
Encounter any issues while getting started? Please let us know at support@hello-robot.com. Also, take a minute to review the Stretch Troubleshooting Guide
We recommend next exploring the ROS-based demos that ship with Stretch. These are found in the stretch_ros repository.
That's it. Happy coding!