Lab 7

Lab 7: Differential Kinematics

In this lab you will implement two strategies for navigating to a desired pose and practice differential kinematics.

1. In the lab7/ folder you will first work with odometry.py to implement some simple functions. The source code has a lot of guidance on what you will need to do. As a first step you will empirically determine two important parameters of the Cozmo robot and write functions that return those values.

    • get_front_wheel_radius() should return the front wheel radius.
    • get_distance_between_wheels() should return the back wheel radius.

The comments in the code give you some hints on functions you can use to experiment with the robot to determine these values. Ultimately you will need something you can measure to infer those values, e.g. estimated rotation of the wheel (90 degrees or 180 degrees).

2. Write a function rotate_front_wheel() that moves the front wheel by a desired angle amount.

3. The script has wrappers to existing robot movement functions for turning in place or moving straight. Next, you will write your own versions based on the low level control function robot.drive_wheels().

4. Implement three different functions that move the robot to a desired target pose using the different approaches discussed in class.

    • Approach 1: Turn in place to face target, move to target, turn in place to desired heading.
    • Approach 2: Use differential kinematics to choose wheel velocities at each step to jointly translate and rotate to the target pose.
    • Approach 3: Experiment with the Cozmo's built in function to determine its strategy and try to implement it. If you are unsure about Cozmo's strategy, try the hybrid approach of (Approach 1) only rotating towards the target if it is "behind" the robot and then (Approach 2) jointly steering.

5. As a final step you will combine what you did in Lab 6 and Lab 7 to make a robot move relative to a cube that it detects. Do this within move_relative_to_cube.py using a combination of function you implemented. You will need to decide what the desired relative pose should be, either by hand or through experimentation (e.g. place the cube where you want it to be relative to the robot and record relative pose). Make a video of the robot moving to the cube in two different cube poses and upload your video to a sharable location.