-
Notifications
You must be signed in to change notification settings - Fork 208
Comments
Conversation
I might be wrong but based on my understanding we can only set one parameter currently using ros2 param set and hence setting params in an atomic fashion will not make sense using ros2 param set.
We should expose the --atomic flag for setting params atomically using ros2 service call #721 since we can set multiple params using service. Additionally, we can expose the --atomic flag for setting params using ros2 param load as well.
clalancette
commented
Jun 23, 2022
We should expose the
--atomicflag for setting params atomically usingros2 service call#721 since we can set multiple params using service.
The problem with that, though, is that --atomic there only makes sense for setting parameters, not other service calls. So I don't think the flag belongs on ros2 service call.
Additionally, we can expose the
--atomicflag for setting params usingros2 param loadas well.
This we should definitely do. The other thing we could do is to fix up ros2 param set so that it can take multiple parameters; at that point, it makes sense to add the --atomic flag.
We should expose the
--atomicflag for setting params atomically usingros2 service call#721 since we can set multiple params using service.The problem with that, though, is that
--atomicthere only makes sense for setting parameters, not other service calls. So I don't think the flag belongs onros2 service call.Additionally, we can expose the
--atomicflag for setting params usingros2 param loadas well.This we should definitely do. The other thing we could do is to fix up
ros2 param setso that it can take multiple parameters; at that point, it makes sense to add the--atomicflag.
I see, makes sense!
ihasdapie
commented
Jun 23, 2022
Right, I definitely wasn't thinking when I put this PR together 😅. Will update this PR to support multiple parameters & param load --atomic
clalancette
commented
Jun 23, 2022
Will update this PR to support multiple parameters &
param load --atomic
I'll suggest you do two separate PRs; the first one to add multiple param support to set, and then a second one (maybe this one) to add the --atomic flag. They are logically independent things, so they should have different PRs.
5bd9a70 to
13a8d16
Compare
ihasdapie
commented
Jun 23, 2022
ros2 param set with multiple parameters PR opened: #728
This PR is based off that PR (#728) and now implements --atomic for set and load verbs.
Diff: brianc/multiple_param_set...brianc/atomic_parameter_set
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
13a8d16 to
fb6efc1
Compare
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.
i think this call will raise exception if there is an actual exception.
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.
same here
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.
if response.result.successful is false, user can know that loading parameter operation has been failed?
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.
this whole operation is atomic, and user knows parameters as input, so i am not sure if we need print all parameters again here. probably this command prints the result only?
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.
same here.
This PR implements a
--atomicflag forros2 param setfor setting parameters atomically from the command line.