BehaviorTree / BehaviorTree.ROS2

BehaviorTree.CPP utilities to work with ROS2
Apache License 2.0
144 stars 59 forks source link

Fix delayed subscription missing first message and change topic name #52

Closed tony-p closed 5 months ago

tony-p commented 5 months ago

Fixes issue https://github.com/BehaviorTree/BehaviorTree.ROS2/issues/51

facontidavide commented 5 months ago

Thanks, but I would not customize the retention policy through inheritance.

Also, it is not very clear what the intent is. What about adding a parameter in the constructor, such as bool latching or change the vistual function to override to bool isLatching() const?

tony-p commented 5 months ago

Thanks, but I would not customize the retention policy through inheritance.

Also, it is not very clear what the intent is. What about adding a parameter in the constructor, such as bool latching or change the virtual function to override to bool isLatching() const?

It is more flexible (some more discussion in https://github.com/BehaviorTree/BehaviorTree.ROS2/pull/42). For example a colleague wanted to clear it based on a port value, this can easily be added in the overridden definition, although for those particular use cases I think it was better to just define 2 actions

Maybe there are other uses cases basing it on the content of the message itself ... but haven't hit that myself yet

Definitely open to better naming