Description
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.