# [python] Planning and executing a trajectory with joint_states waypoints.

Hi people,

I am using a neural network to generate a sequence of joint states which represent a trajectory for my robotic arm (7 DOF - franka emika panda). I have tried sending directly the joint states in each iteration with MoveGroupCommander.go() but this results in a really really slow execution (even if I have removed acceleration/speed limits in joint_limits.yaml). So I would like to generate a trajectory in advance and THEN execute it in one shot, hoping this will result in a faster/smoother execution (if you have other suggestions... they're welcome).

How should I proceed? I have found nothing in the docs that helped me out. I have found cartesian waypoints trajectories but that's not what I need, I specifically need joint_states. I think I may use IK but given it's 7DOF I don't know if that would be as accurate.

note: I am working only with moveit simulations. I have no access to the real robot.

Thanks for the help.

Best,

Oliviero

edit retag close merge delete

I don't have time for a full answer, but: look into JointGroupPositionController from ros_control if you really need an on-line approach. Otherwise put together a trajectory_msgs/JointTrajectory and submit that as a goal to the FollowJointTrajectory action server that your simulated robot (most likely) exposes.