Welcome! Log In Create A New Profile

Advanced

Inverse Kinematics Application ?

Posted by eci22 
Inverse Kinematics Application ?
April 23, 2016 06:21AM
Hi All,

I was wondering if anyone could clarify how inverse kinematics are actually applied in a practical application, here's the scenario I'm having trouble understanding.

Say you have a regular 2 wheel drive car type robot. You press a key on an input device say forward on an app, the controller reads the input and sets the appropriate inputs on a H-bridge and you have motion. When the input gets changed the H-Bridge controller is adjusted accordingly.

Now lets say you have a quadruped robot. You press forward on an input device and this is where things get hazy for me as far as I know Inverse Kinematics Happens and the bot moves forward.

I get the idea that rather than calculate each joint position individually to place a foot, you say where you want the foot position to be and IK will work out the angles of the joints. But what are you actually sending to the bot ? and what does it do with those inputs ? A command that says forward ? Where you want each foot to end up ? From the reading I've done, I've seen people say things like- I solved the IK on an excel sheet- but Im failing to see how that actually translates onto something like an arduino can use to actually get motion. I know I'm missing something quite fundamental, so If anyone can explain this in laymen's terms it would be much appreciated.

Thanks for your time
Re: Inverse Kinematics Application ?
April 23, 2016 06:45AM
Inverse Kinematic is an algorithm that will calculate the needed rotations of joints, so the end of a limb can reach a given position.
The algorithm needs to know the mechanical setup of the limb, lengths of parts, limitations of joints and the start state. The calculation itself is pretty complicated, most of the time simple matrix calculations do not suffice and quarternions have to be used. Also, depending on the setup, there can be multiple solutions and instable solutions.
This is pretty advanced stuff, you can see it beeing used in animated movies where most of the characters shown are animated using IK. Afaik only Pixar mainly relies on FK, which requires realy good animation skills.
After the algorithm has done its job you know the new angles for the joint servos.

Edited 1 time(s). Last edit at 04/23/2016 06:46AM by Srek.


[www.bonkers.de]
[merlin-hotend.de]
[www.hackerspace-ffm.de]
Re: Inverse Kinematics Application ?
April 23, 2016 06:56AM
Hi Srek,

Thanks for your reply, I can see how it would be used in a software environment in games, animation etc, because all the objects have the same reference space (world co-ordinates) So giving a body some co-ordinates to reach for would work as it knows what those co-ordinates represent. But how does this work in the real world, with real objects where there is no such thing as model/world space and there related transforms. Ideally I'd like to create something like a quadruped and have it controlled using IK, but im not sure how on a theoretical level that would work.

Cheers
Re: Inverse Kinematics Application ?
April 23, 2016 07:08AM
It works exactly the same. The difference is in how you determine the wanted end position. In a virtual environment you have complete infomation about elevation and surface angles of the surrounding area. In real life you need sensors and advanced algorithms to gain that information, otherwise your quadruped will just stumble along like a zombie.


[www.bonkers.de]
[merlin-hotend.de]
[www.hackerspace-ffm.de]
VDX
Re: Inverse Kinematics Application ?
April 23, 2016 08:58AM
... to perform a straight line with IK you have to divide the line in short segments and move all joints synchronous to reach the next segment endpoint - the single segment can be a curve, so the division has to be really fine, so it will behave like moving straight ... the same for arcs ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Inverse Kinematics Application ?
April 24, 2016 06:54PM
Back in 2003, I was designing a simple hexapod. To keep it simple, it would have a tripod gait, so there were two sets of legs that would be 180 degrees out of phase, driven by a single motor. I never did complete that project, although I have a prototype leg somewhere.

Anyway.... I didn't have access to any Inverse Kinematics software, so rolled my own using Excel.

Given a set of segment lengths and axle XY positions, it would calculate the corresponding XY end-point of each leg component for each degree (arbitrary... there's no reason why you can't go finer or coarser) of rotation of an input shaft. This allowed me to see graphically how the "foot" would move. I then added a column of "desired" XY foot positions, and calculated a column of errors, and a sum-of-squares total error. Finally, I told Excel's "Problem-solver" to minimise the total error by changing the values of the segment lengths and axle positions. An example spreadsheet is attached.

This would find quite a number of different fairly-good solutions, but not necessarily the optimum solution. OTOH, only a bit of simple computational geometry was needed... no heavy-duty maths. I also had a version which drew the leg components as an Excel graph, and a version written in C that used genetic algorithms to look for solutions, but can't find those right now. If there's interest, I could dig them out. Conceivably, something like that could generate OpenSCAD source or similar for a 3D printed design.

There's no reason why this approach couldn't be extended to 3D motion if desired.
Attachments:
open | download - qr2.xls (566.5 KB)
Re: Inverse Kinematics Application ?
April 24, 2016 08:26PM
Inverse kinematics is used in the equations to derive joint angles from desired position of the end effector. An algorithm that for example, causes a robot to translate in different directions uses IK to achieve joint positions which are setup in a walking cycle.
I have a 3DOF (3 degrees of freedom per leg) quadropod, it uses an Arduino based board to receive commands via radio serial link. These are simply a set of joystick and button inputs sent via another arduino, or I had a python script running on my pc to bridge a wireless playstation controller and send the same format commands. Anyway the onboard Arduino reads these commands and modifies the walk cycle as needed. The walk cycle calculates the needed positions of the legs (as well as the body, which has it's own set of kinematic relationship in terms of the legs as a whole). The walk cycle uses IK to compute joint positions, and uses it's knowledge about the specific position in the walk cycle to choose IK solutions closest to the nearest position if there are multiple solutions.
I used a project called NUKE [vanadiumlabs.github.io] which has all the hard stuff done for you, I just had to set it up for my hardware.

[www.youtube.com]

Edited 1 time(s). Last edit at 04/24/2016 08:27PM by Koko76.
Sorry, only registered users may post in this forum.

Click here to login