Chassis Design and Odometry

Successful completion of this milestone results in:

  1. Chassis Design

    Your chassis must satisfy constraints derived from the duckietown roadway geometry---you will receive penalties if either wheel touches a lane marker. Therefore, your chassis width should be determined by the lateral clearance between your wheels and the lane markers that you want and the motor mounting constraints. The length of your robot is limited by the turn radii required.

    You must also design the layout of the real estate associated with your robot with plans for mounting all the devices you need (Pi, Arduino, battery, motors, ping, and camera). The camera will be the primary lane following sensor and the ping is primarily for smart cruise control---consider the perspective of these sensors in light of these functions when considering how to mount them.


  2. Odometry
    1. open-loop motor control - experimentally determine the mapping from wheel velocity (cm/sec) to PWM commands [-400, +400] for both wheels.

      Show the results of an experiment that:

      • drives 1 meter forward along a straight line.
      • drives 5 laps around a constant radius circle (pick one/both of our duckietown turn radii.

    2. implement your quadrature encoder (note: there are only two interrupt pins for input on the Arduino)

      • choose an encoder resolution, print/mount the encoder disks (precision and neatness are important),
      • implement the interrupt handler on the Arduino that sums the encoder ticks traveled for each wheel,
      • at a regular, periodic interval, query the Arduino encoder registers and update the (x,y,θ) coordinate of a reference point on your robot.

        The distance traveled for the robot along its current heading is approximately

        Δx=(Δs(left)+Δs(right))/2

        the heading change is approximately

        Δθ = atan2( (Δs(right) - Δs(left))/2,   WHEEL_BASE/2).

        Then the cumulative displacement of the robot in the fixed world coordinate frame is

        θ += Δθ,
        x += Δx cos(θ), and
        y += Δx sin(θ).

    3. devise a simple controller that uses odometry to track the straight line and constant radius turn from part #2.1 Navigation control is designed to translate and rotate as appropriate to minimize the error between where the robot thinks it is and where it should be. For example, an error with respect to a reference orientation could be controlled using a simple proportional-derivative (PD) controller

      θ_ddot = -K(θ_act - θ_ref) - B(θ_dot_act)

      where θ_ddot is a small acceleration that should be added (aka integrated) into the cumulative PWM command for the right wheel and subtracted from the cumulative PWM command for the left wheel. Tune the values of K and B to make this work the way you want it to.

      Repeat the experiment from part #2.1 to show whether navigation controller works better than the open-loop motor controller.