Incorrect service autocompletion
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 262
- Forks
- 228
- Avg merge
- 23h 15m
- Merged PRs (30d)
- 12
Description
It seems that the service autocomplete is not behaving entirely correctly. I have moved this issue from https://github.com/ros/ros_tutorials/issues/136#issue-1040427338, opened by @kurshakuz.
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
xafter above statement, produces different output:ros2 service call /spawn turtlesim/srv/Spawn xros2 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: ''}"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ros2 service call autocompletion path described in the issue and reproduce the tab-completion commands using turtlesim/srv/Spawn. Compare the generated multiline output with the expected quoted mapping, and verify that the corrected command executes without the reported YAML scanner error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100