ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is best practice to make your Gazebo package publish its controllers under the same name as your real robot. Your simulation is much easier to change than the real robot driver.

Your leftarm_controller is probably defined in the controllers.yaml of your gazebo package. Change leftarm_controller to say scaled_pos_joint_trajectory and make sure the type of controller matches. You can find the type of controller in your robot's driver package (in your case it is position_controllers/JointTrajectoryController).

If you have multiple robot arms, you will want to start your robot driver in a namespace, so it advertises on different topics than the other arm. In that case its controller action will be at e.g. left_arm/scaled_pos_joint_traj_controller/follow_joint_trajectory. You can reproduce this in your gazebo package's controllers.yaml by nesting the tags:

left_arm:
  scaled_pos_joint_trajectory_controller:
    type: position_controllers/JointTrajectoryController
...

An easy way to solve this problem would have been to search for leftarm_controller in your workspace until you find the yaml file it is defined in. Ctrl+Shift+F searches through your workspace in Visual Studio Code, for example.