Skip to content

Launching a paused simulation makes spawners from the same launchfile fail #421

Open
@christophfroehlich

Description

@christophfroehlich

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 -rargument 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.

Same as ros-controls/gazebo_ros2_control#380

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions