You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the arguments to create are processed, $(var initial_pose) is expanded to [...'-x','0.0','-y','0.0','-z','0.2'] (i.e. multiple list items) for command execution. This is so that the create node executable recognises the command arguments.
Additionally, when executed with the -d flag, launch should log the command as an array of strings, as this is what is supplied to the operating system call. Example provided below.
process details: cmd=['/path/to/ros_gz_sim/lib/ros_gz_sim/create','-name','robot','-param','robot_description','-x','0.0','-y','0.0','-z','0.2','--ros-args','-r','__node:=robot_spawner','--params-file','/tmp/launch_params_958ns6s1'], cwd='None', custom_env?=True
Actual behavior
When the arguments to create are expanded $(var initial_pose) is expanded to [...'-x 0.0 -y 0.0 -z 0.2'] (.i.e a single list item) for command execution. The create command does not recognise these as a single argument string.
I had to hack the code to force it to log the command being executed. There is an implementation there, but I could not find how to turn it on. This implementation logs the command executed as a joined string, which hid this issue.
I suspect this may also be an issue for yaml, but did not test.
The text was updated successfully, but these errors were encountered:
rodericktaylor
changed the title
Substitutions in XML are not
Substitutions in XML are not expanded intuitively when used for the purpose of executing programs.
Jun 7, 2023
Bug report
Required Info:
Ubuntu 22.04
Source build (humble)
ros2/launch aed025e
default, eprosima fastdds
N/A
Steps to reproduce issue
add_model_launch.xml
ros2 launch my_package add_model_launch.xml
Expected behavior
When the arguments to create are processed, $(var initial_pose) is expanded to [...'-x','0.0','-y','0.0','-z','0.2'] (i.e. multiple list items) for command execution. This is so that the create node executable recognises the command arguments.
Additionally, when executed with the -d flag, launch should log the command as an array of strings, as this is what is supplied to the operating system call. Example provided below.
Actual behavior
When the arguments to create are expanded $(var initial_pose) is expanded to [...'-x 0.0 -y 0.0 -z 0.2'] (.i.e a single list item) for command execution. The create command does not recognise these as a single argument string.
I had to hack the code to force it to log the command being executed. There is an implementation there, but I could not find how to turn it on. This implementation logs the command executed as a joined string, which hid this issue.
Additional information
A work around is to ensure substitutions expand to strings without spaces in them.
i.e.
I suspect this may also be an issue for yaml, but did not test.
The text was updated successfully, but these errors were encountered: