ethz-asl / terrain-navigation

Repository for Safe Low Altitude Navigation in steep terrain for fixed-wing Aerial Vehicles
https://ieeexplore.ieee.org/abstract/document/10443502
BSD 3-Clause "New" or "Revised" License
87 stars 10 forks source link

Remove compiler warnings #44

Closed Ryanf55 closed 4 months ago

Ryanf55 commented 4 months ago

This removes the compiler warnings. A few of the functions had unused epsilon values.

In getClosestPoint, I used the epsilon value from the function in a place that seems correct, however they were different by an order of magnitude. If you think that's wrong, let me know.

Finally, the pi-wrapping functions were converted to inline because they were defined and used in different translation units:

/__w/terrain-navigation/terrain-navigation/src/ethz-asl/terrain-navigation/terrain_navigation/include/terrain_navigation/path_segment.h:61:13: warning: ‘void wrap_pi(double&)’ defined but not used [-Wunused-function]
   61 | static void wrap_pi(double &angle) {

Using inline stops the compiler from caring about that. I looked briefly to see if there was any pi-wrapping utilities in eigen, but could not find any. There are numerous optimizations that can be made to the current algorithm, but I'm not going to bother until we have benchmarking set up.

Ryanf55 commented 4 months ago

All the compile warning are now removed. Would you like me to issue a PR to enforce we don't have regressions in CI?

Jaeyoung-Lim commented 4 months ago

@Ryanf55 Yes please!