PDA

View Full Version : Phoenix Inverse Kinematics Port



zhanx
10-07-2009, 12:14 AM
First this is a work in progress. I.E I don't have my SSC-32 yet (its in the mail). And i need to get another 22 Servos to 100% debug the code.

Right now it compiles and Outputs the "right stuff". But with a twist. My robot uses 32 servos on 8 eights. (thats four servos per leg with 8 legs for the mathematically challenged).

I use an Arduino cause its easy and i got like 5 RBBB's laying around.

So I took zenta's code and ported it over to the Arduino Custom C language

Now it wouldn't be took hard to pull the extra lines out if there is enough interest for me to do so.

Mind you this is just the IK code so far and it compiles out at 14 almost 15k.

Let me know.

Zenta
10-07-2009, 12:44 AM
Hi and welcome!

Your project sounds very interesting and ambitious. What servos are you planning to use? Sounds like you are going for a 4 DOF leg. May I ask where you are placing the extra joint? Did you also solve the kinematics for the extra joint? I'm working/planing for a 4 DOF per leg on a hexapod myself, so I'm a bit curious ;). Have you made one leg already? Pictures are highly appreciated!

BTW, if the code you've ported are based on the Basic Atom Pro code made for Phoenix thats Xan's work and he deserve the credit.

Looking forward to read and see more of your project.

Good luck!

-Zenta

Quantum
10-07-2009, 01:43 AM
SkyNet bot in the works?

Adrenalynn
10-07-2009, 02:02 AM
Welcome to the forum!

>> and it compiles out at 14 almost 15k.

On the Arduino?

zhanx
10-07-2009, 07:49 AM
Ok i updated my code header to put credit to KAN.

zenta - it 4DOF works in processing but i have the wait and see attitude for real world test.

i am going with HS-485HB servos. i need 32 of them so yea.. a bit pricey hence no metal gears for right now.

if you look at a spider for the leg structure the joint after the Tibia is the Metatarsus then the claws. so i called my join the Metatarsus.

I got the base code to pose the thing by controlling each individual servo and then outputting the pose to my computer. Which i can then pass back if need be in frames of motion.

If my IK code port doesnt work out.


Also this is my first robot.

Adrenalynn - I am using RBBB arduino's with amtel 328's they got about 30k of storage space for the program. I might be adding 1 meg of I2C memory to store poses and routines if the IK doesnt workout.

Quantum the last teriminate i watch was T2 so i guess i got to google that.

zhanx
10-08-2009, 12:36 PM
Here is a couple of screen shots of my processing, i inverted the mouse and never fixed it.

http://www.zhanx.net/main/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=5105&g2_serialNumber=1

http://www.zhanx.net/main/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=5109&g2_serialNumber=1

but the code is way simple compare to using it on a bot.

zhanx
10-10-2009, 10:41 AM
think those servos will be fine? My body is 3/16 laser cut Plexiglas. its very light. I can go to say HS-625MG or the HS-645MG but i figured it would be overkill.

Adrenalynn
10-10-2009, 11:08 AM
>> think those servos will be fine?

Nope! But no body wants to hear that, so no one points it out any more.

zhanx
10-10-2009, 11:47 AM
>> think those servos will be fine?

Nope! But no body wants to hear that, so no one points it out any more.

good point. Should i look into the metal geared ones then? I figure the power to weigh ratio should be fine. But i couldn't find any real data on how they would last in continuous operation.

Rather buy once than keep replacing over and over. I am more of a fix it right once than fix and repeat type

Adrenalynn
10-10-2009, 12:06 PM
Personally, I doubt you'll find that the metal gears are your issue here. I think you'll find that the power-to-weight isn't so fine. But that's one of those things that people tend to learn "the hard way".

Can you find an example anywhere on any forum where such a bot was [successfully] built with 485's (aka 475's with a new sticker on them)?

zhanx
10-10-2009, 12:13 PM
Seems like they are using the 645MG mostly or a combination of 475's at the hip joints and 645 on the limbs themselves. Either way i only ordered enough for one set of joints so i can test them.

recommend servo to go with so i don't have the first bot blues from buying the wrong ones? I would rather be out a 130 bucks than 500.

Adrenalynn
10-10-2009, 12:44 PM
645's are generally considered the minimum for walking 'bots for weight-bearing joints.

