PDA

View Full Version : IK for a robotic arm



feelium
01-22-2005, 09:52 AM
Howdy folks,

I'm trying to create a robot arm that can be animated using IK. The arm contains off-set joints.

Here's the problem: I've created a heirarchy (each joint with IK active for only its axis of rotation (Key-Frames for the others) with a Null at the end. The Null is set to match goal orientation, and is located at the gripper of the robot. I had hoped this would be all that's needed. However, only the gripper Null rotates to match the goal orientation; it has no orientation effect on the rest of the chain. The gripper moves to the right position, but the angle is all wrong. If I make the gripper itself seek the goal, with match goal orientation on, It finds the right position, and takes on the correct orientation, BUT now the last joint doesn't match the orientation of the gripper, and the joint bends in some impossible way. I tried restricting all the non-IK axes to 0.0 limits, but this has no effect.

How can I force the entire arm to match position AND orientation, without any broken joints? I can post a scene/object-file if anyone would like to see what I'm talking about.

Cheers,
J

BTW: I'm in LW 8.0

Dodgy
01-23-2005, 07:02 AM
This sounds very complex, would you be willing to post your scene to me?

feelium
01-23-2005, 08:54 AM
Hey Dodgy,

Thanks for responding... I'll try to attach the scene file in a zip below. Excuse the crappy models; they're just placeholders.

Cheers/

feelium
01-26-2005, 06:19 AM
Does anyone have any idea how to do this? I can't find anything in the documentation that addresses this.

Cheers/

pooby
01-26-2005, 07:05 AM
I had a look, but to be honest, I couldn't figure out what it is that you're after.
If you explain it again exactly, I'm sure whatever you want is possible

feelium
01-26-2005, 08:45 AM
Hey Pooby, thanks for responding..

I'll give you an example... I would like the tip of the robot to be at a specific point determined by the goal null.. I would ALSO like the gripper to be facing along say the X-axis (determined by the rotation of the goal null). The robot has 7 joints, so it should have no problem taking on any position and orientation within reach.

Right now, the gripper takes the correct position, but it won't face along the x axis, or any arbitrary axis I would like to specify. If I translate the goal null, the gripper should only translate in World coordinates. If I rotate the null, the gripper should only rotate. When you translate the goal null now, the gripper translates in world coords, but it also rotates.

If I make the gripper match goal orientation, it behaves properly... however (!!) now the joints don't respect their limits... a rotary joint should rotate only in one axis... it now rotates about all axes to match the orientation.

In effect, forcing the gripper to match orientation and position should constrain the rest of the arm to take on a different configuration... it doesn't seem to here.

Hope that's enough. :) If not I'll put together a couple of example pictures to illustrate.

/Cheers

pooby
01-26-2005, 08:53 AM
Ok.. I see..
The problem is.. Match goal in Lightwave, to put it technically, is rubbish.
Match goal happens after IK, so will not share into to any other chains.
It's the same with orient constraint and point constraint.. It's one of lightwave's shortcomings..

I'll have a quick look again and see if I can think of something else to do..

ps

One big problem is that you have so many IK parts, it's going to be a nightmare controlling rotations and flipping problems.. I think you may be better off having some joints FK and have IK controlling the general placing that keeps the end where you want it.

feelium
01-26-2005, 10:54 AM
Agreed about the solution stability. With 7-degrees of freedom there're lots of solutions to any position and orientation. I intend for most uses to lock one of the joints, reducing it to a 6-dof robot. Doing that will help with stability in the solution.

Thanks for your description... what's happening makes perfect sense if it's happening after and outside the IK calculations.

Thanks for your help! I may have to write my own IK solver plugin if there's no way around it. Ugh.

Anyway, if you can think of anything let me know. Thanks again.

/Cheers

Rory_L
01-26-2005, 11:53 PM
Why don`t you use the Match Goal Orientation plugin and put it on the Layer 8 object?

As a rule, you should steer clear of Lightwave`s Match G Orientation and use the free plugin instead. It has a before or after IK option; and objects with it applied to them motion bake nicely.

Cheers,

R

feelium
01-29-2005, 12:39 PM
Thanks for the suggestions... it looks like the MatchGoalOrientation plugin is working to some extent. I'll have to keep experimenting with it as it seems to still break the joints sometimes.

Anyway, Thanks for your help folks.

/Cheers

Marvin Miller
02-01-2005, 05:21 PM
Have you tried IK Booster?

I tried a different set-up. I used your model, added a null, moved it next to the gripper, made a new hierarchy (starting with the null, then to the gripper all the way down the line), then applied IKB to the entire thing.

I also disabled the rotation pivot points that were not supposed to be in use. Activate the Rotation tool and in the bottom left corner for each object you can turn off(or on) Heading, Bank, and Pitch.

IKB can be a little tricky at first, but once I started playing with the controls it is quite managable. It helps to use straight down views (Top, Right, Back) some of the time.

The attached scene file shows a little of what I did.

I hope this helps, I had a few extra minutes to look around on the forum today; but in any case this, has given me an idea for a tutorial, so stay posted for more.