File Exchange

image thumbnail

3D Puma Robot Demo

version 1.0 (52.3 KB) by

Simulate a 6 link 3D Puma Robot

30 Ratings



View License

This program simulates a 6 link 3D Puma Robot in the robots lab at Walla Walla College. The 3D robot looks "real" thanks to the cad2matdemo program.

The robot currently moves with kinematic control using direct input of joint angles and slider bars (GUI). Some inverse kinematics options are built in but not automated yet (a demo button). A random input is also provided and the robot animates between locations.

There are just two files to use. The main program and the six 3D-links data file that is read in at start up.

Try the "demo" button and the "Random Move" button.

Note: This file will be updated and improved. Comments welcomed.

Comments and Ratings (38)

Utkarsh Singh

Pasc Peli

Pasc Peli (view profile)

Pasc Peli

Pasc Peli (view profile)

This is a very good work. Excellent educational material. Actually it inspired me to enhance it. You can find my "UPDATED" version here ( )

Pasc Peli

Pasc Peli (view profile)

hurd cheng

very good. Thanks

Anam Rizvi

so helpful!

Jaerim Kim

really good demo.

ktye ktye

I am beginner in this work can any body help me how to insert robotic toolbox in my mat lab r2008a

Hi Sir,
Thanks for your File,
I did not get it that how you control this robot?I maens that whti which Strategy you control this robot(Like PID Or Fuuzy Or...)?
can you show me the Line that you control this robot?

weilin bao


ben seif

how can use two arm puma672 in it !!!!!?


liang (view profile)


liang (view profile)

I can not understant what is the means of A1 in linksdata.mat.

source code !!!

Neha Jain

Thank you very much :)


shiva (view profile)

Manually adding link data to "linksdata.mat" file:

if you have saved your link files with struct variables as s1,s2,...,s6,s7

double click on each of the mat file to load them in matlab workspace.

then type,


in the command window


shiva (view profile)

A tip to automatically add a column of 1s to vertices matrix

add this line in the cad2mat function

s0.V0 = [V(:,1), V(:,2), V(:,3), ones(length(V),1)];


function cad2mat(filename)
filename = 'Link0.stl'; % part
% Read the CAD data file:
[F, V, C] = rndread(filename);
s0=struct('F0', F,'V0', V,'C0', C);
s0.V0 = [V(:,1), V(:,2), V(:,3), ones(length(V),1)];


cancan (view profile)

Can you show us how to store the link data manually in the "linksdata.mat"? Thank you in advance!!

Xietong LU

The IK part is nice and easy to understand. Thank you very much!

Nicely programmed, ideal for illustration purpose.

Nice work.
I am beginner in this work can any body help me how to insert robotic toolbox in my mat lab r2008a

Mohd Huzaifa

awesome robot simulation

David Flores

How du store the link data manually in the linksdata.mat?

Is there any manual to guide how to write programs like this? I'm thinking about developing a robotic arm that picks the objects after analyzing the images of the object. Can you help on that?

Alex Frid

very cool simulation!!
some question:
how do you set the initial position of the parts (before starting the transformations)? i.e.

Cesar Gustavo Chillon

Very good simulation in joint mode.

jang shaoten

Karan Khokar

Very good simulation in joint mode. Possible additions could be Cartesian mode movement for end-effector which would require inverse kinematics.

abdelrazzac MERHEB

It's a good demo... I will try to use it in my thesis, "Nonlinear Control of PUMA Robot" it would be perfect...
But when I open puma3d.m I don't see the slides and the edit boxes.. any idea?
thanks a lot for the demo.

toño leiva

necesito un manual del puma 260

xu song

why I can't run it?
Error in ==> C:\MATLAB6p5\work\puma3d.m (loaddata)
On line 478 ==> [linkdata]=load('linksdata.mat','s1','s2', 's3','s4','s5','s6','s7','A1');

Error in ==> C:\MATLAB6p5\work\puma3d.m
On line 25 ==> loaddata
??? Error using ==> load
Unable to read MAT file C:\MATLAB6p5\work\linksdata.mat

File may be corrupt.

who can help me?thanks!

engin mergenci

it is a good demo

Jordi Palacin

Very nice and helpful !

khan islam

i saw it and makeit

Brian Ho

Full details and steps available in the program. good example for inverse kinematic

Aquiles Perez

How applicable do you think will be to combine this with the daq toolbox to move a real puma robot?

MATLAB Release
MATLAB 7.3 (R2006b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video