Professional Documents
Culture Documents
Abstract
This Toolbox provides many functions that are useful in robotics including such things as kinematics, dynamics, and
trajectory generation. The Toolbox is useful for simulation as well as analyzing results from experiments with real
robots. The Toolbox has been developed and used over the last few years to the point where I now rarely write ‘C’ code
for these kinds of tasks.
The Toolbox is based on a very general method of representing the kinematics and dynamics of serial-link
manipulators. These parameters are encapsulated in Matlab objects. Robot objects can be created by the user for any
serial-link manipulator and a number of examples are provided for well know robots such as the Puma 560 and the
Stanford arm. The toolbox also provides functions for manipulating datatypes such as vectors, homogeneous
transformations and unit-quaternions which are necessary to represent 3-dimensional position and orientation.
The routines are generally written in a straightforward manner which allows for easy understanding, perhaps at the
expense of computational efficiency. If you feel strongly about computational efficiency then you can rewrite the
function to be more efficient compile the M-file using the Matlab compiler, or create a MEX version.
1
IV. Se debe dar mayor prioridad a los comandos del Toolbox Robot, así que debe mandar la carpeta al fondo
después de la carpeta llamada WORK en la ventana de Set Path como se muestra en la figura.
V. Finalmente, compruebe con la siguiente instrucción (robot) si la herramienta fue bien configurada.
2. Comandos iniciales
Para correr el DEMO del Toolbox se utiliza el siguiente comando:
>> rtdemo
2
>> help rotz
R = TR2ROT(T)
Ejemplo 1:
Encuentre la matriz de rotación básica en 3D si un sistema coordenado es girado 20º respecto al eje X.
Solución
>> T=rotx(pi/9)
>> R=TR2ROT(T)
Ejemplo 2,
Calcular la matriz de rotación R x , . Si se rota primero 1 / 6 rad y luego 2 / 4 rad .
>> rotx(pi/6)*rotx(pi/4)
ans=
1.0000 0 0 0
0 0.2588 -0.9659 0
0 0.9659 0.2588 0
0 0 0 1.0000
>> rotx(pi/6 + pi/4)
Ejemplo 3,
El vector v0 0,4,5 modifica el valor de sus coordenadas al hacer rotar 90º el eje Yo. Encuentre las nuevas
coordenadas y verifíquelo dibujándolo.
V1 =
5.0000
4.0000
0.0000
3
Ejemplo 4,
Suponga que la matriz de rotación resultante R representa la rotación del ángulo Ø alrededor del eje Y0
seguido por una rotación del ángulo alrededor del eje Z1. La matriz R se encuentra de la siguiente manera:
Resultado
Ejemplo 5,
>> R=roty(pi/6)*rotz(pi/3)
>> TR2ROT(R)
ans =
Ejemplo 6,
¿Se obtendrá el mismo resultado? Si R z , R y , …
4
Genera un objeto llamado tl y un vector qz
>> plot(tl,qz)
5
>> drivebot(tl)
4. Ejercicios
B) ¿Cuál sería el valor de la coordenada cuando es visto desde el marco de referencia O0 X0Y0 si
/ 18 rad ?
6. Anexos
6.1 quaternion/plot
Purpose Plot quaternion rotation
Synopsis plot(Q)
Description plot is overloaded for quaternion objects and displays a 3D plot which shows how the standard axes are
transformed under that rotation.
Examples
A rotation of 0.3rad about the X axis. Clearly the X axis is invariant under this rotation.
>> q=quaternion(rotx(0.3))
>> plot(q)
q1=quaternion(roty(0))
plot(q1)
q2=quaternion(rotz(pi/6))
plot(q2)
7
q3=quaternion(roty(0)*rotz(pi/2))
plot(q3)
NOTA: Utilicen el commando HOLD para graficar diferentes cuaterniones en la misma gráfica.
http://sites.google.com/site/docenciajg/Home/sistemas-mecanicos-2009-2010/practicas-lab-0910