Ask Your Question

Revision history [back]

Make sure the namespace is same in the gazebo plugin and the controllers.yaml file. This namespace is equal to the name of the robot in your URDF file. Also make sure the hardwareInterface type (eg. PositonJointInterface) matches the corresponding controller of the joint in controllers.yaml file you created.

For eg. my gazebo plugin has this tag: <robotnamespace>/arm_mesh</robotnamespace> where arm_mesh is the name specified in my URDF.

My controllers.yaml file is like this:

arm_mesh:

Make sure the namespace is same in the gazebo plugin and the controllers.yaml file. This namespace is equal to the name of the robot in your URDF file. Also make sure the hardwareInterface type (eg. PositonJointInterface) matches the corresponding controller of the joint in controllers.yaml file you created.

For eg. my gazebo plugin has this tag: <robotnamespace>/arm_mesh</robotnamespace> where arm_mesh is the name specified in my URDF.

My controllers.yaml file is like this:

arm_mesh:arm_mesh: robotic_arm_controller: type: "position_controllers/JointTrajectoryController" .......

My launch file to activate controller manager: <launch> <rosparam file="$(find PKG_NAME)/config/controllers.yaml" command="load"/>

<node name="robotic_arm_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" **ns="/arm_mesh" args="robotic_arm_controller" **=""/>

</launch>

Make sure the namespace is same in the gazebo plugin and the controllers.yaml file. This namespace is equal to the name of the robot in your URDF file. Also make sure the hardwareInterface type (eg. PositonJointInterface) matches the corresponding controller of the joint in controllers.yaml file you created.

For eg. my gazebo plugin has this tag: <robotnamespace>/arm_mesh</robotnamespace>

where arm_mesh is the name specified in my URDF.

My controllers.yaml file is like this:

arm_mesh:

  robotic_arm_controller:

 robotic_arm_controller:
  type: "position_controllers/JointTrajectoryController"

  type: "position_controllers/JointTrajectoryController"
             .......

.......

My launch file to activate controller manager: manager:

 <launch>
     <rosparam file="$(find PKG_NAME)/config/controllers.yaml" command="load"/>

command="load"/>

<node name="robotic_arm_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" **ns="/arm_mesh" args="robotic_arm_controller" **=""/>

ns="/arm_mesh" args="robotic_arm_controller"/>

</launch>

</launch>