Open
Description
After the refactoring done by ros-controls/ros2_control#1638, the switch_controller
service has a working timeout for each controller. This time is hardcoded within the spawner.py to 5s.
If the simulation is started paused, like with omitting the -r
argument for gz_sim.launch.py
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[PathJoinSubstitution([FindPackageShare('ros_gz_sim'),
'launch',
'gz_sim.launch.py'])]),
launch_arguments=[('gz_args', [' -v 4 empty.sdf'])]),
then the CM services are started but the update method is not called yet. This leads to running into the timeout
[ruby $(which gz) sim-1] [ERROR] [1727769677.868599778] [controller_manager]: Switch controller timed out after 5.000000 seconds!
[spawner-4] [ERROR] [1727769677.869656433] [spawner_joint_state_broadcaster]: Failed to activate controller
The same happens if a running simulation is paused and a service call to the CM is done.