# A little help w/ ik

Hey guys,

I got a 4wd1 I mounted an L6 on.
I want to put a small camera on the arm and remote control it by radio. Hardware, electronics, and programming no problem… At least until I got to programming the code for controlling the arm. Turns out Inverse Kinetics is what I need to move the arm and keep the camera oriented. I ain’t no math wiz, (@#!*\$), so I was wondering if there’s some place I can get a basic idea on this. Something like IK for dummies or something. If I could get the formulas and understood them I could step it from the ABB to the SSC32 I imagine. I ain’t afraid of a little work, I just need to know where I can get started on the theory.

Jim Shaffer

You can find a good description here:
en.wikipedia.org/wiki/Inverse_kinematics

Also lynxmotion.com has some interesting excel tools to help you experiment IK with the L5/L6 arms

Thanks Amir,

Shoulda known to start with wikipedia, the first 2 external links were very enlightening. I’m still trying to understand it but, once I got a working algorythm it should go smoothly. I already checked out those links on lynxmotion - I’ve got less knowledge of excel than trigonometry. (almost none)

If anybody out there’s got an algorythm or an atomBasic program for the lynx 6, I’d be truly grateful. I can get the arm to move, I can use the ABB to reproduce sequences recorded by RIOS, it’s nice to see it move but it’s not useful. It’s surprising to me that lynxmotion doesn’t make such information or code available. After all the lynx arm is what started it all, no?

Jim Shaffer

Now what!?!

Been checking out the math functions in the BasicAtom, they got sin() and cos(), that’s it. Even those functions work with a 256 degree circle. I finally found some algorithms - that work with acos() and atan() . Now I’m sure if I’d’ve studied trig at school, but I never made it past algebra. The only solution I see is a brain transplant. NO, not my brain (wish that were possible), I guess I’ll have to change microprocessors. I imagine the atom bot board will work just as well with a BX24 no? At least that puppy can do the math (I’m more familiar with it’s programming too).

Still needin’ help, any suggestions would be appreciated.

Jim Shaffer

Basic Atom only supports integer arithmetics.
You can always try to approximate atan(). I am not sure polynomial approximation would work.

There is another algorthim called CORDIC (COordinate Rotation DIgital Computer). It is used to approximate trigonometric functions and used in the early pocket calculators.

A google search on CORDIC and you will find what you are looking for.
Try this site:
dspguru.com/info/faqs/cordic2.htm

Of course the other solution is to find a microcontroller that supports floating point arithmetics.

For my project (humanoid upper torso) I am using a PC (mini-itx) connected to the SSC-32 to drive the servos. All the IK is done by the PC.

If you are just intending to keep the camera oriented relative to the vehicle, then this should be achievable with Pythagoras but if you are aiming to try and remain relative to a given 3d point in space then you have a task that a microcontroller will struggle with.

I.K. would be overkill for the first and likely not possible for the second unless you have some accurate form of distance measurement, i.e. 3D imaging, range finding etc.

Took a look at my box o’ sensors and found an analog tilt sensor (±60Âº range <.1 Âº resolution). When I decided to add one to my Robonova I bought 2 - boy am I glad I did. If I place the sensor under the ‘hand’, it should be a piece of cake to keep the camera at that given angle no matter how the arm moves. Now that I think of it, I wonder what it would be like to have an arm with a precision tilt sensor on each segment. I mean, apart from the obvious mathematical relief on the processor I imagine much more ‘natural’ movement algorithms could be developed. Hmmm I feel a future project taking shape. Don’t get me wrong, I got nothing but respect for those who can do the math, but I don’t use math when I reach out for a beer can. Don’t need trig to use my limbs to walk. I know this won’t get me industrial precision - I think I can settle for less than perfect.

To see the bot in question ->
amodedoma.net/bots/4WD1L6.JPG

Thanks for the help guys - I think I’m on the right track now.
Write if you got something to add.

Jim Shaffer

Hi Jim,

Nice 4WD1 bot there.

Would it be ok for us to add it to the “Projects” section of the website?

lynxmotion.com/ViewPage.aspx … ID=20#4wd1

Post it if you like, it was my first robot kit - bought it a couple of years back from an online shop in Valencia Spain. It’s gone through a lot of changes. It’s a great little platform. Got the arm later and when I got bored with that I bought the deck and joined the 2. Don’t know if you can see it very well but I use alot of 3M’s super velcro to hold things together, makes changing things a breeze - sensors, electronics, battery packs, things like that. The sensor pod on the blue micro servo has a Devantech srf02 ultrasonic ranger and a tpa81 radiant heat array on I2C. I use it to track heat sources (people) and identify their height to react differently, little people or animals playfully, big people fearfully. It gets hung up on luke warm radiators sometimes. Now I want to put a micro camera on the arm so I can remote control it, or maybe I leave it autonomous and use the camera to see people interact with the bot at the LAN parties I go to. Got lots of other bots and projects but this guy’s the most versatile.

Jim Shaffer

Yours is a cool rover. My own rover (two wheeled W.A.L.T.E.R.) is always going through changes, and is in the midst of major changes from servos to motors for locomotion now, as well as other changes. Rovers really can be fun to work with, as I have found out with W.A.L.T.E.R.

W.A.L.T.E.R. has velcro in several places for the same reasons you use it, especially since he is my experimental platform and gets all new things before any other robot will.

I am going to put one of those TPA81’s on the new sensor/gripper arm I am working on for W.A.L.T.E.R. and he’ll use it to follow interesting warm bodies as well as other things.

W.A.L.T.E.R. is my only robot at present, but I have all the brackets to finish building them up for The BiPod now, which is my next project.

8-Dale

If your interested check the latest mod to my bot ->

Still working on getting the arm to do what I want, but I made a major improvement on panning my sensor pod. Before I had it mounted on a micro servo on the inclining head that comes with the bot. Upon working with moving the arm I found it getting in the way. So seeing as the gripper on the inclining head had a rotating disk on its top. I thought to velcro it there and viola, one less servo and a much lower profile. Now it looks like a one eyed scorpion that opens and closes it’s pincher while it looks left to right. By the way, anybody see the Follow Me Rover article in Robot magazine summer '07 edic.? My bot achieves the same, much more elegantly (my opinion). I’m no big fan of parralax - BS got no ADC.

Wow! That is quite the rover.

A rought way to perform a kinematic inversion can be to use a transpose Jacobian matrix instead of a pseudo-inverse Jacobian. Take in account that the robot is underactuated with respect to the cartesian task you want to perform (it has only 5dof)…
Maybe that using the Jacobian transpose you can implement the IK even on an Atom but I’m not so sure…

Andrea