0
$\begingroup$

Rosanswers logo

Hi there everyone, my question is this, how do I get MoveIt gripper_action or GripperCommand to control a ros_control position_controllers/JointPositionController type joint?

My configuration was talked about here

I have configured a controllers.yaml file in the MoveIt robot config package folder. like this:

ros_control_namespace: /
#controller_manager_ns: controller_manager
controller_list:
 - name: arm_controller
   action_ns: follow_joint_trajectory
   type: FollowJointTrajectory
   default: false
   joints:
     - jt1_joint
     - jt2_joint
     - jt3_joint
     - jt4_joint
   allowed_execution_duration_scaling: 1.2
   allowed_goal_duration_margin: 0.5

 - name: gripper_controller
   action_ns: gripper_action
   type: GripperCommand
   default: false
   parallel: false
   joints:
      - jt5_joint

initial:  # Define initial robot poses.
  - group: jaycar_arm
    pose: home

The above doesn't work, it says

[ WARN] [xxxx.yyyy]: Waiting for gripper_controller/gripper_action to come up
[ERROR] [xxxx.yyyy]: Action client not connected: gripper_controller/gripper_action

My jt5_joint is running as a ros controller as a position_controllers/JointPositionController which i can control using

rostopic pub /gripper_controller/command std_msgs/Float64 "data: 0.1"

How do i convert to something that MoveIt can use or configure MoveIt so it works with my joint control type?

I tried using moveit_ros_control

<param name="moveit_controller_manager" value="moveit_ros_control_interface::MoveItControllerManager"/>

instead of

<param name="moveit_controller_manager" value="moveit_simple_controller_manager/MoveItSimpleControllerManager"/>

But that didn't help.

I'm hoping someone would be able steer me in the right direction. It seems that MoveIt only supports two types of controllers, the FollowJointTrajectory and GripperCommand. I cant find a list of supported controllers that match the ros_control controllers of which there are heaps of different types. Am I missing something? Thanks heaps in advance.


Originally posted by Zonared on ROS Answers with karma: 48 on 2020-09-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I don't know if I should answer my own question or not, so I'll post a comment until told otherwise.

I solved my problem. What I did is configure "trajectory_execution.launch.xml" file in MoveIt package to use MoveItSimpleControllerManager

   <arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />

Then I changed my ros_controller yaml file in my robot hardware package for joint 5 to be a JointTrajectoryController, this like:

gripper_controller:
  type: position_controllers/JointTrajectoryController
  joints:
    - jt5_joint

It seems MoveIt only support JointTrajectoryController controllers, I'm probably wrong but I couldn't get it to work any other way. The main thing is, it works now, i can control all four joints for arm movement and gripper to grip things all from RVIZ. Next thing is to control is via python.


Originally posted by Zonared with karma: 48 on 2020-09-22

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by fvd on 2020-09-22:
Answering your own question is perfectly fine. Please feel free to post and accept it. Thanks for documenting your solution.

Comment by Zonared on 2020-12-05:
Answer is in my own comment.

$\endgroup$

Your Answer

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