Ask Your Question
0

Moveit Custom Controller

asked 2020-04-07 16:00:46 -0500

rklutz gravatar image

updated 2020-04-07 16:35:25 -0500

I'm trying to use Moveit and Gazebo with a custom controller provided by my robot's manufacturer. When I launch both moveit(+ rviz) and gazebo and try to plan, I get the following error:

[ERROR] [1586291253.875844268, 5322.770000000]: Unable to identify any set of controllers that can actuate the specified joints: [ right_gripper_l_finger_joint right_j0 right_j1 right_j2 right_j3 right_j4 right_j5 right_j6 ]
[ERROR] [1586291253.875874497, 5322.770000000]: Known controllers and their joints:
controller '/robot/limb/right' controls joints:
  right_j0
  right_j1
  right_j2
  right_j3
  right_j4
  right_j5
  right_j6

Note, that this works when I disable the gripper, meaning that moveit doesn't know what to do with the right_gripper_l_finger_joint. However, I specify the contoller for this joint in my controller manager yaml file like so:

controller_list:
# ... 
  - name: /io/end_effector
    action_ns: right_gripper
    type: sawyer_sim_controllers/ElectricGripperController
    default: true
    joints:
      - right_gripper_l_finger_joint

I've verified that the name and action namespace listed are correct:

>>># rostopic list | grep right_gripper
    /io/end_effector/right_gripper/command
    /io/end_effector/right_gripper/config
    /io/end_effector/right_gripper/state

And if I inspect the running controllers with rosservice call /robot/controller_manager/list_controllers I see my controller running:

controller: 
  - name: "electric_gripper_controller"
    state: "running"
    type: "sawyer_sim_controllers/ElectricGripperController"
    claimed_resources: 
      -  hardware_interface: "sawyer_hardware_interface::SharedJointInterface"
         resources: [right_gripper_l_finger_joint/MAIN_SETPOINT_COMMAND, right_gripper_r_finger_joint/MAIN_SETPOINT_COMMAND]

So, is there a piece here that I'm missing?

Edit:

Somehow I missed this before, but when starting RViz and moveit, it logs the following error:

[ERROR] [1586294845.676943431, 116.035000000]: Unknown controller type: sawyer_sim_controllers/ElectricGripperController

Still not sure what causes this as my ros params seem to be set up correctly and the controller manager knows about this type.

edit retag flag offensive close merge delete

Comments

You're last edit seems to point to a cause here. (I'm assuming) MoveIt doesn't appear to know that type of controller. That would cause it to fail loading that stanza, leading to no controllers for your right_gripper_l_finger_joint, leading to the error message you quoted earlier.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-08 04:19:21 -0500 )edit

Right, I understand that moveit doesn't know about the controller, but given that it is a subclass of EffortJointInterface, it should still be able to work with it, right? Or is it a matter of somehow notifying moveit about it's existence?

rklutz gravatar image rklutz  ( 2020-04-08 12:12:32 -0500 )edit

There's a difference between a MoveIt controller and a ros_control controller. You link to a package providing ros_control plugins/controllers/capabilities.

MoveIt doesn't do anything directly with ros_control controllers.

That may be the main issue here. If sawyer_sim_controllers/ElectricGripperController is actually a ros_control controller, you cannot just use it with MoveIt directly.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-08 12:41:21 -0500 )edit

I'm not sure if MoveIt or ros_control is giving you that "Unknown controller type", here's a trick for improving the verbosity of your terminal. Add to .bash.rc

export ROSCONSOLE_FORMAT='${logger}: ${message}'

More info: http://dav.ee/blog/notes/archives/898

Dave Coleman gravatar image Dave Coleman  ( 2020-04-16 17:37:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-16 17:45:08 -0500

Dave Coleman gravatar image

You're mixing up two types of controller yaml files: MoveIt and ros_control (confusing I know)

Examples: - A ros_control configuration yaml looks like this: rrbot_controllers.yaml - A MoveIt configuration yaml looks like this: panda_gripper_controllers.yaml

They both have a type field, and you just have yours mixed up. For the ElectricGripperController the type should be "GripperCommand". Your other configs in that yaml are wrong also.

Your MoveIt configuration by default uses the MoveItSimpleControllerManager. Its simple, so it only supports two types: "FollowJointTrajectory" and "GripperCommand"

I hope this helps!

edit flag offensive delete link more

Comments

Hey, thanks for looking into this. Since initially asking the question, I modified the parameters specified in my yaml files, but now I'm seeing the problem might be that there is no actionlib server running to handle the gripper commands. I see that moveit expects to find one at the topics found under the action_ns. In my case rethink provides a joint_trajectory_action_server.py script that provides this, but I can't find an equivalent to handle the gripper. The gazebo plugins for my robot do publish/subscribe to /io/end_effector/right_gripper/command, .../right_gripper/state. and .../right_gripper/config. The scripts they provide can use this interface, but I'm guessing Moveit cannot. Sounds like I'll have to write this myself?

rklutz gravatar image rklutz  ( 2020-04-20 15:54:27 -0500 )edit

I'm not sure the specifics of the Sawyer Gazebo implementation. If they didn't include a gripper action server, that was certainly an oversight. Just give Rethink support a call ;-)

Dave Coleman gravatar image Dave Coleman  ( 2020-04-22 18:26:35 -0500 )edit

Haha, I've been on hold for an hour, almost like they went out of business or something...

Anyways, I went ahead and implemented the interface myself. Things seem to be working now. Thanks!

rklutz gravatar image rklutz  ( 2020-04-22 18:39:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-07 16:00:46 -0500

Seen: 73 times

Last updated: Apr 16