When ros2_control_node exits — for example when no gripper is attached and on_configure fails — the three spawners launched by robotiq_control.launch.py keep polling /controller_manager/list_controllers indefinitely instead of shutting down with the rest of the launch. The user has to Ctrl-C the whole launch, and until they do the processes stay up and spam the logs.
The connection failure itself is now reported cleanly (an actionable message naming 24 V power, RS-485 wiring, com_port / slave_address / baudrate), so what remains is the launch never terminating.
Reproduce
Bring up with no gripper attached:
ros2 launch robotiq_description robotiq_control.launch.py com_port:=/dev/ttyUSB0
Observed
[spawner-3] [INFO] [spawner_joint_state_broadcaster]:
waiting for service /controller_manager/list_controllers to become available...
[spawner-4] [WARN] [spawner_robotiq_gripper_controller]:
Could not contact service /controller_manager/list_controllers
[spawner-5] [WARN] [spawner_robotiq_activation_controller]:
Could not contact service /controller_manager/list_controllers
... repeating every ~10 s, indefinitely
Analysis
- The launch file declares no
on_exit action tying the spawners' lifetime to ros2_control_node.
controller_manager/spawner loops by default with no absolute timeout — only a periodic retry with a log line.
Possible fixes
- In the launch file: register an event handler on
OnProcessExit(ros2_control_node) that emits a Shutdown event. A dozen lines of Python, local to this repo.
- Upstream in
ros2_control: give spawner a --max-retries / --max-wait-time that makes it bail after N attempts. Cleaner conceptually, but needs an upstream PR.
Option 1 is enough to make a failed bringup exit cleanly; option 2 would be a community contribution on top.
When
ros2_control_nodeexits — for example when no gripper is attached andon_configurefails — the three spawners launched byrobotiq_control.launch.pykeep polling/controller_manager/list_controllersindefinitely instead of shutting down with the rest of the launch. The user has to Ctrl-C the whole launch, and until they do the processes stay up and spam the logs.The connection failure itself is now reported cleanly (an actionable message naming 24 V power, RS-485 wiring,
com_port/slave_address/baudrate), so what remains is the launch never terminating.Reproduce
Bring up with no gripper attached:
Observed
Analysis
on_exitaction tying the spawners' lifetime toros2_control_node.controller_manager/spawnerloops by default with no absolute timeout — only a periodic retry with a log line.Possible fixes
OnProcessExit(ros2_control_node)that emits aShutdownevent. A dozen lines of Python, local to this repo.ros2_control: givespawnera--max-retries/--max-wait-timethat makes it bail after N attempts. Cleaner conceptually, but needs an upstream PR.Option 1 is enough to make a failed bringup exit cleanly; option 2 would be a community contribution on top.