Skip to content

Latest commit

 

History

History
213 lines (136 loc) · 5.18 KB

RobFunc.md

File metadata and controls

213 lines (136 loc) · 5.18 KB

RobFunc

This page shows all the available functions and some example implementations.

atan2(y,x)

Description:

Returns the unequivocally arctangent of the given y and x values.
Where:
y=sin(θ) (opposite side / Gegenkathete)
x=cos(θ) (adjacent side / Ankathete)

Example:

xyz_rotmat(a,b,g)

Description:

Returns the rotation matrix with the "X-Y-Z Roll-Nick-Gier" method Input: alpha, beta, gamma
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$
World fix transformation

  1. Rotation around X-axis with angle gamma
  2. Rotation around Y-axis with angle beta
  3. Rotation around Z-axis with angle alpha

Example:

zyx_e_rotmat(a,b,g)

Description:

Returns the rotation matrix with the "Z-Y-X Euler Angle" method
Input: alpha, beta, gamma
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$
Body fix transformation:

  1. Rotation around Z-axis with angle alpha
  2. Rotation around Y-axis with angle beta
  3. Rotation around X-axis with angle gamma

Example:

zyz_e_rotmat(a,b,g)

Description:

Returns the rotation matrix with the "Z-Y-Z Euler Angle" method
Input: alpha, beta, gamma
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$
Body fix transformation

  1. Rotation around Z-axis with angle alpha
  2. Rotation around Y-axis with angle beta
  3. Rotation around Z-axis with angle gamma

Example:

xyz_angles(rmat)

Description:

Returns the "X-Y-Z Roll-Nick-Gier" (alpha, beta, gamma) angles from the given rotation matrix.
Input: rotation matrix
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$
World fix transformation

  1. Rotation around X-axis with angle gamma
  2. Rotation around Y-axis with angle beta
  3. Rotation around Z-axis with angle alpha

Example:

zyx_e_angles(rmat)

Description:

Returns the "Z-Y-X Euler Angle" (alpha, beta, gamma) angles from the given rotation matrix.
Input: rotation matrix
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$
Body fix transformation

  1. Rotation around Z-axis with angle alpha
  2. Rotation around Y-axis with angle beta
  3. Rotation around X-axis with angle gamma

Example:

zyz_e_angles(rmat)

Description:

Returns the "Z-Y-Z Euler Angle" (alpha, beta, gamma) angles from the given rotation matrix.
Input: rotation matrix
$(A-B)R = R_z(a)*R_y(b)*R_x(g)$ Body fix transformation

  1. Rotation around Z-axis with angle alpha
  2. Rotation around Y-axis with angle beta
  3. Rotation around Z-axis with angle gamma

Example:

rotmat_x(gamma)

Description:

Returns the rotation matrix of a rotation around the x-axis

Example:

rotmat_y(beta)

Description:

Returns the rotation matrix of a rotation around the y-axis

Example:

rotmat_z(alpha)

Description:

Returns the rotation matrix of a rotation around the z-axis

Example:

transmat_rot_x(gamma)

Description:

Returns the transformation matrix of a rotation around the x-axis

Example:

transmat_rot_y(beta)

Description:

Returns the transformation matrix of a rotation around the y-axis

Example:

transmat_rot_z(alpha)

Description:

Returns the transformation matrix of a rotation around the z-axis

Example:

transmat_transl(a,b,c)

Description:

Returns the transformation matrix of a translation with x=a, y=b, z=c

Example:

dh_transmat(a,alpha,d,theta)

Description:

Returns the Denavit-Hartenberg transformation matrix
Input: a_i, α_i, d_i, θ_i

Example:

jacobi(funcvec,varvec)

Description:

Returns the Jacobi-Matrix of the given function vector and variable vector
Input:
funcvec := {f1(x,y,...), f2(x,y,...), ...)}
varvec := {x,y,...}

Output = $ \left(\begin{array}{cc} df1/dx & df1/dy & df1/d...\ df2/dx & df2/dy & df2/d...\ df.../dx & df.../dy & df.../d...\ \end{array}\right) $

Example: