Project 1 - Setting up ROS1 and TurtleSim
Seneca Polytechnic AIG240 Robotics for Software Engineers
Due: Sunday, Jun 1, 2025 at 11:59PM on Blackboard Weight: 10%
Introduction
In this project, you will demonstrate your achievement in setting up a ROS1 environment and creating a simple node to control a robot using TurtleSim.
Objectives
- Set up the ROS1 environment.
- Create a simple ROS node to control a robot.
- Answer assessment questions.
NOTE: This project must be completed individually.
Step 1: Set Up Your ROS Environment
- Install ROS1 as per the Lab 1 instructions.
- Create your ROS workspace as per the Lab 3 instructions.
Step 2: Create and Run a Simple ROS Node
Use open-source code, AI-generated code, or your own code to create a controller as described below (and in Lab 3) to make the robot move in TurtleSim.
Your node should do the following:
- Accept a command line argument specifying the name of the turtle it should control.
- i.e., running
rosrun lab3_turtlesim turtle_controller turtle1
will start a controller node that controlsturtle1
.
- i.e., running
- Use
w
,a
,s
,d
(andq
,e
,c
, andz
) to control the turtle by publish velocity control messages on the appropriate topic whenever the user presses those keys on the keyboard, as in the originalturtle_teleop_key
. The turtle should ONLY move when is key is pressed. When the key is released, the turtle should STOP moving.- Option 1 (Easy) Single keypress: In addition to just forward/backward and turns, the turtle should move forward and turn left in a circular path if
q
is pressed and similar fore
,c
, andz
in their corresponding direction. - Option 2 (Hard) Multiple keypress: If you want to challenge your Python skills, make the controller so it listen to multiple keys. i.e., if
w + a
are pressed, the turtle should move forward and turn left in a circular path. If the keys pressed are contracdicting, there should be no movement. You'll need to install additional Python package to achieve this.
- Option 1 (Easy) Single keypress: In addition to just forward/backward and turns, the turtle should move forward and turn left in a circular path if
Hint: You'll need to use the Twist
message type in the geometry_msgs
package.
Hint: Refer to the turtle_teleop_key
source code as a reference.
Assessment Questions
- What command did you use to create a ROS package?
- Explain why and how you used ROS messages in your program.
- Describe the steps to launch ROS, TurtleSim, and your ROS node simultaneously.
- How do you verify that your ROS node is publishing messages correctly?
Submission
- A link to your project folder (e.g., on GitHub (private) or Google Drive) containing all the necessary files and code.
- A video showing your code running in TurtleSim and the robot moving.
- A text file containing the answers to the questions for every group member.
Late Submission Penalty
- A 25% reduction from the full mark will be applied for every 24 hours the submission is late after the deadline.