Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calc_inverse_kinematics does not return valid joints for a legitimate xyz #81

Open
zainabalasadi opened this issue Jun 19, 2021 · 2 comments

Comments

@zainabalasadi
Copy link

I am attempting to use solve_ik_head_down() as written in the machine vision object pickup example here. It seems as though calc_inverse_kinematics() is failing to return joint angles for valid xyz cartesian positions. Below is my code:

"""
Move Eva to the given position. 
position: Catersian position, with respect to the robot's origin (in metres)
angle: Angular rotation of axis 6 in degrees
"""
def go_to_position(self, position, angle):
   // solve_ik_head_down is as in the link above
   success_ik, joints_ik = self.solve_ik_head_down(self.get_current_pos(), angle, position) 

   if 'success' in success_ik:
      with self.__eva.lock():
         self.__eva.control_go_to(joints_ik)
         print('Performed move to joint angles ', joints_ik)
         self.set_current_pos(joints_ik)
   elif 'error' in success_ik:
      print('Cannot perform move, error: ', success_ik)
   else:
      print('Attempting to go to joints: ', joints_ik)

I call go_to_position with the following values:

position is x = 0.1, y = 0.0, z = 0.0
angle is 0
self.get_current_pos() is [0.057526037, 0.7658633, -1.9867575, 0.026749607, -1.732109, -0.011505207]

I receive the following JSON message instead of the error format I expect as outlined in the docs. The lack of error messages makes it difficult to understand what is happening.

// format I get
{
  "ik": {
    "joints": [0, 0, 0, 0, 0, 0],
    "result": "ik"
  }
}
// format in docs for errors
{
  "ik": {
    "result": "error",
    "error": MOTION_ERROR
  }
}

Carrying out a calc_nudge() with the same parameters returns valid joints, although again, no error message is displayed when it fails (it just outputs [0, 0, 0, 0, 0, 0], different from what is specified in the docs.

I am using evasdk version 4.1.0. Any help on why calc_inverse_kinematics is not outputting valid joint angles for valid xyz positions would be appreciated.

@LouisBrunner
Copy link
Contributor

Hi @zainabalasadi,

Thank you for your report, could you confirm the Software version of your Eva? (available on your Config page in Choreograph)

@zainabalasadi
Copy link
Author

Hi @LouisBrunner, Eva is running on version 3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants