The main objective of this lab is to familiarize you with basic control of the Turtlebot robot. You are welcome to copy code from the internet, but make sure to credit where it came from. I recommend you work alone or in small groups. If you work in a small group, be sure to state everyone's name.
Upon successful completion of this lab, you will be able to:
- Run the turtlebot simulator in Gazebo (or Stage)
- Control the turtlebot via ROS messages in Python (or C++)
- I recommend you use Gazebo for this lab. You're welcome to use Stage instead (lower graphics requirements and very similar commands as the physical robot) but please specify this in your submission so that it's graded correctly.
- In preparation for this lab, you have already gone through a tutorial on Gazebo. In class, Matt demonstrated bringing up Gazebo, running rviz, and using keyboard commands:
roslaunch turtlebot_gazebo turtlebot_world.launch
roslaunch turtlebot_rviz_launchers view_robot.launch
roslaunch kobuki_keyop keyop.launch
- Download goForward.py, a simple python script for making the turtlebot go forward. Make sure you can run it:
and work to understand each line of the file
- Your job is to create two new python files. When I run triangle.py, your turtlebot will move in a triangle, stop, and then the program will end. When I run spiral.py, your turtlebot will move in an outward spiral until I hit Ctrl-C, at which point it will stop and the program will end.
You'll probably want to learn more about the Twist message in order to accomplish these tasks.
- For extra credit, see if you can create two turtlebots and get them executing the spiral pattern simultaneously.
In Blackboard, please submit the following:
- A text or pdf file (not word, openoffice, etc.) with:
- Your name
- The names of any people you worked with (optional)
- Any advice for someone who needs to do this lab (i.e., students next year)?
- Any on-line references / websites you found particularly useful
- A video or screen capture of your code running the triangle, spiral and the (optional) extra credit. If the video is large, instead of uploading to blackboard, you can add a link as the final line of your text file with a URL to youtube, dropbox, etc.
- The code you wrote for the assignment: triangle.py, spiral.py, and anything else we'll need to run it. It doesn't need to be pretty, but it should be commented enough that we can understand what you did.
- Text file content: 10
- Code for triangle (correctness and quality): 30
- Code for spiral (correctness and quality): 35
- Videos/screencaptures of triangle and spiral (correctly shows what code does): 25
- Extra Credit: 20