Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Controller manager failed to start controller in realtime loop.

I'm trying to control the joints of my robot in gazebo using gazebo_ros_contol. However, every time i launch my simulation i get the following error:

[FATAL] [1582914730.942896966, 0.314000000]: Failed to start controller in realtime loop. This should never happen.

This error comes up 6 times(# of joints =6), after which i get the following message every few seconds in my command prompt:

Node::Advertise(): Error advertising a topic. Did you forget to start the discovery service?

My launch file can be seen below:

<arg name="namespace" default="simplemodel"/>
<arg name="cmd_timeout" default="0.5"/>
<arg name="x" default="1"/>
<arg name="y" default="1"/>
<arg name="z" default="0.1"/>

<include file="$(find sim)/launch/the_one.launch">
    <arg name="namespace" value="$(arg namespace)"/>

<group ns="$(arg namespace)">

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value=""/> 

    <node name="spawn_vehicle" pkg="gazebo_ros" type="spawn_model"
          args="-urdf -param robot_description -model my_vehicle
                -gazebo_namespace /$(arg namespace)/gazebo
                -x $(arg x) -y $(arg y) -z $(arg z)"/>

    <node name="controller_spawner" pkg="controller_manager" type="spawner"
          args="$(find sim)/config/config.yaml"/>


</launch> The_one launch file can be be seen bellow:

<arg name='namespace' default='my_vehicle'/>

<group ns="$(arg namespace)">
    <param name="robot_description" command="$(find xacro)/ $(find sim)/urdf/cat797.xacro"/>

    <node name="vehicle_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
        <param name="publish_frequency"  value="30.0"/>


Part of my config file can be seen bellow:

    type: joint_state_controller/JointStateController
    publish_rate: 30

    type: effort_controllers/JointPositionController
    joint: jointfour
    pid: {p: 1.0, i: 1.0, d: 0.0}

    type: effort_controllers/JointPositionController
    joint: jointfive
    pid: {p: 1.0, i: 1.0, d: 0.0}

Since the URDF is pretty repetitive, here is a joint, transmission, and gazebo_ros_control code:

<joint name="jointeight" type="continuous">
       <origin rpy="0 0 0" xyz="0.08 0 0"/>
       <parent link="front_left_wheel_hinge"/>
       <child link="front_left_wheel"/>
       <axis xyz="-1 0 0"/>
       <limit effort="10" velocity="100"/>

<transmission name="jointnine_transmission" type="SimpleTransmission">
        <joint name="jointnine">
        <actuator name="jointnine_motor">

    <plugin name="gazebo_ros_control" filename="">

What I've tried:

  • Un-grouping the launch file and adding namespace tags to individual nodes(same error)
  • Pausing the simulation (controllers load and start, however using "rostopic list" only shows /joint_state topic, and no topics for the other joints, using rosservice, it was seen that non of the other controllers are running)
  • adding namespace to gazebo_ros_control and config file brings the following error:

    [WARN] [1582915496.881255, 0.191000]: Controller Spawner couldn't find the expected controller_manager ROS interface

System Configuration:

  • Ubuntu 18.04 LTS (64-bit OS)
  • ARMv8 Processor
  • ROS Melodic 1.14.3
  • Gazebo version 9.0.0