Custom Constructor for creating a shared pointer to an existing object that doesn't delete the ptr when done.
- Note
- This is considered bad form, and is only done here for backwards compatibility purposes. The nav_core2 interfaces require shared pointers, but the creation of the shared pointer from a raw pointer takes ownership of the object such that when the object containing the shared pointer is freed, the object pointed at by the shared pointer is also freed. This presents a problem, for instance, when switching from one planner to another if the costmap is freed by one planner.
- Parameters
-
raw_ptr | The raw pointer to an object |
- Returns
- A Shared pointer pointing at the raw_ptr, but when it is freed, the raw_ptr remains valid
Definition at line 60 of file shared_pointers.h.