Homework 3 - Robot Operating System (ROS)

Due Thursday, September 27

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 conjunction with TurtleBots in the course this semester. The point of this homework is to take you through some tutorial exercises to help you learn some of the basic features of ROS and TurtleBots. Note that, as with Homework 2, you will not be programming any robots in this homework. However, you will get to drive them around in simulation a bit!

The assignment.

Work through the ROS tutorials listed below, 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 as you did with Homework 2. Note that not all exercises will result in answers being added to your completed assignment.

  1. Work through the tutorial on running the TurtleBot simulator.
    1. When the Gazebo window appears, zoom in on the robot and orient the view of it in such a way that the words on the robot are easily legible. Do a screen capture of the Gazebo window at this point and add this to your completed assignment.
    2. After the Gazebo window is present but before you go on with the rest of the tutorial, start rxgraph. Do a screen capture of the rxgraph window and add this to your completed assignment.
    3. Describe what Gazebo is in a sentence or two and add this to your assignment. Note that this tutorial does not describe Gazebo. You may need to search elsewhere for this information. Be sure that this description is in your own words. Do not simply copy and paste a description from elsewhere.
    4. State whether the command "rostopic pub -r 5 cmd_vel geometry_msgs/Twist '[0.1, 0, 0]' '[0, 0, 0.2]'" causes the robot to circle to its left (counterclockwise when viewed from above) or its right (clockwise from above).
    5. While the cmd_vel messages are still being published, do another screen capture of rxgraph and add this to your completed assignment.
    6. Referencing your two rxgraph screen captures, explain how the rostopic is interacting with the other components of the system.
    7. Give a command that would cause the robot to circle in the opposite direction of the command above. (The robot should make a circle of the same approximate radius while still circling forward.)
    8. Give a command that would cause the robot to move in the same circle as the command you just gave but moving twice as fast.
    9. Stop publication of the cmd_vel message but leave Gazebo running and go on to the next tutorial.
  2. Work through the tutorial on interactive markers.
    1. Once the turtlebot_marker_server is running, do another screen capture of the rxgraph window and add that to your completed assignment. Referencing this new image and any relevant previous ones, explain how the turtlebot_marker_server is interacting with the other components of the system.
    2. When the rviz window appears, do another screen capture of the rxgraph window and add that to your completed assignment. Referencing this new image and any relevant previous ones, explain how rviz is interacting with the other components of the system.
    3. In rviz, change the "Fixed Frame" option (under Global Options in the left subwindow), from "/odom" to "/odom_combined.
    4. Do a screen capture of the rviz window while you are dragging the robot forward using the interactive markers and add this to your completed assignment.
    5. Shut down your ROS, Gazebo, and related processes and go on to the next tutorial.
  3. Work through the tutorial on building a map in the TurtleBot simulator.
    1. Rather than "rosws init ~/sim_workspace /opt/ros/electric" use "rosws init ~/sim_workspace /opt/ros/fuerte" instead. (Note that electric is the previous version of ROS and fuerte is the current version.)
    2. Be sure to source your sim_workspace/setup.bash file as instructed by rosws and add this source command to your .bashrc file.
    3. Rather than the build_map.launch file in the tutorial, use the one provided by Prof Fagg.
    4. When the Gazebo window appears, do a screen capture of it and include this in your completed assignment.
    5. When the rviz window appears, there is a good chance that the robot and obstacles will be outside the visible space in the center subwindow. You can center the display by clicking the "Zero" button near the center right edge of the rviz window. After that, you’ll probably want to play with the Views a bit to get a good view of what is going on.
    6. Once you have the rviz view positioned but before you begin to drive the robot, take a screen capture of the rviz window and include that in your completed assignment.
    7. Drive the robot around using the keyboard to construct the best map that you can and take another screen capture of the rviz window to show that map and include that in your completed assignment.

    What to turn in.

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