-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to specify NodeOption explicitly to allow declaration. #389
Need to specify NodeOption explicitly to allow declaration. #389
Conversation
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The example should also be updated to use the new API:
https://github.com/ros2/rclcpp/blob/dfb144d3cbadd3f5147d95ca6fcff7ad871804b5/rclcpp/include/rclcpp/node.hpp#L960-L962
https://github.com/ros2/rclcpp/blob/dfb144d3cbadd3f5147d95ca6fcff7ad871804b5/rclcpp/include/rclcpp/node.hpp#L987-L989
Could you give that a try?
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
could you check bb1cf59 ? |
Is this example also affected by ros2/rclcpp#851? |
yes, i will make the one PR for both of them. |
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
can you help me to merge this branch into the master?
this fix also resolve the ros2/rclcpp#851 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for iterating
rclcpp::NodeOptions() | ||
.allow_undeclared_parameters(true) | ||
.automatically_declare_parameters_from_overrides(true) | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value was not being used, right?
IMO, it's ok to force allow_undeclared_parameters
automatically_declare_parameters_from_overrides
to true
, because if not the example doesn't have sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are default arguments, so not used with current implementation.
@fujitatomoya Can you address the linter failures? |
Lines should be <= 100 characters long [whitespace/line_length] [2] Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
sorry about that i should have realized that before, https://ci.ros2.org/job/ci_linux/8186/testReport/(root)/projectroot/cpplint/ is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but uncrustify
is still not passing.
.automatically_declare_parameters_from_overrides(true) | ||
)) | ||
: Node("parameter_blackboard", options) | ||
rclcpp::NodeOptions options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra tab missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, fixed in 2dc4fb3
) | ||
: Node("parameter_blackboard", | ||
options.allow_undeclared_parameters(true). | ||
automatically_declare_parameters_from_overrides(true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct style is:
: Node(
"parameter_blackboard",
options.allow_undeclared_parameters(true).
automatically_declare_parameters_from_overrides(true))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, fixed in 2dc4fb3
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
could you check once again? apologize for uncrustify messges. thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green CI
is there anything i gotta do? just let me know what to do. |
@fujitatomoya there are some test failures that seem to be related with this change, can you check them? |
could you tell me what exactly the test failure is? i do not see any failure on CI. |
You can see the failures in the links above, e.g. here are the linux failures. I tested locally, and the only problem seems to be that the branch isn't rebased with master. |
Merged! Thanks for iterating @fujitatomoya! |
sorry about that, i just did not realize cz CI tells me that it can be merged. anyway, thanks for your time! |
Removing from the |
for EvenParameterNode sample, NodeOption should be specified explicitly to allow declaration the parameters from the other nodes.
Client(ros2 param cli to set parameter)
EvenParameterNode
with above, expected behavior is to be able to set even number for EvenParameterNode.