ros / ros_tutorials

Code used in tutorials found on ROS wiki
http://wiki.ros.org/ros_tutorials
805 stars 540 forks source link

[ros2 turtlesim] incorrect /spawn srv autocompletion #136

Closed kurshakuz closed 2 years ago

kurshakuz commented 2 years ago

Typing following command and trying autocompletion (tab) produces following output:

ros2 service call /spawn turtlesim/srv/Spawn 
-r
--rate
x:\ 0.0\^Jy:\ 0.0\^Jtheta:\ 0.0\^Jname:\ \'\'\

However, adding an x after above statement, produces different output:

ros2 service call /spawn turtlesim/srv/Spawn x
ros2 service call /spawn turtlesim/srv/Spawn x:\ 0.0\
y:\ 0.0\
theta:\ 0.0\
name:\ \'\'\ 

Executing any of them produces errors:

yaml.scanner.ScannerError: mapping values are not allowed here
  in "<unicode string>", line 1, column 8:
    x: 0.0y: 0.0theta: 0.0name: '' 
           ^

The expected and working example should look like the one below.

ros2 service call /spawn turtlesim/srv/Spawn "{x: 0.0, y: 0.0, theta: 0.0, name: ''}"
audrow commented 2 years ago

I bet this is actually an error in https://github.com/ros2/ros2cli. I'm going to move this error over there.