Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Rigging a robot arm (https://simplymaya.com/forum/showthread.php?t=31623)

bobsquish 27-12-2008 12:55 PM

Rigging a robot arm
 
1 Attachment(s)
Im trying to rig a robotic arm and i want it to do a nukber of things.

1. Rotate around a pivot at the shoulder

2. Move away and towards the body using a telescopic-like joint.

3 use the same sort of joint to extend its arm forwards

Any help with this would be appreciated and also how i would easily return it to a default pose also.

I have included a diagram to show you what i want it to do.

Thanks, Ben

Chirone 28-12-2008 03:11 AM

make a skeleton, and parent the parts to the joints.
maybe you can do it in two joints

the first has the shoulder parented to it, that takes care of rotation
the second has some end of the extending part, that takes care of the extending

or you could do the extending part by set driven keys

bobsquish 28-12-2008 10:44 AM

I understand using joints for extending one part but how would i make the arm parts extend in a telescopic way?

if its using set driven keys can you please explain this?

Thanks,
Ben

halfloaf 28-12-2008 02:45 PM

SDK
 
Check out these two 'Set driven Keys' tutorials by Kevin.

SDK1

SDK2

They should provide a good start!

-Jacques

EDIT

This is what I'd do for the extensions...

Parent the bits:

Parent the hand to the forearm, the forearm to the upper arm, the upper arm to the shoulder.

Add attribute:

Depends how much flexibility you want here, but I'll keep it simple'ish.

Select the shoulder, go to "Modify->Add attribute"

In the window, name the attribute something like 'Extension', start value 0, end value 20...You'll see where I'm going with this...'Data type' ->Float

You'll see that the shoulder now has an added attribute on the bottom of the list in Channel Box.

Now, make sure the arm is in the closed position (non-extended), make sure your Extension value is set to '0'.

Go to Animate->Set Driven Key->Set [] (click on the box or tear off the menu)

Load the shoulder as the driver and the upper arm as the driven. In the driver keyable attribute window you will see the 'Extension' attribute, click on it. Highlight all the translate attributes in the driven menu. Click on 'Key'

This tells the Expression attribute that at value 0 those translate attributes values are as you intend for the upper arm to be...

Next, move the upper to the extents of it's extension, and set the Extension value to 10. Click on 'Key' in the Set driven Keys window.

Now do the same for the lower arm, you're value at the end of extension should be 20. Now as you change the value of 'Extension in the Channel Box your arm should extend...!

(Hopefully I got all this right...Doing it from memory!)

You could add an attribute to each arm section say; Upper_Ext, start 0 - End 10. Lower_Ext...etc.

-Jacques.

bobsquish 28-12-2008 06:55 PM

okay, so ive used the set driven key to do the extension and that works brilliantly, however, when i rotate the shoulder the arm parts dont follow but instead move to wierd angles. Any idea?

thanks,
Ben

halfloaf 28-12-2008 07:11 PM

Parenting...
 
Did you parent the parts as suggested toward the beginning of my reply? If yes, you shouldn't have a problem.

-Jacques

Chirone 28-12-2008 07:13 PM

this is most likely to do with the heirarchy that's attached to the shoulder joint

how are the other parts (the telescoping parts) joints to the shoulder?
if they are parented to the shoulder it should be no problem

you may have to do a freeze transformations on them as well

Modify > Freeze Transformations

bobsquish 28-12-2008 07:26 PM

I have parented them, do i need to freeze tramsformations before i set driven keys?

Chirone 28-12-2008 07:29 PM

probably,
do a freeze transformations on the parts now anyway

if it still doesn't fix the problem you'll have to kill the set driven keys and do it again after you've done freeze transformations

bobsquish 28-12-2008 07:34 PM

ok - it wont let me do one now - to kill the set driven keys do i just delete the attribute in the channel box?

bobsquish 28-12-2008 08:58 PM

okay the extension works fine and i can rotate the arm but when i extend it when the arm is rotated say, pointing to the ground the extension still moves the parts along the x axis.

any way to make them extend downwards?

halfloaf 30-12-2008 09:00 AM

If you parented the parts together and set driven keys for all the translate values you shouldn't have a problem. The parenting takes care of the rotation as well. Remember when you parent to make sure you select the 'child' first, then the 'parent'.

If you want to you could attach the .ma file.

-Jacques

bobsquish 30-12-2008 10:29 AM

I think im probably going wrong with the parenting- i tried prenting in two ways, firstly by selecting the shoulder then the upper arm and parenting then the upper arm then the lower arm then parenting ect.

I also tried selecting the hand then the lower arm then parenting and then selecting the lower arm then the upper arm and arenting. But neither worked.

What am i doing wrong?

Chirone 30-12-2008 11:04 AM

maybe it's your parenting? show us a screen shot of your hypergraph or outliner (although i dont think this would have an effect?)

did you try starting again?
parenting before you use set driven keys?
to delete them
select the arm and from the hypergraph click the Input and output connections button
it's the little button at the top that has a little yellow box connected to two grey boxes
it will bring up your set driven keys (i think that's what they are that you see)

it may or may not help but hit Ctrl+Shift+D, go Edit > Delete by type > History on all the blocks that make up the arm
and remember to use freeze transformations too

bobsquish 03-01-2009 03:40 AM

Ive tried the set driven keys process on other objects and i still have the same problem so i think its probably me doing something wrong with the parenting or something - can someone please run me through the process please? thanks for all your help,
Ben


All times are GMT. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018