feat(controller-server): publish_zero_velocity parameter jazzy backport#4687
Conversation
publish_zero_velocity parameter (#4675)publish_zero_velocity parameter jazzy backport
…ation#4675) Backport of ros-navigation#4675 Signed-off-by: Rein Appeldoorn <rein.appeldoorn@nobleo.nl>
f633103 to
f72b994
Compare
| velocity.header.frame_id = costmap_ros_->getBaseFrameID(); | ||
| velocity.header.stamp = now(); | ||
| publishVelocity(velocity); | ||
| if (get_parameter("publish_zero_velocity").as_bool()) { |
There was a problem hiding this comment.
You can store the variable in the class, that's OK
There was a problem hiding this comment.
According to https://www.ros.org/reps/rep-0009.html:
You cannot...
Add new non-static data members, even if they are protected or private
Also the get_parameter is a map lookup so should be fast.
There was a problem hiding this comment.
I suppose I haven't enforced that part of ABI, but perhaps I should be -- it would just make direct backporting any new feature virtually impossible since they would likely have some parameter set tied to them. I enforce API stability and behavior stability (i.e. not changing defaults or fundamentally changing the behavior on a module mid-distribution), but I think there's an argument that I should by enforcing stricter ABI as well. Though, its never come up and no one's had an issue.
This is fine.
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Rein Appeldoorn <reinzor@gmail.com>
Backport of #4675