Buckets:

rtrm's picture
|
download
raw
8.95 kB

Utils

Interpolation Functions[[reachy_mini.utils.interpolation.minimum_jerk]]

reachy_mini.utils.interpolation.minimum_jerk[[reachy_mini.utils.interpolation.minimum_jerk]]

Source

Compute the minimum jerk interpolation function from starting position to goal position.

reachy_mini.utils.interpolation.linear_pose_interpolation[[reachy_mini.utils.interpolation.linear_pose_interpolation]]

Source

Linearly interpolate between two poses in 6D space.

reachy_mini.utils.interpolation.time_trajectory[[reachy_mini.utils.interpolation.time_trajectory]]

Source

Compute the time trajectory value based on the specified interpolation method.

reachy_mini.utils.interpolation.delta_angle_between_mat_rot[[reachy_mini.utils.interpolation.delta_angle_between_mat_rot]]

Source

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:

Parameters:

P : A 3x3 rotation matrix.

Q : Another 3x3 rotation matrix.

Returns:

The angle in radians between the two rotations.

reachy_mini.utils.interpolation.distance_between_poses[[reachy_mini.utils.interpolation.distance_between_poses]]

Source

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.

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).

reachy_mini.utils.interpolation.compose_world_offset[[reachy_mini.utils.interpolation.compose_world_offset]]

Source

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.

reachy_mini.utils.interpolation.InterpolationTechnique[[reachy_mini.utils.interpolation.InterpolationTechnique]]

Source

Enumeration of interpolation techniques.

Hardware Configuration[[reachy_mini.utils.hardware_config.parser.MotorConfig]]

reachy_mini.utils.hardware_config.parser.MotorConfig[[reachy_mini.utils.hardware_config.parser.MotorConfig]]

Source

Motor configuration.

reachy_mini.utils.hardware_config.parser.SerialConfig[[reachy_mini.utils.hardware_config.parser.SerialConfig]]

Source

Serial configuration.

reachy_mini.utils.hardware_config.parser.ReachyMiniConfig[[reachy_mini.utils.hardware_config.parser.ReachyMiniConfig]]

Source

Reachy Mini configuration.

reachy_mini.utils.hardware_config.parser.parse_yaml_config[[reachy_mini.utils.hardware_config.parser.parse_yaml_config]]

Source

Parse the YAML configuration file and return a ReachyMiniConfig.

Rerun Visualization

Wireless Version Utilities[[reachy_mini.utils.wireless_version.utils.call_logger_wrapper]]

reachy_mini.utils.wireless_version.utils.call_logger_wrapper[[reachy_mini.utils.wireless_version.utils.call_logger_wrapper]]

Source

Run a command asynchronously, streaming stdout and stderr to logger in real time.

Parameters:

command : list or tuple of command arguments (not a string)

logger : logger object with .info and .error methods

reachy_mini.utils.wireless_version.update.update_reachy_mini[[reachy_mini.utils.wireless_version.update.update_reachy_mini]]

Source

Perform a software update by upgrading the reachy_mini package and restarting the daemon.

This updates both:

  • The daemon venv (where the daemon runs)
  • The apps_venv (where apps run) - to keep SDK in sync

reachy_mini.utils.wireless_version.startup_check.check_and_fix_venvs_ownership[[reachy_mini.utils.wireless_version.startup_check.check_and_fix_venvs_ownership]]

Source

For wireless units, check if files under venvs_path are owned by user pollen and fix if needed.

Parameters:

venvs_path : Path to the virtual environments directory (default: /venvs)

custom_logger : Optional logger to use instead of the module logger

reachy_mini.utils.wireless_version.startup_check.check_and_update_bluetooth_service[[reachy_mini.utils.wireless_version.startup_check.check_and_update_bluetooth_service]]

Source

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.

reachy_mini.utils.wireless_version.startup_check.check_and_update_wireless_launcher[[reachy_mini.utils.wireless_version.startup_check.check_and_update_wireless_launcher]]

Source

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.

reachy_mini.utils.wireless_version.startup_check.check_and_sync_apps_venv_sdk[[reachy_mini.utils.wireless_version.startup_check.check_and_sync_apps_venv_sdk]]

Source

Check if the apps_venv SDK version matches daemon and update if needed.

This ensures that when the daemon is updated, the SDK in the apps_venv is also updated to match, so apps get the latest fixes automatically.

Core Utilities[[reachy_mini.utils.create_head_pose]]

reachy_mini.utils.create_head_pose[[reachy_mini.utils.create_head_pose]]

Source

Create a homogeneous transformation matrix representing a pose in 6D space (position and orientation).

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.

URDF Parsing

Xet Storage Details

Size:
8.95 kB
·
Xet hash:
de2eb9c45df40549d7cb33ab314b622bc957a6cb45c55b7c38fc0d903e2dd9c7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.