Converting Cartesian space trajectory into joint space trajectory

Issue #36 invalid
Ravi Joshi created an issue

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. right_arm.png

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)

  1. Patrick Beeson Account Deactivated

    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.

  2. Patrick Beeson Account Deactivated

    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.

  3. Log in to comment