Author Topic: inverse kinematics for a articulated robot-URGENT  (Read 5661 times)

0 Members and 1 Guest are viewing this topic.

Offline VishTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
inverse kinematics for a articulated robot-URGENT
« on: July 15, 2008, 04:49:02 PM »
hi

can anyone provide me with the inverse kinematic solution for a articulated robot...i have banged my head a lot and am not able to get through....


if someone is really looking to help..ther might be some reward as well.....reply to this thread...its urgent..

thanks

vish

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: inverse kinematics for a articulated robot-URGENT
« Reply #1 on: July 16, 2008, 06:46:10 AM »
You might check out this project.


Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: inverse kinematics for a articulated robot-URGENT
« Reply #3 on: July 16, 2008, 08:10:37 AM »
hi

can anyone provide me with the inverse kinematic solution for a articulated robot...i have banged my head a lot and am not able to get through....


if someone is really looking to help..ther might be some reward as well.....reply to this thread...its urgent..

thanks

vish

Could you provide us the robot shape at least. Each robot has a different solution. And most cases dont have an algebric solution at all(theoretically, because in practice the enginner usually design a "solve-able" robot).
A.I.(yes those are my initials)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: inverse kinematics for a articulated robot-URGENT
« Reply #4 on: July 19, 2008, 12:10:31 PM »
You should post a FBD first, and work from there.

http://www.societyofrobots.com/robot_arm_tutorial.shtml

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: inverse kinematics for a articulated robot-URGENT
« Reply #5 on: July 26, 2008, 02:27:28 AM »
I solved it barely knowing what Inverse Kinematics was. It should be fairly easy to figure out if you know some trigonometry. Of course, it depends on the complexity of the shape. What i was solving was a 3DOF leg for a legged robot.

This is my solution in Java (hope you can make out how it works):
Code: [Select]
import java.lang.Math;

public class Leg {
    public double TipX, TipY, TipZ; //3D coordinate for where the legs tip will be calculated to be.
   
    public double KneeX, KneeY, KneeZ, CoxaX, CoxaZ; //Coordinates for joints in the leg.
   
    public double Coxa, Femur, Tibia; //Angles for the joints in radians
   
    public double Distance, Distance2D; //Variables needed in the calculation, Distance2D is the distance from the legs attachment point to the tip projected to a XZ plane
   
    public boolean Calculate() {
        Distance2D = Math.sqrt( Math.pow( TipX, 2 ) + Math.pow( TipZ, 2 ) );
       
        if (TipX < 0.0) Distance2D = -Distance2D;
       
        Distance2D -= 50.0;
       
        if ((Distance2D > 150.0)) {
            return false;
        }
       
        if ((Distance2D < -150.0)) {
            return false;
        }
       
        if (Distance2D != 0.0) {
            Coxa = Math.asin( TipZ / (Distance2D + 50.0) );
        }
        else {
            Coxa = 0.0;
        }
       
        Distance = Math.sqrt( Math.pow( Distance2D, 2 ) + Math.pow( TipY, 2 ) );
       
        if ((Distance > 150.0) | (Distance < 50.0)) {
            return false;
        }
       
        if (Distance2D >= 0.0) {
            Femur = (Math.acos(TipY / Distance) + Math.acos((Math.pow(50,2)+Math.pow(Distance,2)-Math.pow(100,2))/(2*50*Distance)));
        }
        else {
            Femur = (-Math.acos(TipY / Distance) + Math.acos((Math.pow(50,2)+Math.pow(Distance,2)-Math.pow(100,2))/(2*50*Distance)));
        }
       
        Tibia = Math.acos((Math.pow(50,2)+Math.pow(100,2)-Math.pow(Distance,2))/(2*50*100));
       
        KneeX = Math.cos(Femur - (Math.PI / 2)) * 50.0 + 50.0;
        KneeY = -Math.sin(Femur - (Math.PI / 2)) * 50.0;
        KneeZ = Math.cos(Coxa - (Math.PI / 2)) * KneeX;
        KneeX = -Math.sin(Coxa - (Math.PI / 2)) * KneeX;
        CoxaZ = Math.cos(Coxa - (Math.PI / 2)) * 50.0;
        CoxaX = -Math.sin(Coxa - (Math.PI / 2)) * 50.0;
       
        return true;
    }

    public void SetPosition(int x, int y, int z) {
        TipX = (double)x;
        TipY = (double)y;
        TipZ = (double)z;
    }
   
    public void SetPosition(double x, double y, double z) {
        TipX = x;
        TipY = y;
        TipZ = z;
    }
   
    public void IncPosition(int x, int y, int z) {
        TipX += (double)x;
        TipY += (double)y;
        TipZ += (double)z;
    }
   
    public void IncPosition(double x, double y, double z) {
        TipX += x;
        TipY += y;
        TipZ += z;
    }
   
    public boolean Calculate( int x, int y, int z ) {
        TipX = x;
        TipY = y;
        TipZ = z;
       
        return Calculate();
    }
   
    public boolean Calculate( double x, double y, double z ) {
        TipX = x;
        TipY = y;
        TipZ = z;
       
        return Calculate();
    }
}

The dimensions of the leg is following:
Length of coxa (from attachment point for the leg to the next joint): 30 mm
Length of femur: 50 mm
Length of tibia: 100 mm
« Last Edit: July 26, 2008, 02:37:03 AM by Fredrik Andersson »
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod