Reachy Mini documentation
Utils
Utils
Interpolation Functions
reachy_mini.utils.interpolation.minimum_jerk
< source >( starting_position: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] goal_position: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] duration: float starting_velocity: typing.Optional[numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]] = None starting_acceleration: typing.Optional[numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]] = None final_velocity: typing.Optional[numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]] = None final_acceleration: typing.Optional[numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]] = None )
Compute the minimum jerk interpolation function from starting position to goal position.
reachy_mini.utils.interpolation.linear_pose_interpolation
< source >( start_pose: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] target_pose: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] t: float )
Linearly interpolate between two poses in 6D space.
reachy_mini.utils.interpolation.time_trajectory
< source >( t: float method: InterpolationTechnique = <InterpolationTechnique.MIN_JERK: 'minjerk'> )
Compute the time trajectory value based on the specified interpolation method.
reachy_mini.utils.interpolation.delta_angle_between_mat_rot
< source >( P: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] Q: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] )
Compute the angle (in radians) between two 3x3 rotation matrices P and Q.
This is equivalent to the angular distance in axis-angle space. It is computed via the trace of the relative rotation matrix.
References:
reachy_mini.utils.interpolation.distance_between_poses
< source >( pose1: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] pose2: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] ) → A tuple of
Parameters
- pose1 — A 4x4 homogeneous transformation matrix representing the first pose.
- pose2 — A 4x4 homogeneous transformation matrix representing the second pose.
Returns
A tuple of
- translation distance in meters,
- angular distance in radians,
- unhinged distance in magic-mm (translation in mm + rotation in degrees).
Compute three types of distance between two 4x4 homogeneous transformation matrices.
The result combines translation (in mm) and rotation (in degrees) using an arbitrary but emotionally satisfying equivalence: 1 degree ≈ 1 mm.
reachy_mini.utils.interpolation.compose_world_offset
< source >( T_abs: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] T_off_world: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] reorthonormalize: bool = False )
Compose an absolute world-frame pose with a world-frame offset.
- translations add in world: t_final = t_abs + t_off
- rotations compose in world: R_final = R_off @ R_abs This rotates the frame in place (about its own origin) by a rotation defined in world axes, and shifts it by a world translation.
Parameters
T_abs : (4,4) ndarray Absolute pose in world frame. T_off_world : (4,4) ndarray Offset transform specified in world axes (dx,dy,dz in world; dR about world axes). reorthonormalize : bool If True, SVD-orthonormalize the resulting rotation to fight drift.
Returns
T_final : (4,4) ndarray Resulting pose in world frame.
Enumeration of interpolation techniques.
Hardware Configuration
class reachy_mini.utils.hardware_config.parser.MotorConfig
< source >( id: int offset: int angle_limit_min: int angle_limit_max: int return_delay_time: int shutdown_error: int operating_mode: int pid: tuple[int, int, int] | None = None )
Motor configuration.
Serial configuration.
class reachy_mini.utils.hardware_config.parser.ReachyMiniConfig
< source >( version: str serial: SerialConfig motors: dict[str, reachy_mini.utils.hardware_config.parser.MotorConfig] )
Reachy Mini configuration.
Parse the YAML configuration file and return a ReachyMiniConfig.
Rerun Visualization
class reachy_mini.utils.rerun.Rerun
< source >( reachymini: ReachyMini app_id: str = 'reachy_mini_rerun' spawn: bool = True )
Rerun logging for Reachy Mini.
Log the camera image to Rerun.
Log the movement data to Rerun.
Set the absolute paths in the URDF file. Rerun cannot read the “package://” paths.
Start the Rerun logging thread.
Stop the Rerun logging thread.
class reachy_mini.utils.rerun.UrdfEntityPaths
< source >( model: Robot entity_path_prefix: typing.Optional[str] )
Helper for constructing link/joint entity paths that match the native URDF logger.
Wireless Version Utilities
reachy_mini.utils.wireless_version.utils.call_logger_wrapper
< source >( command: list[str] logger: Logger )
Run a command asynchronously, streaming stdout and stderr to logger in real time.
reachy_mini.utils.wireless_version.update.update_reachy_mini
< source >( logger: Logger pre_release: bool = False git_ref: str | None = None )
Update reachy_mini package and restart daemon.
reachy_mini.utils.wireless_version.startup_check.check_and_fix_venvs_ownership
< source >( venvs_path: str = '/venvs' custom_logger: logging.Logger | None = None )
For wireless units, check if files under venvs_path are owned by user pollen and fix if needed.
Check if bluetooth service needs updating and update if different.
Compares the source bluetooth_service.py with the installed version at /bluetooth/bluetooth_service.py. If they differ, copies the new version and restarts the bluetooth service. Also syncs the commands/ folder.
Check if wireless daemon service needs updating and update if different.
Compares the source reachy-mini-daemon.service with the installed version. If they differ, copies the new version and reloads systemd.
Check if apps_venv SDK matches daemon install source and sync if needed.
Compares both version AND install source (PyPI vs git ref). If daemon was installed from a git ref, apps_venv will be synced to the same ref.
reachy_mini.utils.wireless_version.update_available.is_update_available
< source >( package_name: str pre_release: bool )
Check if an update is available for the given package.
reachy_mini.utils.wireless_version.update_available.get_pypi_version
< source >( package_name: str pre_release: bool )
Get the latest version of a package from PyPI.
reachy_mini.utils.wireless_version.update_available.get_local_version
< source >( package_name: str )
Get the currently installed version of a package.
Core Utilities
reachy_mini.utils.create_head_pose
< source >( x: float = 0 y: float = 0 z: float = 0 roll: float = 0 pitch: float = 0 yaw: float = 0 mm: bool = False degrees: bool = True ) → np.ndarray
Parameters
- x (float) — X coordinate of the position.
- y (float) — Y coordinate of the position.
- z (float) — Z coordinate of the position.
- roll (float) — Roll angle
- pitch (float) — Pitch angle
- yaw (float) — Yaw angle
- mm (bool) — If True, convert position from millimeters to meters.
- degrees (bool) — If True, interpret roll, pitch, and yaw as degrees; otherwise as radians.
Returns
np.ndarray
A 4x4 homogeneous transformation matrix representing the pose.
Create a homogeneous transformation matrix representing a pose in 6D space (position and orientation).
URDF Parsing
Generate the urdf_kinematics.json file.