Forums Niryo One Troubleshooting Trajectory timeout using Python API Reply To: Trajectory timeout using Python API

Edouard Renard
Keymaster
Post count: 234

If you want to parse some Gcode and execute many move commands quickly, using the Niryo One Python API with move_pose and move_joint is not a really viable solution.

When using move_pose, the Rpi will compute a whole new trajectory, with start and stop accelerations. The whole process (compute traj, send traj, execute traj, return status and message), as you guessed, is quite heavy and not suited for small and very quick trajectories following each other.

If you want to correctly use Gcode, you’ll have to adapt or write some code. I guess one solution could be:

– Create a Gcode parsing program

– Interpolate directly the linear path

– For each point, compute inverse kinematics with the /compute_ik service (already set up when using the Niryo One ROS stack with Moveit)

– Send the IK directly to the “/niryo_one_follow_joint_trajectory_controller/command” topic (see how joint trajectory controller is working with the topic interface)

I haven’t tested it, so I can’t tell if it works well or not.