deeper-blue / sdp-robot

The robot code for Deeper Blue, an assistive chess-playing robot. Developed for the System Design Project, a 3rd year course offered at the School of Informatics, University of Edinburgh.
2 stars 0 forks source link

Unify motors and movements to use speed #17

Closed pilif0 closed 5 years ago

pilif0 commented 5 years ago

Currently the motors and movements use either run_direct with specified duty cycle or run_to_rel_pos with specified speed.

To keep the systems unified, I propose starting the robot at origin, resetting positions of motors to zero there, and then using run_to_abs_pos with specified speed for all movements. The command returns immediately, so it should be possible to dynamically adjust speed with repeated calls.

pilif0 commented 5 years ago

Additionally, using run_to_abs_pos would help with removing error as long as the motor's position field is aware of it (e.g. from coasting).