File Exchange

image thumbnail

3D Puma Robot Demo

version (52.3 KB) by Don Riley
Simulate a 6 link 3D Puma Robot


Updated 09 May 2007

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.

Cite As

Don Riley (2021). 3D Puma Robot Demo (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (47)

Chisom Ifeanyieze

research re

Wenshuo Li

benyan huo

Hung SoM

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

Manikandan R

how change way points instead of circles

marwen mrabti

hello Mr Don,
thank you Sir for your work.
Can you show me how to store the link data manually in the "linksdata.mat"?

Vincenza Belfiore

It is perfect! I don't know how i can obtain A1.STL file. Can you help me?

antony flores ore

Omar Aljanaideh

Utkarsh Singh

Pasc Peli

Pasc Peli

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

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 !!!!!?



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

oumaya abdelkhalek

source code !!!

Neha Jain

Thank you very much :)


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


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)];


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!

Patrik Eschle

Nicely programmed, ideal for illustration purpose.

Nirav Chudasama

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

Mathias Mathias

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

Infant Joe Charles

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 Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!