Society of Robots - Robot Forum

Software => Software => Topic started by: TrissT on March 06, 2009, 09:42:48 AM

Title: four bar linkage forward kinematics question
Post by: TrissT on March 06, 2009, 09:42:48 AM
Hi, this is my first post on this forum.

I have a design for a machine with two mutually perpendicular revolute joints, i.e.

a base,

a hinged joint,

an arm,

a hinge perpendicular to the first joint,

second arm.

Using D-H forward kinematics I've got code working using 4*4 transformation matrices.

Now, there's a proposal to change one of the revolute joints to a 4-bar linkage.
All the joints in the new linkage will be parallel to the original axis.

(ASCII art attempt:)

(+ = joint)



 /       \

This means the simple revolute joint must be replaced by four
offset parallel revolute joints, which form a closed loop.

The simplicity of the original arrangement meant it was quite straightforward
to do the kinematics.  The proposed arrangement has me confused.

So, I _think_ I need to replace the simple 4*4 matrix describing a revolute joint,
with a matrix describing the 4-bar linkage.

The treatments I've found are too general for me to figure it out.

Can anyone out there help me?  How do I derive the new matrix?
Or is there a better approach?


Title: Re: four bar linkage forward kinematics question
Post by: sprince09 on March 06, 2009, 11:37:46 AM
I personally don't like the DH approach to solving forward/inverse kinematics problems (though I know many people who do, and I'm not saying it's a bad approach!). I wrote a MATLAB program once upon a time to solve the forward kinematics of any multi-link robot arm... The basic idea behind it is that you specify the axes of rotations for your joints, the length of each link in the arm, and the angles of each joint, and it will spit back the Cartesian coordinates of each point and draw a pretty picture.

So basically, you have your generic transormation matrix:

T =  |1+(1-c)*(ux^2-1)      (1-c)*ux*uy-uz*s        (1-c)*ux*uz + uy*s        0|
       |(1-c)*ux*uy+uz*s      1+(1-c)*(uy^2-1)       (1-c)*uy*uz-ux*s           0|
       |(1-c)*ux*uz-uy*s      (1-c)*uy*uz+ux*s       1+(1-c)*(uz^2-1)           0|
       |0                                    0                                       0                                1|

Where c = cos(a) and s = sin(a) and ux, uy, and uz are the x, y, and z components of the unit vector that your angle is rotating about. So if you had a joint which rotates 30 degrees about the Z axis, a = 30 and u = [0 0 1].

To transform a point in space you do:

new_point = T * point

To get each successive joint location in your arm you do:

position = previous_position + T_previous * T * link_length_vector

The thing I like about this approach is that you only need to specify 1 angle per joint and it's corresponding unit vector. It works equally well in 2D and 3D space and it's pretty straightforward to write an algorithm that will solve the forward kinematics for any number or combination of joint unit vectors, which means you don't have to solve the forward kinematics ever again :)

It also allows you to do gradient tracing algorithms pretty easily instead of deriving the inverse kinematics for every concievable arm geometery. I can post some MATLAB code later that shows some of this stuff when I get home later if you're interested.
Title: Re: four bar linkage forward kinematics question
Post by: csx12 on October 12, 2011, 06:03:56 PM
I would be interested to see what your code exactly does. Because I have a complicated mechanism on which I used DH parameters to generate the forward kinematics and I'd like to compare it to your code.

How would you want to do that?