This week, I worked on vehicle movement. First, I worked with Isaac to assemble (duct tape) a vehicle together. Then I determined which pins on the Raspberry Pi were needed and wired everything up. This also required re-soldering the some of the motor wires back on because they had fallen off.
I hoped to make more progress with movement (moving straight and rotating in place), but initial testing did not go well. One issue was that the each motor rotated at a different speed for a given PWM duty cycle. This prevented the vehicle from moving straight. It wouldn’t be possible to adjust the duty cycle for individual motors because this does not scale well to multiply vehicles. Instead, I implemented a PID on motor encoders to ensure that each wheel rotates the same amount in order to move straight forward.
The other issue with movement is more challenging and likely requires a mechanical (rather than software) fix. The problem is that the caster wheel in the back significantly impacts movement based on its position at any moment, which is effectively random and changes rapidly. We are planning to remove the caster wheel and replace it with a single ball bearing to avoid this problem.
Hopefully, these movement issues are solved next week and I can achieve consistent movement with a single vehicle. Then I can focus on coordinated movement. But before that, I am meeting with the team to work on our demo.