Skip to main content

Reachy Mini

Main class​

reachy_mini.ReachyMini​

Source

Reachy Mini class for controlling a simulated or real Reachy Mini robot.

Methods​

async_play_move​

Source

Asynchronously play a Move.

Parameters:

NameTypeDescription
moveMoveThe Move object to be played.
play_frequencyfloatThe frequency at which to evaluate the move (in Hz).
initial_goto_durationfloatDuration for the initial goto to the starting position of the move (in seconds). If 0, no initial goto is performed.
soundboolIf True, play the sound associated with the move (if any).

disable_gravity_compensation​

Source

Disable gravity compensation for the head motors.


disable_motors​

Source

Disable the motors.

Parameters:

NameTypeDescription
idsList[str] | NoneList of motor names to disable. If None, all motors will be disabled. Valid names match src/reachy_mini/assets/config/hardware_config.yaml: body_rotation, stewart_1 … stewart_6, right_antenna, left_antenna.

enable_gravity_compensation​

Source

Enable gravity compensation for the head motors.


enable_motors​

Source

Enable the motors.

Parameters:

NameTypeDescription
idsList[str] | NoneList of motor names to enable. If None, all motors will be enabled. Valid names match src/reachy_mini/assets/config/hardware_config.yaml: body_rotation, stewart_1 … stewart_6, right_antenna, left_antenna.

get_current_head_pose​

Source

Get the current head pose as a 4x4 matrix.

Returns:

np.ndarray — A 4x4 matrix representing the current head pose.


get_current_joint_positions​

Source

Get the current joint positions of the head and antennas (in rad).

Returns:

tuple — A tuple containing two lists:

  • List of head joint positions (rad) (length 7)
  • List of antennas joint positions (rad) (length 2)

get_present_antenna_joint_positions​

Source

Get the present joint positions of the antennas (in rad).

Returns:

list — A list of antennas joint positions (rad) (length 2).


goto_sleep​

Source

Put the robot to sleep by moving the head and antennas to a predefined sleep position.


goto_target​

Source

Go to a target head pose and/or antennas position using task space interpolation, in "duration" seconds.

Parameters:

NameTypeDescription
headOptional[np.ndarray]4x4 pose matrix representing the target head pose.
antennasOptional[Union[np.ndarray, List[float]]]1D array with two elements representing the angles of the antennas in radians.
durationfloatDuration of the movement in seconds.
methodInterpolationTechniqueInterpolation method to use ("linear", "minjerk", "ease_in_out", "cartoon"). Default is "minjerk".
body_yawfloat | NoneBody yaw angle in radians. Use None to keep the current yaw.

look_at_image​

Source

Make the robot head look at a point defined by a pixel position (u,v).

tip

TODO: image of reachy mini coordinate system

Parameters:

NameTypeDescription
uintHorizontal coordinate in image frame.
vintVertical coordinate in image frame.
durationfloatDuration of the movement in seconds. If 0, the head will snap to the position immediately.
perform_movementboolIf True, perform the movement. If False, only calculate and return the pose.

Returns:

np.ndarray — The calculated head pose as a 4x4 matrix.


look_at_world​

Source

Look at a specific point in 3D space in Reachy Mini's reference frame.

tip

TODO: include image of reachy mini coordinate system

Parameters:

NameTypeDescription
xfloatX coordinate in meters.
yfloatY coordinate in meters.
zfloatZ coordinate in meters.
durationfloatDuration of the movement in seconds. If 0, the head will snap to the position immediately.
perform_movementboolIf True, perform the movement. If False, only calculate and return the pose.

Returns:

np.ndarray — The calculated head pose as a 4x4 matrix.


play_move​

Asynchronously play a Move.

Parameters:

NameTypeDescription
moveMoveThe Move object to be played.
play_frequencyfloatThe frequency at which to evaluate the move (in Hz).
initial_goto_durationfloatDuration for the initial goto to the starting position of the move (in seconds). If 0, no initial goto is performed.
soundboolIf True, play the sound associated with the move (if any).

set_automatic_body_yaw​

Source

Set the automatic body yaw.

Parameters:

NameTypeDescription
body_yawfloatThe yaw angle of the body in radians.

set_target​

Source

Set the target pose of the head and/or the target position of the antennas.

Parameters:

NameTypeDescription
headOptional[np.ndarray]4x4 pose matrix representing the head pose.
antennasOptional[Union[np.ndarray, List[float]]]1D array with two elements representing the angles of the antennas in radians.
body_yawOptional[float]Body yaw angle in radians.

set_target_antenna_joint_positions​

Source

Set the target joint positions of the antennas.


set_target_body_yaw​

Source

Set the target body yaw.

Parameters:

NameTypeDescription
body_yawfloatThe yaw angle of the body in radians.

set_target_head_pose​

Source

Set the head pose to a specific 4x4 matrix.

Parameters:

NameTypeDescription
posenp.ndarrayA 4x4 matrix representing the desired head pose.
body_yawfloatThe yaw angle of the body, used to adjust the head pose.

start_recording​

Source

Start recording data.


stop_recording​

Source

Stop recording data and return the recorded data.


wake_up​

Source

Wake up the robot - go to the initial head position and play the wake up emote and sound.

Loading Comments...