To develop your solution to this mapping exercise, you will collect testing data from the maze. You need to create another script to save images and odometry from the robot as you move it through the maze via the server-teleop.py script.
Create a new python script (data_logs.py) that logs the robots odometry (d, theta) in a text file and saves images to your laptop.
Run this new script as you guide your robot through the maze (run server-teleop.py in a parallel terminal window) and collect your data!
Before moving on, verify that the images have been saved correctly and the odometry recordings are reasonable.
To calculate robot odometry from wheel distances:
To find change in distance, average the distance travelled by each wheel.
distance = (distance_left + distance_right) / 2.0To find change in bearing, divide the difference between each wheel distance by the robot baseline (distance between wheels on the robot) and convert this angle to degrees.
theta = (distance_left - distance_right) / baseline * 180/pi