Can you provide an example of publishing commands using the /arm_controller/command topic in the terminal?
Here's an example of me trying to publish trajectory_msgs/JointTrajectory to the gazebo UR10 robot.
rostopic pub -r 1 /arm_controller/command trajectory_msgs/JointTrajectory "header:
seq:0
stamp:
secs: 0
nsecs: 0
frame_id: ''
joint_names: - 'shoulder_pan_joint, shoulder_lift_joint, elbow_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint'
points:
- positions: [1]
velocities: [1]
accelerations: [0]
effort: [0]
time_from_start: {secs: 1, nsecs: 0}"
The error that I receive is: Cannot create trajectory from message. It does not contain the expected joints.
Could you please provide an example of publishing valid commands to the robot in gazebo?
Update: Posting my yamal file (This is arm_controller_ur10.yamal file found in ur_gazebo)
arm_controller:
type: position_controllers/JointTrajectoryController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
constraints:
goal_time: 0.6
stopped_velocity_tolerance: 0.05
shoulder_pan_joint: {trajectory: 0.1, goal: 0.1}
shoulder_lift_joint: {trajectory: 0.1, goal: 0.1}
elbow_joint: {trajectory: 0.1, goal: 0.1}
wrist_1_joint: {trajectory: 0.1, goal: 0.1}
wrist_2_joint: {trajectory: 0.1, goal: 0.1}
wrist_3_joint: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10
joint_group_position_controller:
type: position_controllers/JointGroupPositionController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
This seems to be more a problem with yaml right now than with anything else.
Several things are not as they should be:
joint_names
should be a list with each joint name as a separate element. You have everything in a single string (which is also missing the end quote btw). That won't work.effort
). So a list with just a1
in it can't work.I'll add my yamal file and sorry some things didn't paste correctly regarding formatting (i.e. missing quotes). Could you show an example of the message regarding listing the joint name and what the vector should look like?