Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The assignment is worth 2 0 % of the total mark for this module. In this assignment, you are required to program a Turtlebot 3

The assignment is worth 20% of the total mark for this module. In this assignment, you
are required to program a Turtlebot 3 burger robot to move following a square path using
ROS2 and Python. Your code also needs to record the odometry data collected when
the robot moves. The recorded data should be used to evaluate your codes and the
parameters set in the code. Finally, you are required to submit a report which describes
your code and the experiment results.
The Task:
The task is to program and test a differential drive robot to trace out a square trajectory.
The square tracing robot should move along a square trajoctory with the length of 1
meter. The robot should start from (0,0) with a heading of 0 degree, move forward 1
meter and stop at (1,0). Then it should turn 90 degrees, move forward 1 meter, and stop
at (1,1). Next it should turn 90 degrees, move forward 1 meter, and stop at (0,1). Finally,
it should turn 90 degrees, move forward 1 meter, and stop at (0,0). You need to use mm
in the code. Then the distance will be 1000mm.
You should use appropriate methods in ROS2 and its dependent packages to control
the robot to move. You also need to use appropriate methods in ROS2 and its dependent
packages to keep the track of the robot pose. When you collect the odometry data, only
four points at the corners are not enough to show the square trajectory. More data points
should be sampled.
The robot should be displayed in Rviz when the robot is moving and also its pose should
be recorded in a data file. After completing the square, you can use the data file to draw
a trajectory in Microsoft Excel or other tools. More than one trial with different speeds
are required.
The robot can be controlled by varying the translational and rotational velocities. This
is implemented by publishing "/cmd_vel" topic with "Twist" message to the robot. You
need to find a way to control the robot to move towards 4 comer goal positions and turn
90 degrees on the spot. This part of your code is called the position controller.
Your code can subscribe to %odom" topic with "Odometry" message to obtain the
odometry data when the robot is moving. There are two parts in Odometry message:
pose and twist. We need to access the pose information, which includes position (x,y,
z) and orientation in quatemion. For a ground 2D robot, we need to use position (x,y)
and heading which can be computed from quaternion. Please see the example 8 in the
lab notes for more information. This part of your code is called the odometry logger.
The Report:
The report should be in PDF and must include a cover page with the module name,
student name and registration ID. The source code (for the node you developed) should
be made as a text file and submitted together with the report. The maximum length of
the report is of 10 pages (include the appendix). The report should include:
1. Description of your controller for moving forward 1 meter (20%).
You should explain how to move the robot forward for 1 meter or to next goal
position. As the robot is controlled by varying its translational and rotation
velocities, it is not straight forward to implement this function. There are multiple
ways to implement this function. For example, you can use a PID controller to
adjust the translational velocity until the distance between the robot and goal
position is less than a predefined error. You need to show how the parameters used
in the PID controller affect the performance of your controller by using diagrams
of recorded odometry data. If you use an open loop controller, you will lose
significant part of the marks.
2. Description of your controller for turning 90 degrees (20%).
You should explain how to turn the robot for 90 degrees. As the robot is controlled
by varying its translational and rotation velocities, it is not straight forward to
implement this function. There are multiple ways to implement this function. For
example, you can use a PID controller to adjust the angular velocity until the angle
the robot turned is close to 90 degrees. You need to show how the parameters used
in the PID controller affect the performance of your controller by using diagrams
of recorded odometry data. If you use an open loop controller (like move 1s with a
fixed velocity 1m/s), you will lose significant part of the marks.
3. Explanation of your odometry logger (20%).
The odometry logger can produce the pose information. In 2D case, the pose
information is x, y, and heading. The odometry data in Turtlebot3 burger is obtained
by fusing the readings of encoders and IMU. You need to understand the
information obtained in Odometry message and have the ability to convert it into
(x, y, and heading).
use a PID controller please
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe your ideal working day.

Answered: 1 week ago