Replies: 3 comments
-
I personally don't see much value in changing simply to match the ROS2 convention. The extra six characters seem cumbersome and don't really tell me anything I didn't already know about the pointer type |
Beta Was this translation helpful? Give feedback.
-
I think I agree. I'd probably vote that we add both. It makes it nice that you can then find and replace ::Ptr with SharedPtr to port ROS 2 code. However I don't really feel strongly about it. It does seem odd that this changed though. There must have been rationale. Does the Google style guide dictate it this way? |
Beta Was this translation helpful? Give feedback.
-
I could not find anything in the google style guide, but found the ROS 2 documentation below. I don't care to much about this but I had to choose it would be the shorter version, though we could add both, but only use one internally. The struct contains typedefs for the four common pointer types plain pointer, std::shared_ptr, std::unique_ptr, std::weak_ptr. For each pointer type there a non-const and a const typedef:
Tessearct Equivalent
|
Beta Was this translation helpful? Give feedback.
-
It seems that the ROS 2 Style is to use ::SharedPtr instead of ::Ptr. Is there a reason not to add those to our classes? We could also deprecate the other way like it seems ROS 2 has done, but that might be a bit ahead of ourselves. Something like this
Beta Was this translation helpful? Give feedback.
All reactions