AndrejOrsula / pymoveit2

Basic Python interface for MoveIt 2 built on top of ROS 2 actions and services
BSD 3-Clause "New" or "Revised" License
137 stars 54 forks source link

No IK solution found for round-off values of position and orientation #61

Open emp002 opened 5 months ago

emp002 commented 5 months ago

Hello, I am trying to control a 4dof scara robot with this package. Below I have attached the model of my robot. First, I tried using ex_fk.py to get end effector position by giving joint angles as arguments. Then, I used the same values with 12 decimal places to get joint angles using ex_ik.py. It works perfectly, it gives joint angles close to [0, 0, 0, 0] but with decimal places. Then again, I used the same values but rounded-off to 1 decimal. I am getting an error that "IK computation failed! Error code: -31."

I have also attached the screenshot of my robot description terminal and the ex_ik launch terminal. What could be the reason that it is not calculating IK with less decimal places?

image

Screenshot from 2024-04-18 12-58-13 image

AndrejOrsula commented 5 months ago

Hello,

You could try increasing the tolerances of relevant methods (refer to tolerance, tolerance_position and tolerance_orientation arguments). But I am unsure if all planners (MoveIt) support them. Good luck!