KumarRobotics / kr_autonomous_flight

KR (KumarRobotics) autonomous flight system for GPS-denied quadrotors
Other
654 stars 110 forks source link

Map data type #171

Closed orlando21lara closed 1 year ago

orlando21lara commented 1 year ago

This PR addresses issue #35 I refactored the VoxelMapper class to use MapUtil since there were inconsistencies in the voxel alignment between the mapper and the planner. Both now use MapUtil which implements axis-aligned voxels. I added more unit tests for the various VoxelMapper class methods and I added some more comments in the source and header files. I also attached an image showing how there is a performance increase in the methods by changing the map data type. To achieve the performance increase I also had to change the iteration order along x-y-z to make it cache friendly given the new data type. In the image you can see, for example, that the getInflatedMap method takes about 71% less time to execute. benchmark

Finally, I added some comments in the CMakelists.txt file in the mapper package indicating how to run the tests and the benchmarks. Google Benchmark is added to the mapper package when compiling via CMake's FetchContent module (it was not added directly in this repository).

orlando21lara commented 1 year ago

The PR is failing the cpplint test, I can fix the first two errors; however the other errors are a bit more involved. They are related to google benchmark and as it stands there doesn't seem to be a way to make the code compliant with cpplint (reference). How should this be addressed? One possibility is to add a filter for that particular error (reference). The filter that we would need to add is: "-runtime/references"

fcladera commented 1 year ago

172 addresses the issue with cpplint. Please rebase on top of master and push force once that PR is merged @orlando21lara

XuRobotics commented 1 year ago

Great job, Orlando, what you've done in this PR is very impressive and important! Just let me know when you've finished testing, and then I will merge.

orlando21lara commented 1 year ago

Thank you Xu, I've finished testing and everything looks good. You can merge whenever you want.