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

Cannot create trajectory from message. It does not contain the expected joints.

asked 2017-05-04 08:46:29 -0500

waschbaer gravatar image

updated 2021-11-14 09:44:06 -0500

lucasw gravatar image

Command I run in terminal:

$ roslaunch tiago_gazebo tiago_gazebo.launch public_sim:=true robot:=steel

$ rostopic pub /arm_controller/command trajectory_msgs/JointTrajectory "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
joint_names:
- 'arm_1_joint'
points:
- positions: [0.5]
  velocities: [0]
  accelerations: [0]
  effort: [0]
  time_from_start: {secs: 1, nsecs: 0}"

Result from terminal:

[ERROR] [1493904854.162621476, 91.554000000]: Cannot create trajectory from message. It does not contain the expected joints.

However I can see from gazebo simulator there is arm_1_joint by expanding the model of tiago_steel.

How could I solve this problem?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2017-05-18 06:20:06 -0500

msabur gravatar image

updated 2017-05-18 06:28:23 -0500

The controller you are using is this.

if allow_partial_joints_goal: True is not set your have to specify all of the joints in de arm_controller.

Like:

$ rostopic pub -1 /arm_controller/command trajectory_msgs/JointTrajectory "header:
  seq: 0
  stamp:
     secs: 0
     nsecs: 0
  frame_id: ''
joint_names: [arm_1_joint, arm_2_joint, arm_3_joint, arm_4_joint, arm_5_joint, arm_6_joint, arm_7_joint]
points:
- positions: [0.5, 0, 0, 0, 0, 0, 0]
  time_from_start: {secs: 1, nsecs: 0}"
edit flag offensive delete link more

Comments

I have sent joint values from csv file yet i get this error. Please help. I have also set the above constraint true

PS: Only joint 1 and 2 of my robot can be detected

prashanthi tata gravatar image prashanthi tata  ( 2018-12-10 03:12:02 -0500 )edit
0

answered 2020-06-14 07:48:09 -0500

ranjanbatra gravatar image

updated 2020-06-14 23:10:22 -0500

jayess gravatar image

You would see that in certain cases the rostopic pub leads to a syntax " joint_names: - ' ' ". Entering the correct joint names in it will not work and it needs to be in the format "joint_names: [joint1, joint2...so on]"

rostopic pub /panda_arm_controller/command trajectory_msgs/JointTrajectory "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
joint_names: [panda_joint1, panda_joint2, panda_joint3, panda_joint4, panda_joint5, panda_joint6, panda_joint7]
points:
- positions: [1.1,1.2,0.2,0.2,0.2,0.2,0.2]
  velocities: [1,1,1,1,1,1,1]
  accelerations: [1,1,1,1,1,1,1]
  effort: [0]
  time_from_start: {secs: 2, nsecs: 2}"

Hope this helps!

edit flag offensive delete link more
0

answered 2017-06-11 12:47:25 -0500

waschbaer gravatar image

Sorry for the late feedback, I lost my account for a while.

Yes, msabur is correct, one has to give all arm joint names to publish this message.

But, if you want to only control single arm joint with a convenient way, you could go into the tiago workspace and source there, then you rosrun rqt_joint_trajectory_controller AUTO-COMPLETE. So use the rqt gui to see how single joint could move.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-04 08:46:29 -0500

Seen: 2,489 times

Last updated: Jun 14 '20