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

Understanding effort_controllers/JointTrajectoryController

asked 2023-03-04 05:55:04 -0500

CroCo gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-08 09:30:11 -0500

dcconner gravatar image

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-03-04 05:55:04 -0500

Seen: 360 times

Last updated: Mar 08 '23