Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2

ros2 commandline service call

Previous: Answer by Dirk Thomas for What's the correct syntax for performing a service call from the command line in ROS2 ?Consider the following service, defined in example_interfaces packageAddTwoInts.srvint a int b --- int c Assuming that the server is called "add_two_ints"I managed to pass one argument to the service call in the following way$ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1'" requester: making request: example_interfaces.srv.AddTwoInts_Request(a=1, b=0) How to pass also the second argument ?These are not working$ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1'b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1' b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1', b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a:'1'" "b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a:'1'", "b:'2'"
$
0
0
What's the correct syntax for performing a service call from the command line in ROS2 ? Consider the following service, defined in `example_interfaces` package AddTwoInts.srv int a int b --- int c Assuming that the server is called `"add_two_ints"` I managed to pass one argument to the service call in the following way $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1'" requester: making request: example_interfaces.srv.AddTwoInts_Request(a=1, b=0) How to pass also the second argument ? These are not working $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1'b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1' b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a: '1', b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a:'1'" "b:'2'" $ ros2 service call /add_two_ints example_interfaces/AddTwoInts "a:'1'", "b:'2'"

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images