Repository navigation
Closed
Labels
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 18.04
- Installation type:
- binaries
- Version or commit hash:
- crystal
- DDS implementation:
- default
- Client library (if applicable):
- n/a
Steps to reproduce issue
Add an env dict to the arguments for a node action and also call the introspector.
launch_description = launch.LaunchDescription()
launch_description.add_action(
launch_ros.actions.Node(
package='py_trees_ros_tutorials',
node_name="one",
node_executable="tree-data-gathering",
output='screen',
env={'PYTHONUNBUFFERED': '1'}
)
)
print(launch.LaunchIntrospector().format_launch_description(launch_description))
Expected behavior
No errors.
Actual behavior
Traceback (most recent call last):
File "/mnt/mervin/workspaces/crystal/py_trees/install/py_trees_ros_tutorials/lib/py_trees_ros_tutorials/tutorial-one-data-gathering", line 11, in <module>
load_entry_point('py-trees-ros-tutorials', 'console_scripts', 'tutorial-one-data-gathering')()
File "/mnt/mervin/workspaces/crystal/py_trees/build/py_trees_ros_tutorials/py_trees_ros_tutorials/one_data_gathering.py", line 123, in launch_main
print(launch.LaunchIntrospector().format_launch_description(launch_description))
File "/opt/ros/crystal/lib/python3.6/site-packages/launch/launch_introspector.py", line 134, in format_launch_description
entity_descriptions = format_entities(launch_description.entities)
File "/opt/ros/crystal/lib/python3.6/site-packages/launch/launch_introspector.py", line 74, in format_entities
result.extend(format_action(cast(Action, entity)))
File "/opt/ros/crystal/lib/python3.6/site-packages/launch/launch_introspector.py", line 114, in format_action
for k, v in typed_action.env.items()]) + '}',
AttributeError: 'list' object has no attribute 'items'
Activity
wjwwood commentedon Mar 18, 2019
Yeah, looks like the custom logic for ExecuteProcess hasn't been updated. My intention was to enable automatic rendering of launch entities, so that the action specific custom code in launch introspector could be removed at some point.
[-]Introspector failing when env is set by the user[/-][+][introspector] failing when env is set by the user[/+]oswinso commentedon Mar 26, 2019
Weird, because I can't reproduce the error on Ubuntu 18.04 on Master. I get the correct output:
stonier commentedon Mar 27, 2019
Yes, also confirmed. Looks like 632ef1f#diff-970fc3c5d394ad33c14e4f9fe55288ceR113 bugfixed it, but this is applied post
v0.7.3which is the version that this bug was reported against. I've tested that one-line patch on the crystal release and verified it works without anything beyond that line.[introspector] bugfix representation when env is set
[introspector] bugfix representation when env is set
nuclearsandwich commentedon Mar 28, 2019
CI for the branch in #220.
nuclearsandwich commentedon Mar 28, 2019
The failures above are down to #169 not being backported. We've ignored them previously because launch wasn't being included in the patch release.
wjwwood commentedon Mar 29, 2019
So we need to backport #169 as well @nuclearsandwich?
wjwwood commentedon Mar 30, 2019
I backported #169 speculatively.
[introspector] bugfix representation when env is set
[introspector] bugfix representation when env is set (#222)
wjwwood commentedon Apr 2, 2019
I'm going to close this since it's fixed on master and it is staged for backport into Crystal as well.