cvra / robot-software

CVRA monorepo - All software running on our bots lives here
MIT License
43 stars 21 forks source link

Explicit ownership of obstacle_avoidance #178

Closed antoinealb closed 5 years ago

antoinealb commented 5 years ago

Previously, obstacl_avoidance used to be a global singleton, leading to all sorts of issues with shared ownership, proper locking and so on.

This commit changes the API so that all calls to the obstacle avoidance module take a pointer to the data to use. This also meant changing a few tests.

On the robot the obstacle avoidance data is now handled by the map server. The only way to access it is through an API that ensures it is properly locked.

Fixes #137

antoinealb commented 5 years ago

Should we test this on hardware before merging ? Do we have a working setup where this could be tested ?

SyrianSpock commented 5 years ago

Should we test this on hardware before merging ?

Yes, it's safer. I'll test it and merge.

Do we have a working setup where this could be tested ?

That's our secret, we ~always~ almost always have a working setup

SyrianSpock commented 5 years ago

Tested on robot, and all looks good for this refactoring :+1: