Clear Filters
Clear Filters

Puma 560 Trajectory Simulation

51 views (last 30 days)
Xavier Bonet
Xavier Bonet on 24 May 2022
Edited: Walter Roberson on 10 Jan 2024
Hello! I need to write a program to simulate the trajectory of a P560 robot. The end effector must pass through four balls. I am not very fluid in Matlab, the code below is what I currently have but is giving some errors. The arm's initial position is [-1.5708 1.5708 -1.5708 0 0 0], and the spheres should be located at [1,0,0], [0,1,0], [0,0,1] and [-0.0203,0.15,1.064]. Thank you in advance for your help!
clear
clc
mdl_puma560
p560 % the robot object
% Initial position:
p1 =[-1.5708 1.5708 -1.5708 0 0 0];
% transformation matrix from initial position:
T1 = transl(p1)*troty(90);
% initial joint angles:
q1 = p560.ikine6s(T1,'ld');
% trajectory from base position:
qt1 = jtraj(qr,q1,50);
p560.plot3d(qt1)

Answers (1)

Himanshu
Himanshu on 10 Jan 2024
Hey Xavier,
I understand that you are encountering errors while trying to simulate the trajectory of a P560 robot.
Firstly, you are passing ‘qr’ to the ‘jtraj’ function which is not defined in the code. This might be the reason you are encountering errors.
Secondly, the code you have provided suggests that you are using Peter Corke’s Robotics Toolbox to simulate the PUMA 560 robot. I am assuming you have installed that. This Toolbox, the Robotics Toolbox for MATLAB, is different to the MathWorks’s own Robotic Systems Toolbox. If not, you may do so by referring to the following link:
Please share the exact errors you are encountering in case you need further help.
Hope this helps!

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!