MoveIt End effector moves correctly but reports back different orientation

asked 2019-01-23 07:43:05 -0500

Borkr gravatar image

I've got a simulation setup of the Kuka KR6 Agilus running in Gazebo using MoveIt for movement.

In order to move the robot I'm calling MoveGroupInterface::setPoseTarget and MoveGroupInterface::asyncMove(), and to get the current pose I'm calling MoveGroupInterface::getCurrentPose.

There is an inconsistency between the pose that is set and the pose that is reported from MoveIt. The image below shows the pose I'm requesting and the pose I'm getting after the robot has reached its pose.

Pose

I guess the pose is correct, but why the difference in the quaternions representing orientation? I don't specify the end_effector_link in any calls to setPoseTarget() or getCurrentPose().

edit retag flag offensive close merge delete

Comments

Without any changes it now reports the following orientation (0.0, 0.7071, 0.0, 0.7071) with the same desired position and desired orientation. Reported position is still correct.

Borkr gravatar imageBorkr ( 2019-01-23 07:49:02 -0500 )edit

The problem is with the last joint. When joint values are calculated it is set to arbitrary positions as it doesn't influence the actual pose of the robot per se, as it has no attachments to it, but is somehow included in the calculation when asking for current pose. Should this be reported?

Borkr gravatar imageBorkr ( 2019-01-23 08:17:13 -0500 )edit

Did you manage to fix this?

fvd gravatar imagefvd ( 2019-02-19 03:36:37 -0500 )edit

Not really a fix, but orientations became accurate when a tool was included in the kinematic chain. From what I can recall about the problem, it would seem that the joint position of the last joint didn't matter as the end-point was located in the center of that joint. However, from what I can understand, it should matter. Seemingly it did for FK but not IK. This problem no longer occurred when I added a tool to the kinematic chain.

Borkr gravatar imageBorkr ( 2019-10-21 05:50:45 -0500 )edit