yikeyike / CoppeliaSim_TrackedVehicle

RL Based Path Planning for Tracked Vehicle using CoppeliaSIm and Pyrep
0 stars 0 forks source link

How do you fix Jaco IK calculation problem in PyRep? #1

Open HeegerGao opened 4 years ago

HeegerGao commented 4 years ago

Hello, I am also trying to use Jaco in PyRep, but when I tried to solve IK of Jaco in PyRep, it always return an error said:

Traceback (most recent call last):
  File "pr_test.py", line 30, in <module>
    [move(2, -DELTA) for _ in range(20)]
  File "pr_test.py", line 30, in <listcomp>
    [move(2, -DELTA) for _ in range(20)]
  File "pr_test.py", line 25, in move
    new_joint_angles = agent.solve_ik(pos, quaternion=quat)
  File "/home/gck/.local/lib/python3.6/site-packages/pyrep/robots/arms/arm.py", line 130, in solve_ik
    raise IKError('IK failed. Perhaps the distance was between the tip '
pyrep.errors.IKError: IK failed. Perhaps the distance was between the tip  and target was too large.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex

I find that you said the following thing in a commit of your repo:

Dummy tip should be set within feasible region

I think this may have some relationship to my problem. Can you explain it more clearly? Does it mean some problems in my Jaco.ttt file? Could you tell me how did you build your jaco.ttt file? Thank you very much!

yikeyike commented 4 years ago

Sorry for the late reply, hope I can still help you with this issue. Basically, you need to set the target point within the reachable region, so in my case

position_min, position_max = [-0.2, -0.2, 0.3], [0.2, 0.2, 0.8]