rosbridge: populating trajectory_msgs/JointTrajectoryPoint fields in JSON
How do I publish correctly to the trajectory_msgs/JointTrajectoryPoint through rosbridge?
I guess I am doing something wrong in creating the trajectory_msgs/JointTrajectoryPoint Message. Here the python code for creating the message:
import json
topic = "goal"
data = {
"op":"publish",
"topic":topic,
"goal":{
"trajectory":{
"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:":[0.293,-0.514,0.125,0.2647,1.8632,-1.5809],
"velocities":[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
#"positions:":[0.2,-0.5,0.0,0.1,1.9,-1.7],
#"velocities":[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
}
}
}
print(data)
R = json.dumps(data)
It arrives in the topic though the fields joint_names and points stay empty.