Skip to main content

Module robotics

Module robotics 

Source
Expand description

Robotics kinematics: DH parameters, forward kinematics, rotations. Robotics kinematics helpers: DH parameters, forward kinematics, Jacobian, and algebraic inverse kinematics.

§Denavit-Hartenberg Convention

Each joint in a serial robot arm is described by four parameters:

  • θ (theta): joint angle (variable for revolute joints)
  • d: link offset along z-axis
  • a: link length along x-axis
  • α (alpha): link twist angle

These produce a 4×4 homogeneous transformation matrix per joint. Chaining these matrices gives the forward kinematics.

Enums§

EulerConvention
Euler angle convention for rotation composition.

Functions§

dh_matrix
Build the standard Denavit-Hartenberg transformation matrix for one joint.
fk_chain
Chain-multiply a sequence of DH transformation matrices to compute the total forward-kinematics transformation.
fk_chain_typed
Compute the full 4×4 FK transformation matrix from typed DH parameters.
fk_position
Extract the end-effector position (x, y, z) from the forward-kinematics chain.
fk_position_typed
Compute end-effector position from typed DH parameters.
fk_rotation
Extract the 3×3 rotation submatrix from the forward-kinematics result.
fk_rotation_typed
Compute the 3×3 rotation matrix from typed DH parameters.
homogeneous
Build a 4×4 homogeneous transformation matrix from a 3×3 rotation matrix and a 3-element position vector.
inverse_kinematics_2dof
Solve 2-DOF planar inverse kinematics algebraically.
rot_euler
Rotation matrix from Euler angles with specified convention.
rot_x
Rotation matrix about the x-axis by angle θ.
rot_y
Rotation matrix about the y-axis by angle θ.
rot_z
Rotation matrix about the z-axis by angle θ.
skew3
Skew-symmetric matrix from a 3-vector [a, b, c].
translation
Pure translation as a 4×4 homogeneous transformation matrix.

Type Aliases§

DhParams
Typed DH parameter tuple: (joint_angle, link_offset, link_length, link_twist).