Converting Cartesian space trajectory into joint space trajectory
I am Converting Cartesian space trajectory into joint space trajectory using trac_ik. I am using following function
tracik_solver.CartToJnt(joint_guess,ee_pose,joint_angle);
The code is borrowed from here
I noticed that the converted trajectory is not smooth and too noisy. I cropped the complete trajectory in order to report here. Please see the attached picture of the trajectory.
In the picture above, real_traj_ik
represents the trajectory after converted from real Cartesian trajectory. The real Cartesian trajectory was recorded from baxter robot. generated_traj_ik
represents trajectory, which was converted into joint space, from a trajectory, generated by smoothing the real Cartesian trajectory.
The trajectories are attached below. Please have a look.
Comments (2)
-
Account Deactivated -
Account Deactivated - changed status to invalid
For > 6-DOF robots there are multiple IK solutions. You aren't guaranteed to just run IK on a bunch of Cartesian end points and get back deterministic joint values when there are multiple valid solutions.
- Log in to comment
1) Are you using the Minimum Distance criteria? It looks as if you are using the (default) Speed criteria. Try this:
TRAC_IK::TRAC_IK tracik_solver(chain_start, chain_end, urdf_param, timeout, eps, TRAC_IK::Distance);
The Distance criteria always runs IK for the full timeout to find as many solutions as possible then sorts them. So play with the timeout as needed (i.e. increasing to 10 or 15ms might help find better solutions).
2) There are better ways to ensure smoothness, like solving a trajectory forwards and backwards and finding the best point to merge the two together. I have something like this as part of the v2.0 keep promising people but never have time to pull together for a standalone delivery.
Good luck.