ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

what is the correct frame to give ik goals in?

asked 2013-04-08 20:59:45 -0600

Vivian gravatar image

updated 2013-04-09 17:01:46 -0600

Hi, I have been trying to use using ROS Groovy and the IKfast solver on Ubuntu 12.10, to generate 6DOF IK solutions, and have had some success, in that the robot does move the arm more or less to a point I tell it, if I give it certain quaternions as part of the goal, but am still struggling with getting the right orientation of the tip to the base.

The closest I have come to getting the solution I want is when I provide a quaternion for the goal which I think would be a +90 degree rotation around X, (x=0,y=0.7071,z=0,w=0.7071) but which results in the robot orienting the tool exactly 180 degrees out, on the Z axis.

Unfortunately whenever I attempt to get solutions with an identity quaternion, IK fails. I have actually tried all possible 90 degree transforms (there's 24 of them) to see if I could spot a pattern, but it is eluding me - about half work, and half fail. I expected to see complete failure for rotations around one particular axis, which I thought would then indicate the axis that IKFast considers to be pointing back on along the last link, and always impossible to reach.

What is the correct way to ensure the tool's orientation is pointing the way you want? I think that the goals are supposed to be relative to the base of the Ik chain, right? Is there a preferred way top set up the robot's frames? It is difficult for me to get all frames oriented with the world because of the way the meshes I am working with are oriented - and apparently reorienting them would then throw the moment of inertia figures off.

Any hints would be much appreciated!

Vivian

edit retag flag offensive close merge delete

Comments

1

Are you sure the goal poses do not result in singular configurations, e.g. alignment of two axes of rotation? Not sure how if IKFast redefine the axes, but it is a goof idea to use Denavit-Hartenberg method to choose axes.

Boris gravatar image Boris  ( 2013-04-09 17:40:19 -0600 )edit

It would also help if you add kinematics scheme of your manipulator.

Boris gravatar image Boris  ( 2013-04-09 17:49:40 -0600 )edit

Thanks for the suggestion but turns out the way the axes are defined makes no difference - ikfast solves it just the same. See the rest of my answer below.

Vivian gravatar image Vivian  ( 2013-04-30 15:36:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-30 15:32:37 -0600

Vivian gravatar image

In answer to my own question, for anyone else that encounters this:

The quaternion you need to give as a goal for an end effector is in the frame of the base joint, not the relative change in position of the base joint compared to the tip.

Eg1. say, you have a base join with Z up and x forward, and the tip with a relative rotation of 90 degrees around the X axis compared to the base joint, when it is in the rest pose (ie,all joints 0). In this first case, to maintain that same starting orientation when moving the tip, you must give a quaternion that is a 90 degree rotation around the X axis, as the goal.

Eg2. say, you have a base join with Z up and x forward, and the tip has exactly the same orientation, with Z up and X forward.

In this second case, to maintain that same starting orientation when moving the tip, you must give the identity quaternion, ie. (x=0, y = 0, z = 0, w = 1).

Thanks for the suggestions Boris, but it turns out the configuration I was using was fine. The problem I was having was that the model that I was regenerating an IK solution for had been changed from the original model that the old solution had been calculated for, so there was a mismatch between what the scripts that drive the robot were expecting and the actual IK results being created. (the scripts were assuming identity quaternion would maintain the starting orientation, which was not the case for the newly generated solution)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-04-08 20:59:45 -0600

Seen: 384 times

Last updated: Apr 30 '13