Question: The Task: Required to program a Turtlebot 3 burger robot to move following a square path using ROS 2 and Python. Your code also needs

The Task:
Required to program a Turtlebot3 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. 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 trajectory 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 corner 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 quaternion. For a ground 2D robot, we need to use position (x, y) and heading which can be computed from quaternion.
 The Task: Required to program a Turtlebot3 burger robot to move

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!