locusrobotics / robot_navigation

Spiritual successor to ros-planning/navigation.
450 stars 148 forks source link

Use Exception Pointers in Locomotor #47

Closed DLu closed 5 years ago

DLu commented 5 years ago

Thanks to @cf-zhang for pointing out the bug in #39.

The exceptions are designed to be A) Hierarchical B) Translatable to an integer for ROS interfaces

One of the key benefits of them being hierarchical is that you can then rethrow them and use the hierarchical exception catching to catch different classes of exceptions.

This PR ensures those properties are maintained by using exception_ptrs in the locomotor interfaces and passing the error codes up the hierarchy. The intended behavior is best seen in these tests