0
$\begingroup$

Rosanswers logo

I'll try to keep this very concise. After doing the MoveIt setup assistant wizard for a new robot, I wanted to simulate the MoveIt-Gazebo integration. This repository has all the modifications I needed to make to get it working-ish: https://github.com/dhiegomaga/MoveitArm-Example

robotic_arm_control.yaml :

joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50

arm_position_controller:
  type: effort_controllers/JointTrajectoryController
  joints:
    - joint_1
    - joint_2
    - joint_3
    - joint_4
    - joint_5
    - joint_6

  constraints:
    goal_time: 2.5                   # Override default
    stopped_velocity_tolerance: 1.0 # Override default
    joint_1:
      trajectory: 1.0   

controllers.yaml :

controller_list:
  - name: arm_position_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
      - joint_1
      - joint_2
      - joint_3
      - joint_4
      - joint_5
      - joint_6

However, it is using "effort_controllers/JointTrajectoryController", but I would like to control using position.

But when I change to type: position_controllers/JointTrajectoryController, like it is done here, I get the following error:

[ERROR] [1597152510.808588978, 48.242000000]: Unable to identify any set of controllers that can actuate the specified joints: [ joint_1 joint_2 joint_3 joint_4 joint_5 joint_6 ]

[ERROR] [1597152510.808635527, 48.242000000]: Known controllers and their joints:

How do I change to position control without getting such error?


Originally posted by db on ROS Answers with karma: 138 on 2020-08-11

Post score: 3


Original comments

Comment by gvdhoorn on 2020-08-11:\

But when I change to type: position_controllers/JointTrajectoryController

where did you change type (ie: in which file)?

You cannot directly load ros_control controllers on the MoveIt side.

Comment by db on 2020-08-11:
it was on robotic_arm_control.yaml

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The solution was to update the URDF file generated to support position control instead of effort control by Gazebo.

This is described here

I also installed the position control libraries, although I am not sure that was also necessary:

sudo apt install ros-melodic-joint-*

Originally posted by db with karma: 138 on 2020-08-11

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.