Add rclcpp action examples with member functions#230
Conversation
0abbe73 to
82c7acb
Compare
Karsten1987
left a comment
There was a problem hiding this comment.
I do believe the code as-is can't really be used in the new composition model. The constructor doesn't have the required form and the init function can't be called from the component manager.
|
@Karsten1987 I've updated the examples to be more in line with the new composition model. Please take another look (thanks!). |
mjcarroll
left a comment
There was a problem hiding this comment.
I've included some additional comments on how to bring this compatibility with the new composition interface. Additionally, anything that you want to use as a component needs to be in a shared library, so you would have to have a separate main function.
I'll leave it up to you if you actually want to implement this here, or it would better live as a demo in ros2/demos/composition
|
@mjcarroll Thanks for the review! In the spirit of keeping the examples in this package minimal, I'd prefer not to make these actual components and bring in a dependency to |
|
I'll just add that, our long term goal has been to use composition everywhere, and make things that have their own main as the "exceptional cases". However, I can see an argument for not doing this just here, but instead leaving this pr as-is and then updating all the examples at once. This is probably a topic we should discuss at some point before the release... |
|
@jacobperron This is still not fully composable. Each node has to be its own library and the node has to be registered with the class loader macro as well as added to the ament index within the cmake context: Also, in order to support manual composition - besides the command line tool via |
|
Based on our offline discussion, I'll leave these examples as not fully composable and create a follow-up PR to add composable examples to the demos repo. I still need to update this PR based on the changes in ros2/rclcpp#701. |
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
70b91ec to
9999fc0
Compare
Connects to ros2/rclcpp#635