So, I have a line like this in my example:
nodl_export_node_description_file(nodl/fake_imu.nodl.xml)
This installs the file and an ament_index marker file to:
$ tree install/
install/
├── ros2launch_security_examples
│ └── share
│ ├── ament_index
│ │ └── resource_index
│ │ ├── nodl_desc
│ │ │ └── ros2launch_security_examples
...
│ └── ros2launch_security_examples
│ ├── nodl
│ │ ├── fake_imu.nodl.xml
...
The ament_index marker file contains:
$ cat install/ros2launch_security_examples/share/ament_index/resource_index/nodl_desc/ros2launch_security_examples
share/ros2launch_security_examples/nodl/fake_imu.nodl.xml
share/ros2launch_security_examples/nodl/imu_sink.nodl.xml
But if I run ros2 nodl I get:
$ ros2 nodl show ros2launch_security_examples
ros2launch_security_examples has no NoDL files in its ament index.
The expected behavior is that it finds these files, but it does not.
If I move the .nodl.xml files out of the subdirectory, then everything works:
$ ros2 nodl show ros2launch_security_examples
{'name': 'imu_sink', 'executable': 'imu_sink', 'actions': {}, 'parameters': {}, 'services': {}, 'topics': {'imu': {'name': 'imu', 'type': 'sensor_msgs/msg/Imu', 'role': <PubSubRole.SUBSCRIPTION: 'subscription'>}}}
{'name': 'fake_imu', 'executable': 'fake_imu', 'actions': {}, 'parameters': {}, 'services': {}, 'topics': {'imu': {'name': 'imu', 'type': 'sensor_msgs/msg/Imu', 'role': <PubSubRole.PUBLISHER: 'publisher'>}}}
Based on the documentation of nodl_export_node_description_file() and the contents of the ament_index file, I would have expected any hierarchy of directories for the nodl description files to be ok. But the python library (and therefore the cli tool) seem to expect all description files to be in the root of the package's share directory:
https://github.com/ubuntu-robotics/nodl/blob/3457cbf9242738ab831f84a0360cffb175d1f415/nodl_python/nodl/_index.py#L38
So is this expected behavior or maybe a bug?
So, I have a line like this in my example:
This installs the file and an
ament_indexmarker file to:The
ament_indexmarker file contains:But if I run
ros2 nodlI get:The expected behavior is that it finds these files, but it does not.
If I move the
.nodl.xmlfiles out of the subdirectory, then everything works:Based on the documentation of
nodl_export_node_description_file()and the contents of theament_indexfile, I would have expected any hierarchy of directories for the nodl description files to be ok. But the python library (and therefore the cli tool) seem to expect all description files to be in the root of the package's share directory:https://github.com/ubuntu-robotics/nodl/blob/3457cbf9242738ab831f84a0360cffb175d1f415/nodl_python/nodl/_index.py#L38
So is this expected behavior or maybe a bug?