Professional Documents
Culture Documents
Laboratorio 2 1
1.
Ejercicio en Laboratorio
Laboratorio 2 1
La tabla 2 muestra los valores mximos y mnimos de los ngulos por limitaciones
mecnicos pero que ha sido definido por el grupo de trabajo y llevado de forma manual.
Laboratorio 2 1
a (i-1)
0
0
10,5
10,5
9,5
alpha (i-1)
0
pi /2
0
0
0
d (i)
L1+L2
0
0
0
0
theta (i)
q1
q2
q3
q4
0
Para comprobar que el anlisis de cinemtica directa se hace uso del tool box de Peter
Corke y se crea un robot con las especificaciones dadas.ver 3 y 4
Laboratorio 2 1
Figura 4: Plot del robot creado en Matlab con Peter Corke en posicin Home
Laboratorio 2 1
Para esta seccin se tiene en cuenta la tabla de control de los motores AX-12a que
lleva cada una de las articulaciones del robot Phantom Pincher dado que se debe conocer
el registro para dar instrucciones con el toolbox Dynamixel para Mattlab.
clear all
clc
PUERTO =16;
ID1
ID2
ID3
ID4
ID5
=
=
=
=
=
1;
2;
3;
4;
5;
Laboratorio 2 1
q1
q2
q3
q4
q5
=
=
=
=
=
0 ;
90 ;
0 ;
0 ;
0 ;
Present_Pos = 36;
Goal_Pos = 30
MOVING_SPEED = 32;
BAUDNUM = 1;
Q1
Q2
Q3
Q4
Q5
=
=
=
=
=
angle2Dyn (
angle2Dyn (
angle2Dyn (
angle2Dyn (
angle2Dyn (
q1
q2
q3
q4
q5
)
)
)
)
)
;
;
;
;
;
Laboratorio 2 1
32
33 Pos1 =
));
34 Pos2 =
));
35 Pos3 =
));
36 Pos4 =
int32 ( calllib ( dynamixel , dxl_read_word ,ID1 , Present_Posint32 ( calllib ( dynamixel , dxl_read_word ,ID2 , Present_Posint32 ( calllib ( dynamixel , dxl_read_word ,ID3 , Present_Posint32 ( calllib ( dynamixel , dxl_read_word ,ID4 , Present_Pos-
Laboratorio 2 1
Laboratorio 2 1
a
Cdigo Matlab 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
clear
clc
l1 = 10.5;
l2 = 10.5;
l3 = 9.5;
Q1
Q2
Q3
Q4
=
=
=
=
-20;
20;
-20;
20;
m = 30;
q1
q2
q3
q4
q5
=
=
=
=
=
( Q1 ) * pi () /180 ;
( Q2 + 90) * pi () /180 ;
( Q3 ) * pi () /180 ;
( Q4 ) * pi () /180 ;
0 ;
L1
L2
L3
L4
L5
=
=
=
=
=
Link
Link
Link
Link
Link
(
(
(
(
(
[
[
[
[
[
1
0
0
0
0
,
,
,
,
,
0
0
0
0
0
,
,
,
,
,
0 , 0 , 0 ] , modified ) ;
0 , pi () /2 , 0 ] , modified ) ;
l1 , 0 , 0 ] , modified ) ;
l2 , 0 , 0 ] , modified ) ;
l3 , 0 , 0 ] , modified ) ;
Laboratorio 2 1
function [ ] = Untitled4 ()
%- - - - - - - - - - - - - - - - - - - Longitudes de Eslabones --------------------------l1 = 10.5;
l2 = 10.5;
l3 = 9.5;
h =10;
%-------- Angulos de las articulaciones dejando gripper en 0-------------Q1 = 0;
Q2 = 0;
Q3 =0;
Q4 =0;
m = 30;
q1
q2
q3
q4
q5
=
=
=
=
=
( Q1 ) * pi () /180 ;
( Q2 +90) * pi () /180 ;
( Q3 ) * pi () /180 ;
( Q4 ) * pi () /180 ;
0 ;
L1
L2
L3
L4
L5
=
=
=
=
=
Link
Link
Link
Link
Link
(
(
(
(
(
[
[
[
[
[
0
0
0
0
0
,
,
,
,
,
h
0
0
0
0
,
,
,
,
,
0 , 0 , 0 ] , modified ) ;
0 , pi () /2 , 0 ] , modified ) ;
l1 , 0 , 0 ] , modified ) ;
l2 , 0 , 0 ] , modified ) ;
l3 , 0 , 0 ] , modified ) ;
30
31 bot . fkine ( [ q1 q2 q3 q4 q5 ] ) %cinematica directa
32 bot . plot ( [ q1 q2 q3 q4 q5 ] )
33 %- - - - - - - - - - - - - - Creacin de Matrices para la Pose HOME ------------------34
35 r10 = rotz ( q1 ) ;
36 t10 = [ 0 ; 0 ; 0];
37 TR10 = rt2tr ( r10 , t10 ) ;
38
10
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Laboratorio 2 1
Referencias
[1]
[2]
[2]
11