17.07.2013 Views

p17vn3mf4l14s13eqstbtf63o54.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Cinemática directa Cinemática inversa Cinemática diferencial Cinemática diferencial inversa Singularidades Preliminares matemáticos de la cinemática directa Matrices de rotación<br />

Librerías MATLAB de transformación homogénea de rotación RHy<br />

RHy=HRy(theta)<br />

donde theta es el ángulo de rotación alrededor del eje y. Retorna la matriz de transformación homogénea RHy.<br />

Código Fuente 4 Función HRy(θ)<br />

Control de Robots Manipuladores, primavera 2013<br />

Fernando Reyes Cortés. Posgrado en Automatización, Facultad de Ciencias de la Electrónica BUAP.<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

10<br />

11<br />

12<br />

13<br />

Función HRy(θ).m MATLAB versión 2012a<br />

function RHy=HRy(theta)<br />

dato=whos(’theta’); if strcmp(dato.class, ’sym’) %variables simbólicas then<br />

RHy=[cos(theta), 0, sin(theta), 0;<br />

0, 1, 0, 0;<br />

-sin(theta), 0, cos(theta), 0;<br />

0, 0, 0, 1];<br />

else digits(3); %cálculos numéricos<br />

RHy=round([ vpa(cos(theta),3), 0, vpa(sin(theta),3), 0;<br />

0, 1, 0, 0;<br />

vpa(-sin(theta),3), 0, vpa(cos(theta),3), 0;<br />

0, 0, 0, 1]);<br />

endif<br />

end<br />

Fernando Reyes Cortés Posgrado en Ingeniería Mecatrónica<br />

Capítulo 1 Modelado de Robots Manipuladores Tópicos Especiales de Robótica MEC507 45 / 50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!