thingswebuilt / osod24_firmware

0 stars 0 forks source link

Automatic heading setting to align robot to the arena #34

Open markmellors opened 9 months ago

markmellors commented 9 months ago

Would be nice to have a means to automatically set the robot's heading (in estimatedState) in relation to the arena - so when placing the robot in the arena, the chassis heading isn't critical, and the robot can align itself to the arena walls and set an appropriate heading, so that its internal coordinate system aligns with the arena.
Will require external sensors to measure the arena in some way, such as a camera+CV or ToF sensors. The easiest and most universally applicable approach is probably to (manually or automatically) position the robot at ~45degrees to a wall, such that two ToF sensors both hit the same wall. Basically, the angle can then be calculated from the inverse tan of the two readings (+appropriate offsets). Should this method be on the pi or the rp2040?

depends on #33 and likely #36 too