ros2cli icon indicating copy to clipboard operation
ros2cli copied to clipboard

Support setting parameters atomically using ros2 service command line

Open deepanshubansal01 opened this issue 3 years ago • 2 comments

Feature request

It would be nice to support setting params atomically using ros2 service call command line.

Feature description

Currently, the ros2 service call sets parameters in a non atomic fashion, meaning if one fails it wouldn't affect the other params being set. It would good to support an optional argument --atomically or something which could help in debugging and testing if params are required to be set in an atomic fashion using the command line.

Implementation considerations

For setting the params atomically using ros2 service call we could leverage the already existing Node API service rcl_interfaces::srv::SetParametersAtomically.

deepanshubansal01 avatar Jun 09 '22 22:06 deepanshubansal01

Hi @deepanshubansal01 I think that this issue would be better suited for the https://github.com/ros2/ros2cli repository. That's where the code that implements ros2 service call or similar CLI commands live.

P.S. note that you can set parameters with ros2 param set

alsora avatar Jun 10 '22 08:06 alsora

Hi @deepanshubansal01 I think that this issue would be better suited for the https://github.com/ros2/ros2cli repository. That's where the code that implements ros2 service call or similar CLI commands live.

Agreed. The underlying rclcpp and rclpy client libraries already has this functionality, we would just need to somehow expose it via the command-line. I'm going to move this over to ros2cli.

clalancette avatar Jun 10 '22 12:06 clalancette