-
Notifications
You must be signed in to change notification settings - Fork 412
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
Autostart parameter services #478
Conversation
Looks like a failing build on Windows:
|
Should we provide an option for users to not start the parameter server automatically ? Or do we skip it for no until you get a chance to use the API provided in ros2/rcl#194? |
|
@sloretz I actually think it's pretty important to be able to avoid creating the ROS part of the parameters service. That system is still pretty heavy weight at the moment. In fact @serge-nikulin already mentioned they'd like this option to disable any ROS interfaces related to parameters. |
I would be fine with it being in a follow up pr, however. I just think it's worth doing soon. |
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, just had one comment/question.
|
||
get_parameters_service_ = create_service<rcl_interfaces::srv::GetParameters>( | ||
node_base, node_services, | ||
std::string(node_name) + "/" + parameter_service_names::get_parameters, |
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.
node_name
is already a string? Or is it because it's const
?
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.
Neither, I didn't pay close enough attention when replacing node->get_name()
with node_name
07c0b03
<string>
defines an operator+
taking a const
string and a c string http://en.cppreference.com/w/cpp/string/basic_string/operator%2B
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.
code change looks good to me:
2 things that should be done before considering merging:
- ticket the remaining work of making this optional
- modify the turtlebot2 packages that will break with this change (https://ci.ros2.org/job/ci_turtlebot-demo_linux/123)
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 making the change.
@mikaelarguedas turtlebot 2 demo |
CI looks good and prs #478, ros2/demos#236, ros2/system_tests#270 are approved. Turtlebot demo PRs passed CI too, but those prs (ros2/turtlebot2_demo#83, ros2/depthimage_to_laserscan#7, ros2/navigation#27, ros2/teleop_twist_joy#7) aren't approved. I'll merge the prs in ros2.repos now and wait for approvals on the turtlebot2 demo repos separately. |
I am not sure of this patch is related but in the last nightly this test failure showed up and this PR is the only merge changed in this area recently. |
Seems like this PR might be the culprit. |
@dirk-thomas created PR #483 |
Signed-off-by: Soragna, Alberto <alberto.soragna@gmail.com>
This automatically starts parameter services when a node is constructed. This is one step closer to a future where the services are created by
rcl
. If the user doesn't have to start the services, then they won't notice whenrcl
is starting them instead ofrclcpp
.I refactored
create_service()
to get rid ofParameterServices
requiring a pointer toNode
so that it could be started byNodeParameters
.