Week 4 labs
April 18, Tuesday
This week we finally get hands on with the Stretch robot. We just received our brand new Stretch 2 and we are excited to see if in action. Note that you do not need to run all parts of all tutorials on the real robot, but be sure to read all parts (including code). When you are ready to run something on the real robot, grab the physical robot token to take your turn, and return it promptly when you are done. If the robot is in use when you would like to use it, add yourself on the queue on the whiteboard and wait for your turn.
Lab 3: Complete all safety related Stretch tutorials. That includes:
Carefully reading the Stretch Robot Safety Guide.
Read the Stretch Best Practices and watch the Powered Off Video and Powered On Video.
Lab 4: Get started on operating the Stretch 2 hardware.
Go through the Stretch 2 Quick Start Guide. You can skip Safety (assuming you completed Lab 3 already) and Unboxing; go over Robot Tour, Hello World Demo, and Start Coding. (You can also skip Get Plugged in, Change Credentials, and Power Down but read them carefully and remember that they are here when you need to do those things.)
Read the Troubleshooting Guide so you can be aware of common issues that might come up.
Go through the Stretch 2 Battery Maintenance Guide.
Lab 5: Complete all of the Basic level Stretch Body Tutorials: Introduction, Command line Tools, Stretch Body API, Robot Motion, and Robot Sensors.
You will need to SSH to the robot for these tutorials. Talk to TAs to get the credentials info for your team's account on the Stretch robot.
Lab 6: Next, we get back to the Stretch ROS tutorials that we started last week using the Stretch Gazebo simulator.
First add the utility commands myip() and setrobot() into your .bashrc as in this example file so you can quickly switch between using the robot simulator and the real robot on the command line (e.g., `setrobot sim` or `setrobot slinky`).
Revisit the following tutorials from last week and try them on the real robot.
Tutorials 3: Move the real Stretch robot through keyboard-based teleoperation.
Tutorials 4: Inspect the Internal State of Stretch when the robot is running.
Then complete Tutorial 5 on RViz Basics on the real robot.
Lastly, complete Tutorial 8 on Follow Joint Trajectory Commands in simulation, and then (optionally) on the real robot.
Lab 7: In the last lab of the week, which is the most open-ended, you will build a web interface to control Stretch from a browser. You can start with a very simple interface that (i) allows you to move one part of the robot (perhaps start with the the head to be safe, but you can also try controlling the base and the arm once you are confident), and (ii) display some information about the robot (e.g., a sensor reading or some internal status). We do not have step-by-step instructions for how to do this, but here are a few pointers for resources and examples.
The ability to interact with ROS through a browser is enabled by the Javascript library roslibjs and a back-end tool called rosbridge. You might need to brush up on web programming a little bit before getting started.
As an example, you can try and look into the Stretch Web Interface (original version and the UW version). The TAs can help you run this web interface on our robot and experiment with controlling the robot.
You can reference two robot web interface tutorials for the Fetch robot on Robot web applications and Robot web interfaces (note that this tutorial uses a web development library called Polymer, which you do not have to use).
You can talk to the TAs about an ongoing project in which they are using React library in conjunction with ROS web tools to remotely control the Stretch.