Question: Task to accomplish Create a Python program that, using ALL the methods from the robot _ control _ class.py Python script, helps the Turtlebot robot
Task to accomplish
Create a Python program that, using ALL the methods from the robotcontrolclass.py Python script, helps the Turtlebot robot to get out of the maze.
Just to help you out, let's make a summary of all the methods you've been using throughout the course:
getlaser direction: As the name itself says, this method will allow you to get data from the laser of the robot. You will need to pass one parameter to this method:
direction: Here you will specify a number between and which will indicate the direction of the laser reading.
getlaserfull: As the name itself says, this method will allow you to get all the data from ALL the laser beams of the robot. As I've said before, this is a total of different readings. So when called, this method will return a LIST containing all the different readings from the laser beams.
movestraight: As the name says, this method will allow you to start moving the robot in a straight line.
stoprobot: As the name says, this method will allow you to stop the robot from moving.
movestraighttimemotion speed, time: As the name itself says, this method will allow you to move the robot in a straight line. You will need to pass three parameters to it
motion: Specify here if you want your robot to move forward forward or backward backward
speed: Specify here the speed at which you want your robot to move in ms
time: Specify here how long you want your robot to keep moving in seconds
turn clockwise speed, time: As the name itself says, this method will allow you to turn the robot. You will need to pass three parameters to it
clockwise: Specify here whether you want your robot to turn clockwise clockwise or counterclockwise counterclockwise"
speed: Specify here the speed at which you want your robot to turn in rads
time: Specify here how long you want your robot to keep turning in seconds
Finally, and for this project, you are going to be able to use a new method.
rotate degrees: This method will allow your robot to rotate for the specified number of degrees.
degrees: The number of degrees you want your robot to rotate.
NOTE: In theory, you can also make the robot rotate a certain number of degrees by using the
t
u
r
n
method and playing with the
s
p
e
e
d
and
t
i
m
e
values. However, this method will be less precise than the
r
o
t
a
t
e
method, because it's not taking into account external sources like the odometry of the robot which the
r
o
t
a
t
e
method does
robotcontrolclass.py
Below you can find the updated code for the robotcontrolclass.py class, which contains the new rotate method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
