Controller Spawner couldn't find the expected controller_manager ROS interface.

asked 2019-02-20 12:08:49 -0500

Chirag gravatar image

Hello! I am getting this error

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

while launching a urdf in gazebo. I am new to ROS and have looked for a solution but couldn't find it. A similar question is asked here. I have done everything suggested in that link and the libjoint_state_controller.so file is present at opt/ros/kinetic/lib. I have added the gazebo plugin in my .xacro file.

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/mushak</robotNamespace>
    <robotParam>/mushak/robot_description</robotParam>
  </plugin>
</gazebo>

This is the .launch file.

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <group ns="/mushak"> 
      <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find mushak_pkg)/urdf/mushak_model.xacro'" />
         <arg name="x" default="0"/>
         <arg name="y" default="0"/>
         <arg name="z" default="0.2412"/>

<!-- Spawn the robot model -->
         <node name="mybot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
      args="-urdf -param robot_description -model mushak -x $(arg x) -y $(arg y) -z $(arg z)" />

<!-- Load controllers -->
         <rosparam command="load" file="$(find mushak_pkg)/config/config.yaml" />

<!-- Controllers -->

         <node name="controller_spawner" pkg="controller_manager" type="spawner"
    respawn="false" output="screen" ns="/mushak"
    args="
    joint_state_controller
    joint1_position_controller
    joint2_position_controller
    joint3_position_controller
    joint4_position_controller
    joint5_position_controller
    joint6_position_controller
    --timeout 50
    ">
       </node>

       <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
    respawn="false" output="screen">
           <remap from="/joint_states" to="/mushak/joint_states" />
       </node>

  </group>

</launch>

The model is opening in rviz without any error.

This is the output when I run

rospack find joint_state_controller 

/opt/ros/kinetic/share/joint_state_controller

I am getting the following error in the terminal in which the gazebo world in running:

[ERROR] [1550681387.800721476, 9.313000000]: GazeboRosControlPlugin missing <legacyModeNS> while using      DefaultRobotHWSim, defaults to true.
This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead.
If you do not want to fix this issue in an old package just set <legacyModeNS> to true.

[FATAL] [1550681387.918475260, 9.313000000]: Could not initialize robot simulation interface

I would be glad if someone can help me with this.

edit retag flag offensive close merge delete