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

ROS MoveIt GripperCommand directed to position_controllers

asked 2020-09-20 22:10:09 -0500

Zonared gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-22 21:33:21 -0500

Zonared gravatar image

updated 2020-09-22 21:34:12 -0500

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.

edit flag offensive delete link more

Comments

Answering your own question is perfectly fine. Please feel free to post and accept it. Thanks for documenting your solution.

fvd gravatar image fvd  ( 2020-09-22 22:01:27 -0500 )edit

Answer is in my own comment.

Zonared gravatar image Zonared  ( 2020-12-05 14:26:50 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-09-20 22:10:09 -0500

Seen: 739 times

Last updated: Dec 05 '20