Conversation
| { | ||
|
|
||
| /// Indicate `rcl_params_t` is or invalid. | ||
| class InvalidParametersException : public std::exception |
There was a problem hiding this comment.
exception type should be moved to rclcpp/exceptions.hpp
There was a problem hiding this comment.
Moved plus inherit from runtime_error in b415df7
Adds rclcpp::parameter_map_from(const rcl_params_t * const) Adds rclcpp::parameter_value_from(const rcl_variant_t * const) Adds dependency on rcl_yaml_param_parser
85ecbe3 to
94807c6
Compare
| } | ||
|
|
||
| /// make sure there is a leading slash on the fully qualified node name | ||
| std::string node_name("/"); |
There was a problem hiding this comment.
Let's keep this here for now 👍
It may be better (in the future) to enforce this at a lower level.
It could be done in the parser:
- reject node_namespace + node_name not starting with a leading slash
- add the leading slash to any provided node_namespace + node_name that doesnt have one
If the structure always assumes fully qualified name, I guess we could enforce this it in the structure itself by providing structure functions to assign element and reject or add leading slash to the provided node names. This would allow other users of the structure to not have to duplicate that logic.
There was a problem hiding this comment.
Roger. I wasn't sure if I should make a bug on rcl_yaml_param_parser about it returning names without a leading slash, or if there will one day be a use case for that (like pushing nodes up a namespace in ros2 launch?). Thanks for the reviews!
mikaelarguedas
left a comment
There was a problem hiding this comment.
looks good, thanks @sloretz
PR complete, waiting for #481 to be merged first, then this needs to be targeted atReady to reviewmaster.This allows the initial parameter values for a node to be passed in via it's constructor. These parameters are then immediately set on the node.
edit: invoked CI wrong, will wait to run until #481 is in.blocks #477
requires #481