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.
- For example, running
rosrun lab3_turtlesim turtle_controller turtle1
will start a controller node that controlsturtle1
.
- For example, running
- Use
w
,a
,s
,d
keys to control the turtle by publishing 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 a key is pressed. When the key is released, the turtle should STOP moving. - The controller should be able to listen to multiple keys simultaneously. For example, if
w
anda
are pressed, the turtle should move forward and turn left in a circular path. If the keys pressed are contradictory, there should be no movement.
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 Gazebo 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.