openwsn-berkeley / Atlas

Atlas: Exploration and Mapping with a Sparse Swarm of Networked IoT Robots
2 stars 3 forks source link

fix rounding error is dotbot calculation of stop position #186

Closed Raa37 closed 2 years ago

Raa37 commented 2 years ago

Tested and compared dotbot positions calculated at orchestrator and locally for dotbot and all values are identical . There doesnt seem to be a rounding error. will close issue

Raa37 commented 2 years ago

Equations 1 , 2 and 3 are the main equations used for bump calculations. (finding actual bump position seems to be fine) but these equations are where we get differences in x, y values :

For now, I have decided to round to 5 decimal points instead of 3, and only for the final output of equations 2,3 and the bumpX bumpY calculated by the line clipping algorithm, to compensate for the rounding in sin/cos that causes the mismatch in values.