After having played for awhile with "smart servos" (like the AX-12's), I'm surprised that PWM servos are even still being made though.

Quantum
10-10-2009, 01:25 PM
The one issue that I could see plane/helicoptor pilots immediatly dismiss smart servos for is the daisy chain. If for some reason one goes down the others might as well.

Plus I would assume recievers and transmitters would get a little more pricey but I dont think this would matter as much.

Adrenalynn
10-10-2009, 01:33 PM
Ok - let me amend that (although I disagree with point in the first since you can have n# of busses with one servo on them, each independent)

Given that we're on a robotics forum and not an R/C helicopter forum - I'm surprised that PWM servos are still being purchased by roboticists.

If I were on an R/C Flight forum, and it weren't ENTIRELY off-topic, I would note that actually transmitters and receivers should be LESS expensive, not more, since the processing required to send serial is substantially less than PWM - and that the reliability would increase given a scalable bus. But since I'm not, I won't. ;)

zhanx
10-10-2009, 01:53 PM
If i change to AX-12's it will add another 1436. to this project. while i am not on a budget for it. I know for a first robot project thats well more than i would recommend spending.

I may have to redesign my legs for now to cut out one servo and make it 24 servos instead of 32. just to make sure i can do it with the minimum servo since i know my second leg joint will be a high stress joint as it is right now.

lnxfergy
10-10-2009, 01:57 PM
recommend servo to go with so i don't have the first bot blues from buying the wrong ones? I would rather be out a 130 bucks than 500.

The questions then are:

1) What's your payload?
If all you are doing is carrying an Arduino and 10 minutes worth of battery, your requirements will be much less than if you need to carry 60 minutes worth of battery.

2) What sort of walking gait do you want to do?
In theory you have more legs in contact with the ground at any given time than a hexapod, so each leg doesn't need to be as strong. If all you ever want to do is a single leg ripple gait, each leg can be less powerful than if you were going to do a quad-pod gait (we call it a tripod gait on a hex, when it moves 3 legs at a time, so I'm gonna call 4 legs at a time on an octopod a qaud-pod gait).

3) How long are your linkages?
Longer legs need more powerful servos to move them (since a load at the end effector will cause more torque on a longer linkage).

-Fergs

Adrenalynn
10-10-2009, 01:57 PM
Are you certain, given that you haven't had any walker experience, that such an aggressive project is the right place to start?

zhanx
10-10-2009, 02:26 PM
The questions then are:

1) What's your payload?
If all you are doing is carrying an Arduino and 10 minutes worth of battery, your requirements will be much less than if you need to carry 60 minutes worth of battery.

2) What sort of walking gait do you want to do?
In theory you have more legs in contact with the ground at any given time than a hexapod, so each leg doesn't need to be as strong. If all you ever want to do is a single leg ripple gait, each leg can be less powerful than if you were going to do a quad-pod gait (we call it a tripod gait on a hex, when it moves 3 legs at a time, so I'm gonna call 4 legs at a time on an octopod a qaud-pod gait).

3) How long are your linkages?
Longer legs need more powerful servos to move them (since a load at the end effector will cause more torque on a longer linkage).

-Fergs

payload is one ping sensor, one RBBB arduino, mini breadbroad, ps2 wirelesss adapter and plug. SSC-32 and the two batteries. One for control and the other for the servos.

body and legs are 3/16 Plexiglas, all joints are 3" on center eye to eye.

unfortunately i only got a choice of r/c NiCad batteries due to my location till may.

Gaits are for now going to keep 4 legs on the ground till after i get all the bugs workout and testing of the capabilities mapped out.

Adrenalynn, this will be my first project i didnt need a plasma cutter anda tig welder. I hope/have confindence i can handle the coding side of it just fine. Besides how else is better to learn than to fix what you did wrong? (hopefully not costing a ton in the long run).

i know your thinking i am crazy.

i'll sleep on it. I need to get up at 4am to go run.

zhanx
10-16-2009, 02:20 AM
Ok, just ordered 24 servos 645MG. Hopefully by the time i get these in my re-cut body will be in. ( for some reason the left side had zero holes).

While my code seems to "work". I am redoing it. Am i off in my thinking of this:
lift leg then do motion, complete motion on all servo's but the one next to the hip to complete the raise or lower of the body. Or should i keep the motion moving with all the joints at the same time till its compete?

zhanx
10-16-2009, 12:46 PM
This may seem like a no brainer but i am asking anyways. Where relative to the robot did everyone start their x.y,z.

I am thinking X = movement outward of the legs on the right, -X left side, Y up and down and Z forward backward. i may have ported over the code but I need a better grasp of the kinematics so i can make sure what i did works as its suppose to. Or is xyz relative to what the maker choses it to be, everyone having their own preference.

lnxfergy
10-16-2009, 12:58 PM
Depends on your background.

For those of us that started with rovers that were constrained to plane, and doing all planing in 2D, its lightly that we think of X as the forward movement direction, and Z as up, leaving Y to be determined based on whether you want a right handed or left handed coordinate system....

However, if you come from a kinematics background, the 2-joint part of the leg is the most interesting, and thus walking robots often are labeled with the X coordinate going out of the body along the leg, the Y coordinate going from ground to sky along the leg (here, leg means the "reference leg", and again, many ways to do it), and thus if we think of leg protruding from the body and perpendicular to the direction of forward motion, Z becomes the the axis parallel to forward motion (I believe Xan/Zenta use this convention).

-Fergs

zhanx
10-16-2009, 01:12 PM
thanks lnxfergy, your description is what i was thinking just not put in to words so nicely.


However, if you come from a kinematics background, the 2-joint part of the leg is the most interesting, and thus walking robots often are labeled with the X coordinate going out of the body along the leg, the Y coordinate going from ground to sky along the leg (here, leg means the "reference leg", and again, many ways to do it), and thus if we think of leg protruding from the body and perpendicular to the direction of forward motion, Z becomes the the axis parallel to forward motion (I believe Xan/Zenta use this convention).

is exactly what i was thinking. My forward kinematics math works out fine for me. Now I need to double tap my IK that got my white board filled up. Then maybe Xan or Zenta can pipe in and tell me if i am thinking right after i get it done.