Passing a string to ExecuteProcess arguments behaves unintuitively
Open
@sloretz is already working on this.
Since Apr 2, 2020.
enhancement
- Dominant language
- Python
- Stars
- 155
- Forks
- 182
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
In Node constructor, arguments takes an arguments of list of strings. Passing a string to arguments typechecks but provides unexpected results, treating the string as a sequence of single-character arguments.
e.g the following code:
driver_node = LifecycleNode(package='ros2_ouster',
node_executable='ouster_driver',
node_name=node_name,
output='screen',
emulate_tty=True,
parameters=[parameter_file],
node_namespace='/',
arguments='__log_level:=debug'
)
This displays no error message but the mistake is visible when the process dies.
[ERROR] [ouster_driver-1]: process has died [pid 309341, exit code -15, cmd '/opt/ros/master/install/lib/ros2_ouster/ouster_driver _ _ l o g _ l e v e l : = d e b u g --ros-args -r __node:=ouster_driver --params-file /opt/ros/master/install/share/ros2_ouster/params/os1.yaml -r __ns:=/'].
Passing a string to arguments (or similar places) should either:
- Split the string on spaces
- Alert the user (
ArgumentErrorseems apt)
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.
Assessment
This issue has not been assessed yet.