controller_manager spawner chain launch failed
Describe the bug When I fellow the instruction on this, i launch a list of controller with prefix "--activate-as-group". After this, I got an error
To Reproduce
- prepare urdf which use a chain controller and write a correct ros2_controll.yaml and launch file
- In launch file have this part:
spawner = Node(
package='controller_manager',
executable='spawner',
name=controller,
arguments=[
controllers_list,
'--param-file',
controller_config_file,
'--activate-as-group',
],
)
ld.add_action(spawner)
- launch it!
You can use my repo mcknum_test.launch.py
in "dev" branch!
Expected behavior
the launch fail and you will see:
[spawner-3] Traceback (most recent call last):
[spawner-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py", line 175, in __init__
[spawner-3] self.__node = _rclpy.Node(
[spawner-3] ValueError: invalid node name: node name must not contain characters other than alphanumerics or '_', at ./src/rcl/node.c:163
[spawner-3]
[spawner-3] During handling of the above exception, another exception occurred:
[spawner-3]
[spawner-3] Traceback (most recent call last):
[spawner-3] File "/opt/ros/humble/lib/controller_manager/spawner", line 33, in <module>
[spawner-3] sys.exit(load_entry_point('controller-manager==2.51.0', 'console_scripts', 'spawner')())
[spawner-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/controller_manager/spawner.py", line 174, in main
[spawner-3] node = Node("spawner_" + controller_names[0])
[spawner-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py", line 185, in __init__
[spawner-3] validate_node_name(node_name)
[spawner-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/validate_node_name.py", line 34, in validate_node_name
[spawner-3] raise InvalidNodeNameException(node_name, error_msg, invalid_index)
[spawner-3] rclpy.exceptions.InvalidNodeNameException: Invalid node name: node name must not contain characters other than alphanumerics or '_':
[spawner-3] 'spawner_wheel_fl_controller wheel_fr_controller wheel_rl_controller wheel_rr_controller mcknum_controller'
[spawner-3] ^
It seems that the spwaner only support launch one controller once which is not same as its param discription. Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Version Humble
- Anything that may be unusual about your environment
Additional context Add any other context about the problem here, especially include any modifications to ros2_control that relate to this issue.
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.
@Demonmasterlqx have you solved it? The repo is not accessible any more
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.