Sie sind auf Seite 1von 1

R M C P

Talha Yousuf
December 13, 2018

Listings
1 De ining the robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
This function takes link lengths and joint limits from the user and outputs a robot object.

Listing 1: De ining the robot


1 function robot_object = define_robot (L1_length , L2_length , L3_length ,
L4_length , qlim_1 ,qlim_2 ,qlim_3 , qlim_4 )
2 % Take link lengths and return a Robot object
3 % Find the actual shape of robot in this folder in order to fully
4 % understand the function
5
6 % L1_length :
7 % Length of link 1
8 % L2_length :
9 % Length of link 2
10 % L3_length :
11 % Length of link 3
12 % qlim_1 :
13 % Joint limits of joint_1 as array : [ -180 180]*( pi /180)
14 % qlim_2 :
15 % Joint limits of joint_2 as row array
16 % qlim_3 :
17 % Joint limits of joijnt_3 as row array
18
19 L(1)=Link ([0 L1_length 0 pi /2]);
20 L(2)=Link ([0 0 L2_length 0]);
21 L(3)=Link ([0 0 L3_length 0]);
22 L(4)=Link ([0 0 L4_length 0]);
23
24 L(1).qlim =( pi /180) * qlim_1 ;
25 L(2).qlim =( pi /180) * qlim_2 ;
26 L(3).qlim =( pi /180) * qlim_3 ;
27 L(4).qlim =( pi /180) * qlim_4 ;
28
29 robot_object = SerialLink (L);
30 robot_object .name='Robot ';
31
32 end

Das könnte Ihnen auch gefallen