Robotics StackExchange | Archived questions

Understanding effort_controllers/JointTrajectoryController

The manipulator I have has a gripper that is controlled by effort_controllers/JointTrajectoryController as shown below

gripper_controller:
  type: effort_controllers/JointTrajectoryController
  joints:
    - gripper_finger_joint_l
    - gripper_finger_joint_r
  gains:
    gripper_finger_joint_l: {p: 1000.0, d: 1.0}
    gripper_finger_joint_r: {p: 1000.0, d: 1.0}

The topic shows this information for commanding the gripper

>rostopic pub /arm_1/gripper_controller/command trajectory_msgs/JointTrajectory "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
joint_names:
- ''
points:
- positions: [0]
  velocities: [0]
  accelerations: [0]
  effort: [0]
  time_from_start: {secs: 0, nsecs: 0}" 

It isn't clear to me what needs to be done to open and close the gripper quickly. What is the syntax for the above command?

Asked by CroCo on 2023-03-04 06:55:04 UTC

Comments

Answers

Not a complete answer as I'm going from memory, but your JointTrajectory message needs to provide a list of all joint_names, e.g. gripper_finger_joint_l and gripper_finger_joint_r as strings,

points is a list of TrajectoryPoints. where each point provides the data for a single knot point at a given time from start.

For a trajectory, you'd need at least two points

Each knot point needs to provide the commanded positions, (and vel and acc for higher order splines). So for two joints, positions should be an array of two values. If you don't provide all required data for joint names and positions, then the command won't work.

Asked by dcconner on 2023-03-08 10:30:11 UTC

Comments