Reachy Mini documentation
Daemon
Daemon
Core Daemon Classes
class reachy_mini.daemon.daemon.Daemon
< source >( log_level: str = 'INFO' robot_name: str = 'reachy_mini' wireless_version: bool = False desktop_app_daemon: bool = False )
Daemon for simulated or real Reachy Mini robot.
Runs the server with the appropriate backend (Mujoco for simulation or RobotBackend for real hardware).
restart
< source >( sim: typing.Optional[bool] = None mockup_sim: typing.Optional[bool] = None serialport: typing.Optional[str] = None scene: typing.Optional[str] = None headless: typing.Optional[bool] = None use_audio: typing.Optional[bool] = None localhost_only: typing.Optional[bool] = None wake_up_on_start: typing.Optional[bool] = None goto_sleep_on_stop: typing.Optional[bool] = None ) → DaemonState
Parameters
- sim (bool) — If True, run in simulation mode using Mujoco. Defaults to None (uses the previous value).
- mockup_sim (bool) — If True, run in lightweight simulation mode (no MuJoCo). Defaults to None (uses the previous value).
- serialport (str) — Serial port for real motors. Defaults to None (uses the previous value).
- scene (str) — Name of the scene to load in simulation mode (“empty” or “minimal”). Defaults to None (uses the previous value).
- headless (bool) — If True, run Mujoco in headless mode (no GUI). Defaults to None (uses the previous value).
- use_audio (bool) — If True, enable audio. Defaults to None (uses the previous value).
- localhost_only (bool) — If True, restrict the server to localhost only clients. Defaults to None (uses the previous value).
- wake_up_on_start (bool) — If True, wake up Reachy Mini on start. Defaults to None (don’t wake up).
- goto_sleep_on_stop (bool) — If True, put Reachy Mini to sleep on stop. Defaults to None (don’t go to sleep).
Returns
DaemonState
The current state of the daemon after attempting to restart it.
Restart the Reachy Mini daemon.
run4ever
< source >( sim: bool = False mockup_sim: bool = False serialport: str = 'auto' scene: str = 'empty' localhost_only: bool = True wake_up_on_start: bool = True goto_sleep_on_stop: bool = True check_collision: bool = False kinematics_engine: str = 'AnalyticalKinematics' headless: bool = False use_audio: bool = True )
Parameters
- sim (bool) — If True, run in simulation mode using Mujoco. Defaults to False.
- mockup_sim (bool) — If True, run in lightweight simulation mode (no MuJoCo). Defaults to False.
- serialport (str) — Serial port for real motors. Defaults to “auto”, which will try to find the port automatically.
- scene (str) — Name of the scene to load in simulation mode (“empty” or “minimal”). Defaults to “empty”.
- localhost_only (bool) — If True, restrict the server to localhost only clients. Defaults to True.
- wake_up_on_start (bool) — If True, wake up Reachy Mini on start. Defaults to True.
- goto_sleep_on_stop (bool) — If True, put Reachy Mini to sleep on stop. Defaults to True
- check_collision (bool) — If True, enable collision checking. Defaults to False.
- kinematics_engine (str) — Kinematics engine to use. Defaults to “AnalyticalKinematics”.
- headless (bool) — If True, run Mujoco in headless mode (no GUI). Defaults to False.
- use_audio (bool) — If True, enable audio. Defaults to True.
Run the Reachy Mini daemon indefinitely.
First, it starts the daemon, then it keeps checking the status and allows for graceful shutdown on user interrupt (Ctrl+C).
start
< source >( sim: bool = False mockup_sim: bool = False serialport: str = 'auto' scene: str = 'empty' localhost_only: bool = True wake_up_on_start: bool = True check_collision: bool = False kinematics_engine: str = 'AnalyticalKinematics' headless: bool = False use_audio: bool = True hardware_config_filepath: str | None = None ) → DaemonState
Parameters
- sim (bool) — If True, run in simulation mode using Mujoco. Defaults to False.
- mockup_sim (bool) — If True, run in lightweight simulation mode (no MuJoCo). Defaults to False.
- serialport (str) — Serial port for real motors. Defaults to “auto”, which will try to find the port automatically.
- scene (str) — Name of the scene to load in simulation mode (“empty” or “minimal”). Defaults to “empty”.
- localhost_only (bool) — If True, restrict the server to localhost only clients. Defaults to True.
- wake_up_on_start (bool) — If True, wake up Reachy Mini on start. Defaults to True.
- check_collision (bool) — If True, enable collision checking. Defaults to False.
- kinematics_engine (str) — Kinematics engine to use. Defaults to “AnalyticalKinematics”.
- headless (bool) — If True, run Mujoco in headless mode (no GUI). Defaults to False.
- use_audio (bool) — If True, enable audio. Defaults to True.
- hardware_config_filepath (str | None) — Path to the hardware configuration YAML file. Defaults to None.
Returns
DaemonState
The current state of the daemon after attempting to start it.
Start the Reachy Mini daemon.
Get the current status of the Reachy Mini daemon.
stop
< source >( goto_sleep_on_stop: bool = True ) → DaemonState
Stop the Reachy Mini daemon.
Enum representing the state of the Reachy Mini daemon.
class reachy_mini.daemon.daemon.DaemonStatus
< source >( robot_name: str state: DaemonState wireless_version: bool desktop_app_daemon: bool simulation_enabled: typing.Optional[bool] mockup_sim_enabled: typing.Optional[bool] backend_status: typing.Union[reachy_mini.daemon.backend.robot.backend.RobotBackendStatus, reachy_mini.daemon.backend.mujoco.MujocoMockupBackendStatus, reachy_mini.daemon.backend.mockup_sim.backend.MockupSimBackendStatus, NoneType] error: typing.Optional[str] = None wlan_ip: typing.Optional[str] = None version: typing.Optional[str] = None )
Dataclass representing the status of the Reachy Mini daemon.
Backend Classes
Abstract Backend
Enum for motor control modes.
Robot Backend
class reachy_mini.daemon.backend.robot.RobotBackend
< source >( serialport: str log_level: str = 'INFO' check_collision: bool = False kinematics_engine: str = 'AnalyticalKinematics' hardware_error_check_frequency: float = 1.0 use_audio: bool = True wireless_version: bool = False hardware_config_filepath: str | None = None )
Real robot backend for Reachy Mini.
Close the motor controller connection and release resources.
Calculate the currents necessary to compensate for gravity.
Disable the motors by turning the torque off.
Enable the motors by turning the torque on.
get_all_joint_positions
< source >( ) → tuple
Returns
tuple
A tuple containing two lists - the first list is for the head joint positions, and the second list is for the antenna joint positions.
Get the current joint positions of the robot.
Get current IMU data (accelerometer, gyroscope, quaternion, temperature).
get_present_antenna_joint_positions
< source >( ) → list
Returns
list
A list of joint positions for the antennas.
Get the current joint positions of the antennas.
get_present_head_joint_positions
< source >( ) → list
Returns
list
A list of joint positions for the head, including the body rotation.
Get the current joint positions of the head.
Get the current status of the robot backend.
Read hardware errors from the motor controller.
Run the control loop for the robot backend.
This method continuously updates the motor controller at a specified frequency. It reads the joint positions, updates the motor controller, and publishes the joint positions. It also handles errors and retries if the motor controller is not responding.
set_antennas_operation_mode
< source >( mode: int )
Change the operation mode of the antennas motors.
Important: This method does not work well with the current feetech motors, as they do not support torque control. So the method disables the antennas when in torque control mode.
set_head_operation_mode
< source >( mode: int )
Change the operation mode of the head motors.
The operation modes can be: 0: torque control 3: position control 5: current-based position control.
Important: This method does not work well with the current feetech motors (body rotation), as they do not support torque control. So the method disables the antennas when in torque control mode. The dynamixel motors used for the head do support torque control, so this method works as expected.
set_motor_torque_ids
< source >( ids: list[str] on: bool )
Set the torque state for specific motor names.
class reachy_mini.daemon.backend.robot.RobotBackendStatus
< source >( ready: bool motor_control_mode: MotorControlMode last_alive: float | None control_loop_stats: dict[str, typing.Any] error: str | None = None )
Status of the Robot Backend.
MuJoCo Backend
Mockup class to avoid import errors when MuJoCo is not installed.
Mockup class to avoid import errors when MuJoCo is not installed.
Mockup Simulation Backend
class reachy_mini.daemon.backend.mockup_sim.MockupSimBackend
< source >( check_collision: bool = False kinematics_engine: str = 'AnalyticalKinematics' use_audio: bool = True )
Lightweight simulated Reachy Mini without MuJoCo.
This backend provides a simple simulation where target positions are applied immediately without physics simulation.
Apps access webcam/microphone directly (not via UDP streaming).
Get the current joint positions of the antennas.
Get the current joint positions of the head.
Get the status of the backend.
Run the simulation loop.
In mockup-sim mode, target positions are applied immediately.
Set the motor torque state for specific motor names.
No-op in mockup-sim mode.
class reachy_mini.daemon.backend.mockup_sim.MockupSimBackendStatus
< source >( motor_control_mode: MotorControlMode error: str | None = None )
Status of the MockupSim backend.
Daemon Utilities
Convert a dataclass containing Enums to a dictionary with enum values.
reachy_mini.daemon.utils.find_serial_port
< source >( wireless_version: bool = False vid: str = '1a86' pid: str = '55d3' pi_uart: str = '/dev/ttyAMA3' )
Find the serial port for Reachy Mini based on VID and PID or the Raspberry Pi UART for the wireless version.
Get the IP address of a specific network interface (Linux and Windows).
App
Models
class reachy_mini.daemon.app.models.Matrix4x4Pose
< source >( m: tuple[float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float] )
Represent a 3D pose by its 4x4 transformation matrix (translation is expressed in meters).
from_pose_array
< source >( arr: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] )
Create a Matrix4x4 pose representation from a 4x4 pose array.
Convert the Matrix4x4Pose to a 4x4 numpy array.
class reachy_mini.daemon.app.models.XYZRPYPose
< source >( x: float = 0.0 y: float = 0.0 z: float = 0.0 roll: float = 0.0 pitch: float = 0.0 yaw: float = 0.0 )
Represent a 3D pose using position (x, y, z) in meters and orientation (roll, pitch, yaw) angles in radians.
from_pose_array
< source >( arr: numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]] )
Create an XYZRPYPose representation from a 4x4 pose array.
Convert the XYZRPYPose to a 4x4 numpy array.
class reachy_mini.daemon.app.models.FullBodyTarget
< source >( target_head_pose: reachy_mini.daemon.app.models.XYZRPYPose | reachy_mini.daemon.app.models.Matrix4x4Pose | None = None target_antennas: tuple[float, float] | None = None target_body_yaw: float | None = None timestamp: datetime.datetime | None = None )
Represent the full body including the head pose and the joints for antennas.
Direction of Arrival info from the microphone array.
class reachy_mini.daemon.app.models.FullState
< source >( control_mode: reachy_mini.daemon.backend.abstract.MotorControlMode | None = None head_pose: reachy_mini.daemon.app.models.XYZRPYPose | reachy_mini.daemon.app.models.Matrix4x4Pose | None = None head_joints: list[float] | None = None body_yaw: float | None = None antennas_position: list[float] | None = None timestamp: datetime.datetime | None = None passive_joints: list[float] | None = None doa: reachy_mini.daemon.app.models.DoAInfo | None = None )
Represent the full state of the robot including all joint positions and poses.
Dependencies
Get the daemon as request dependency.
Get the backend as request dependency.
Get the app manager as request dependency.
Get the backend as websocket dependency.
Jobs
Enum for job status.
class reachy_mini.daemon.app.bg_job_register.JobInfo
< source >( command: str status: JobStatus logs: list[str] )
Pydantic model for install job status.
class reachy_mini.daemon.app.bg_job_register.JobHandler
< source >( uuid: str info: JobInfo new_log_evt: dict[str, asyncio.locks.Event] )
Handler for background jobs.
reachy_mini.daemon.app.bg_job_register.run_command
< source >( command: str coro_func: typing.Callable[..., typing.Awaitable[NoneType]] *args: Any )
Start a background job, with a custom logger and return its job_id.
Get the info of a job by its ID.
reachy_mini.daemon.app.bg_job_register.ws_poll_info
< source >( websocket: WebSocket job_uuid: str )
WebSocket endpoint to stream job logs in real time.
Main Application
class reachy_mini.daemon.app.main.Args
< source >( log_level: str = 'INFO' log_file: str | None = None wireless_version: bool = False desktop_app_daemon: bool = False serialport: str = 'auto' hardware_config_filepath: str | None = None sim: bool = False mockup_sim: bool = False scene: str = 'empty' headless: bool = False use_audio: bool = True kinematics_engine: str = 'AnalyticalKinematics' check_collision: bool = False autostart: bool = True timeout_health_check: float | None = None wake_up_on_start: bool = True goto_sleep_on_stop: bool = True preload_datasets: bool = False dataset_update_interval_hours: float = 24.0 robot_name: str = 'reachy_mini' fastapi_host: str = '0.0.0.0' fastapi_port: int = 8000 localhost_only: bool | None = None )
Arguments for configuring the Reachy Mini daemon.
reachy_mini.daemon.app.main.create_app
< source >( args: Args health_check_event: asyncio.locks.Event | None = None )
Create and configure the FastAPI application.
Run the FastAPI app with Uvicorn.
Run the FastAPI app with Uvicorn.
App Routers
Daemon Router
reachy_mini.daemon.app.routers.daemon.start_daemon
< source >( request: Request wake_up: bool daemon: Daemon = Depends(dependency=<function get_daemon at 0x7f9d31fe2c00>, use_cache=True, scope=None) )
Start the daemon.
reachy_mini.daemon.app.routers.daemon.stop_daemon
< source >( goto_sleep: bool daemon: Daemon = Depends(dependency=<function get_daemon at 0x7f9d31fe2c00>, use_cache=True, scope=None) )
Stop the daemon, optionally putting the robot to sleep.
reachy_mini.daemon.app.routers.daemon.restart_daemon
< source >( request: Request daemon: Daemon = Depends(dependency=<function get_daemon at 0x7f9d31fe2c00>, use_cache=True, scope=None) )
Restart the daemon.
reachy_mini.daemon.app.routers.daemon.get_daemon_status
< source >( daemon: Daemon = Depends(dependency=<function get_daemon at 0x7f9d31fe2c00>, use_cache=True, scope=None) )
Get the current status of the daemon.
State Router
reachy_mini.daemon.app.routers.state.get_head_pose
< source >( use_pose_matrix: bool = False backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) ) → AnyPose
Get the present head pose.
reachy_mini.daemon.app.routers.state.get_body_yaw
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the present body yaw (in radians).
reachy_mini.daemon.app.routers.state.get_antenna_joint_positions
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the present antenna joint positions (in radians) - (left, right).
reachy_mini.daemon.app.routers.state.get_doa
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the Direction of Arrival from the microphone array.
Returns the angle in radians (0=left, π/2=front, π=right) and speech detection status. Returns None if the audio device is not available.
reachy_mini.daemon.app.routers.state.get_full_state
< source >( with_control_mode: bool = True with_head_pose: bool = True with_target_head_pose: bool = False with_head_joints: bool = False with_target_head_joints: bool = False with_body_yaw: bool = True with_target_body_yaw: bool = False with_antenna_positions: bool = True with_target_antenna_positions: bool = False with_passive_joints: bool = False with_doa: bool = False use_pose_matrix: bool = False backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the full robot state, with optional fields.
reachy_mini.daemon.app.routers.state.ws_full_state
< source >( websocket: WebSocket frequency: float = 10.0 with_head_pose: bool = True with_target_head_pose: bool = False with_head_joints: bool = False with_target_head_joints: bool = False with_body_yaw: bool = True with_target_body_yaw: bool = False with_antenna_positions: bool = True with_target_antenna_positions: bool = False with_passive_joints: bool = False with_doa: bool = False use_pose_matrix: bool = False backend: Backend = Depends(dependency=<function ws_get_backend at 0x7f9d31fbb560>, use_cache=True, scope=None) )
WebSocket endpoint to stream the full state of the robot.
Motors Router
reachy_mini.daemon.app.routers.motors.get_motor_status
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the current status of the motors.
reachy_mini.daemon.app.routers.motors.set_motor_mode
< source >( mode: MotorControlMode backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Set the motor control mode.
Move Router
Get a list of currently running move tasks.
reachy_mini.daemon.app.routers.move.goto
< source >( goto_req: GotoModelRequest backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Request a movement to a specific target.
reachy_mini.daemon.app.routers.move.play_wake_up
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Request the robot to wake up.
reachy_mini.daemon.app.routers.move.play_goto_sleep
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Request the robot to go to sleep.
List available recorded moves in a dataset.
reachy_mini.daemon.app.routers.move.play_recorded_move_dataset
< source >( dataset_name: str move_name: str backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Request the robot to play a predefined recorded move from a dataset.
Stop a running move task.
reachy_mini.daemon.app.routers.move.set_target
< source >( target: FullBodyTarget backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
POST route to set a single FullBodyTarget.
WebSocket route to stream move updates.
Apps Router
reachy_mini.daemon.app.routers.apps.list_available_apps
< source >( source_kind: SourceKind app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
List available apps (including not installed).
reachy_mini.daemon.app.routers.apps.list_all_available_apps
< source >( app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
List all available apps (including not installed).
reachy_mini.daemon.app.routers.apps.install_app
< source >( app_info: AppInfo app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Install a new app by its info (background, returns job_id).
reachy_mini.daemon.app.routers.apps.remove_app
< source >( app_name: str app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Remove an installed app by its name (background, returns job_id).
Get status/logs for a job.
WebSocket route to stream live job status/logs for a job, sending updates as soon as new logs are available.
reachy_mini.daemon.app.routers.apps.start_app
< source >( app_name: str app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Start an app by its name.
reachy_mini.daemon.app.routers.apps.restart_app
< source >( app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Restart the currently running app.
reachy_mini.daemon.app.routers.apps.stop_app
< source >( app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Stop the currently running app.
reachy_mini.daemon.app.routers.apps.current_app_status
< source >( app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Get the status of the currently running app, if any.
reachy_mini.daemon.app.routers.apps.install_private_space
< source >( request: PrivateSpaceInstallRequest app_manager: AppManager = Depends(dependency=<function get_app_manager at 0x7f9d31fe3240>, use_cache=True, scope=None) )
Install a private HuggingFace space.
Requires HF token to be stored via /api/hf-auth/save-token first.
Update Router
Check if an update is available for Reachy Mini Wireless.
Start the update process for Reachy Mini Wireless version.
Get the info of an update job.
reachy_mini.daemon.app.routers.update.websocket_logs
< source >( websocket: WebSocket job_id: str )
WebSocket endpoint to stream update logs in real time.
Cache Router
Clear HuggingFace cache directory.
Remove applications virtual environment directory.
Kinematics Router
reachy_mini.daemon.app.routers.kinematics.get_kinematics_info
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the current information of the kinematics.
reachy_mini.daemon.app.routers.kinematics.get_urdf
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Get the URDF representation of the robot.
Get the path to an STL asset file.
Volume Router
Get the current output volume level.
reachy_mini.daemon.app.routers.volume.set_volume
< source >( volume_req: VolumeRequest backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Set the output volume level and play a test sound.
reachy_mini.daemon.app.routers.volume.play_test_sound
< source >( backend: Backend = Depends(dependency=<function get_backend at 0x7f9d31fe23e0>, use_cache=True, scope=None) )
Play a test sound.
Get the current microphone input volume level.
reachy_mini.daemon.app.routers.volume.set_microphone_volume
< source >( volume_req: VolumeRequest )
Set the microphone input volume level.
Logs Router
WebSocket endpoint to stream journalctl logs for reachy-mini-daemon service in real time.
HF Auth Router
Save HuggingFace token after validation.
Check if user is authenticated with HuggingFace.
Delete stored HuggingFace token.