Conversation
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Karsten1987
left a comment
There was a problem hiding this comment.
As I follow up, I would like to modify the ros2component API similarly to take an optional resource index parameter. That way, a ros-control cli could reuse the same API for things like (component types).
| message(STATUS "Setting component resource index to non-default value ${resource_index}") | ||
| endif() | ||
|
|
||
| set(component ${ARGS_PLUGIN}) |
There was a problem hiding this comment.
I didn't want to pollute the changes any further, but I think the two args (PLUGIN and EXECUTABLE) could be checked for empty strings.
There was a problem hiding this comment.
Feel free to add it, or we can address it in a follow-up Issue/PR.
| #message(WARNING "registered index: ${resource_index}") | ||
| #message(WARNING "content for index: ${_RCLCPP_COMPONENTS_${resource_index}__NODES}") |
There was a problem hiding this comment.
I'll remove these lines before merging. I let them in for now in case the interested reviewers wants to debug ;-)
There was a problem hiding this comment.
Reminder to remove before merging.
| ComponentManager( | ||
| std::weak_ptr<rclcpp::executor::Executor> executor); | ||
| std::weak_ptr<rclcpp::executor::Executor> executor, | ||
| std::string node_name = "ComponentManager"); |
There was a problem hiding this comment.
Would it not make sense to have also a constructor that forwards the namespace and node options arguments?
There was a problem hiding this comment.
I agree that would probably make sense in this case to make it general purpose.
|
It won't let me comment since it's not a changed line, but does it make sense for the In the case that it is changed to |
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
mjcarroll
left a comment
There was a problem hiding this comment.
LGTM pending removing commented lines.
| message(STATUS "Setting component resource index to non-default value ${resource_index}") | ||
| endif() | ||
|
|
||
| set(component ${ARGS_PLUGIN}) |
There was a problem hiding this comment.
Feel free to add it, or we can address it in a follow-up Issue/PR.
| #message(WARNING "registered index: ${resource_index}") | ||
| #message(WARNING "content for index: ${_RCLCPP_COMPONENTS_${resource_index}__NODES}") |
There was a problem hiding this comment.
Reminder to remove before merging.
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
mjcarroll
left a comment
There was a problem hiding this comment.
Looks good. This assumes that the list of targets is always the last set of arguments. It could be switched to a multiValueArg at some point in the future, but I agree with not breaking the CMake "api" right now.
|
I've traced four new failed tests in last night's builds to this PR. ros2/build_farmer#272 |
closes #1010
The first commit d81d494 basically just turns the
component managerinto public API.The second commit 156ff16 is enhancing the CMake macros for registering nodes with a new option
RESOURCE_INDEXto specify under which index the file should be written.With respect to the upcoming work in ros-control (ros-controls/roadmap#7) that enables to not duplicate the CMake macros to adopt to ros-controls, but simply call the existing rclcpp_components macros with a proper resource index, e.g.:
The controller manager can then look into this exact index to only fetch controllers and no other components.