Pitt-RAS / micromouse-2016

7 stars 6 forks source link

Dead end and corner correction #31

Closed QuentinTorg closed 8 years ago

QuentinTorg commented 8 years ago

During a search, when the robot comes to a dead end, it can use this time to recenter itself within the cell. Upon reaching the dead end, it will use a motion_holdrange to set itself the proper distance and rotation away from the forward facing wall. It will then turn 90 degrees towards another wall and do the same thing. It will finish by rotating the remaining 90 degrees, then backing straight into the wall behind it, which will fix any remaining rotational or front to back error.

A similar method will also work for 90 degree pivot turns if we decide we need it. If we are driving up to a wall, we will use the motion_holdrange, then rotate 90 degrees to the direction we will move next. We can then back into the wall behind us to reset the errors in that direction before moving on.

Any combination of these recalibration strategies can be used depending on which walls are present.

https://www.youtube.com/watch?v=7GXcrig09aI

ghost commented 8 years ago

Dead end correction has been implemented, namely in d6321d9335204ad561bfa684dd30293fc1fd9d8c. 90 degree pivot turns don't generally happen anymore.