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

asked 2019-04-23 03:30:12 -0500

OlivieroNardi gravatar image

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 flag offensive close merge delete

Comments

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.

I have tried sending directly the joint states in each iteration with MoveGroupCommander.go() but this results in a really really slow execution

Yes, and that is expected. See #q261368 for why that is.

even if I have removed acceleration/speed limits in joint_limits.yaml

that is actually not a good idea. MoveIt will use defaults in that case which are very likely to be much lower than what your robot can do.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-23 03:43:34 -0500 )edit