You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Subscription callback should support const reference by default #281
Yeah, I think it makes sense to support const reference, but never got around to doing. That would be a good enhancement. As for whether or not to use it by default, I think that might also be the right thing to do, but we were trying to stay as close as possible to ROS 1's simple examples (not a reason to not change, but just a historical reason why it is that way right now):
@wjwwood any updates on this issue? It seems like it would be really easy to add const-ref callbacks and I think it's a very reasonable default. With ROS1 const-ref callbacks were also available and we use them a lot in MoveIt.
Nope, no one has had time. It would be a good enhancement though. We need to audit the allowed signatures as well. We did this at some point for publish and deprecated several different styles and added some others.
Activity
wjwwood commentedon Jan 28, 2017
Yeah, I think it makes sense to support const reference, but never got around to doing. That would be a good enhancement. As for whether or not to use it by default, I think that might also be the right thing to do, but we were trying to stay as close as possible to ROS 1's simple examples (not a reason to not change, but just a historical reason why it is that way right now):
http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29#roscpp_tutorials.2BAC8-Tutorials.2BAC8-WritingPublisherSubscriber.CA-b00794bcdcacff4e742e844261078a50000d0a69_34
henningkayser commentedon Jun 12, 2020
@wjwwood any updates on this issue? It seems like it would be really easy to add const-ref callbacks and I think it's a very reasonable default. With ROS1 const-ref callbacks were also available and we use them a lot in MoveIt.
wjwwood commentedon Jun 13, 2020
Nope, no one has had time. It would be a good enhancement though. We need to audit the allowed signatures as well. We did this at some point for publish and deprecated several different styles and added some others.
wjwwood commentedon Jul 16, 2021
Closed by #1557