Homework 2 - Robot Operating System (ROS)

Due Tuesday, August 30 September 18, 2012

NOTE: This assignment, like others in this class, is due at the beginning of the class period. This means that if you are even a minute late, you lose 20%. If you are worried about potentially being late, turn in your homework ahead of time. Do this by submitting them to me during office hours or by sliding it under my office door. Do not send assignments to me through email or leave them in my departmental mail box.

As discussed in class, we will be using the Robot Operating System (ROS) in the course this semester. ROS has numerous features to aid users in the development of their robot software. However, these features take some time to learn. The point of this homework is to take you through some tutorial exercises to help you learn some of the basic features of ROS. Note, however, that you will not be programming any robots in this homework.

The assignment.

Work through the ROS tutorials, completing the following exercises as you go. (Note that you may use the CSN computers in DEH 115 to complete this assignment or you may use your own computer. If you choose to use your own computer, you will need to install ROS Fuerte (following the ROS Fuerte Installation Instructions starting with Step 1) before completing these exercises or use the VirtualBox prepared by our CSN system admin.)

As you complete these exercises and add items to your completed assignment, number them to correspond to the numbering below (e.g., the modified run commands file will be answer 1.1, the return value of "rospack find roscpp" would be answer 4.1). Note that not all exercises will result in answers being added to your completed assignment.

  1. Set up your environment such that the correct ROS run commands are sourced in your run commands (.*rc) file by your shell on startup. If you are using bash under Ubuntu, with a standard install, you may follow the directions in Step 1.5 of the ROS Fuerte installation instructions for Ubuntu directly. Otherwise, you will need to adapt these instructions slightly.
    1. Add your modified run commands file to your completed assignment.
  2. Work through the ROS overlays instructions.
  3. Work through the tutorial on navigating the ROS filesystem.
    1. Add the output of "echo $ROS_PACKAGE_PATH" to your completed assignment.
  4. Work through the tutorial on creating a ROS package.
    1. Add the output of "rospack depends1 beginner_tutorials" to your completed assignment.
  5. Work through the tutorial of building a ROS package.
    1. Add the output of "rosmake beginner_tutorials" to your completed assignment.
  6. Work through the tutorial on understanding ROS nodes
    1. Do a screen capture of the window that appears when you enter "rosrun turtlesim turtlesim_node" and add this to your completed assignment.
    2. Add the output of "rosnode list" (after renaming) to your completed assignment.
  7. Work through the tutorial on understanding ROS topics.
    1. Do a screen capture of the window that appears when you enter "rxgraph" in Step 1.2.1 and add this to your completed assignment.
    2. Do a screen capture of the RXPlot window when you enter "$ rxplot /turtle1/pose/x,/turtle1/pose/y /turtle1/pose/theta" and add this to your completed assignment.
  8. Work through the tutorial on understanding ROS services and parameters.
    1. Do a screen capture of the TurtleSim window when you enter "rosservice call spawn 2 2 0.2 """ and add this to your completed assignment.
  9. Work through the tutorial on using rxconsole and roslaunch.
    1. Do a screen capture of your rxconsole window when you enter "rosrun turtlesim turtlesim_node" and add this to your completed assignment.
    2. Do a screen capture of your rxloggerlevel window when you enter "rosrun turtlesim turtlesim_node" and add this to your completed assignment.
    3. Do a screen capture of your rxgraph window when you enter "roslaunch beginner_tutorials turtlemimic.launch" and "rostopic pub /turtlesim1/turtle1/command_velocity turtlesim/Velocity -r 1 -- 2.0 -1.8" and add this to your completed assignment.
  10. Work through the tutorial on using rosed.
  11. Work through the tutorial on creating a ROS msg and srv.
  12. Work through the tutorial on writing a simple publisher and subscriber in C++.
  13. Work through the tutorial on examining the simple publisher and subscriber.
  14. Work through the tutorial on writing a service and client node in C++.
  15. Work through the tutorial on examining the simple service and client.
    1. Add the output of "rosrun beginner_tutorials add_two_ints_client 1 3" to your completed assignment.
  16. Work through the tutorial on recording and playing back data.
    1. Add the contents of the bagfile created with "rosbag record -O subset /turtle1/command_velocity /turtle1/pose" to your completed assignment.
  17. Work through the tutorial on troubleshooting with roswtf.
    1. Add the output of "roscd" and "roswtf" in Step 1.2 to your completed assignment.
  18. Work through the tutorial on navigating the wiki.

What to turn in.

Turn in both an electronic copy (via D2L) and a hard copy of this assignment.