Q: How to obtain position-only inverse kinematics w/ trac_ik?

Issue #49 resolved
Joseph Coombe created an issue

Hello, I'm using trac_ik_python for a robot arm.

In certain cases, I'm only interested in achieving a certain end-effector position (do not care what its orientation is).

I've tried set really large orientation bounds - and it has worked for all cases I've tested so far - but I'm not sure if this is the best way.

target_jt_ang = ik_solver.get_ik(seed_state,
    0.45, 0.1, 0.3,  # X, Y, Z end-effector target pos
    0.0, 0.0, 0.0, 1.0,  # rx, ry, rz, rw end-effector orientation < don't care
    0.01, 0.01, 0.01,  # X, Y, Z bounds
    1000, 1000, 1000  # Rotation X, Y, Z bounds
    )

Thank you

Comments (6)

  1. Patrick Beeson Account Deactivated

    That is the best way. Are there are cases where is doesn't work? It should always work, but I haven't done much testing on the swig wrapper that was written by another individual.

  2. Joseph Coombe reporter

    Awesome, I'm still testing to get better insight as to why the solver fails in some cases - not sure if it is related to position-only IK. Will open new issue if I get more information.

    Also, thank you very much for writing this. It is blazingly fast!

  3. Joseph Coombe reporter

    Quick update: I'm a moron. The case where the solver was failing, it was because I was trying to move a position that was physically impossible to achieve with safety limits I had placed on the motors.

    Did not realize this until I tried to manually move the arm through the trajectory myself.

  4. Log in to comment