Daemon
Core Daemon Classes
reachy_mini.daemon.daemon.Daemon
Daemon for simulated or real Reachy Mini robot.
Runs the server with the appropriate backend (Mujoco for simulation or RobotBackend for real hardware).
Methods
restart
Restart the Reachy Mini daemon.
Parameters:
| Name | Type | Description |
|---|---|---|
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:
| Type | Description |
|---|---|
DaemonState | The current state of the daemon after attempting to restart it. |
run4ever
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).
Parameters:
| Name | Type | Description |
|---|---|---|
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. |
start
Start the Reachy Mini daemon.
Parameters:
| Name | Type | Description |
|---|---|---|
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:
| Type | Description |
|---|---|
DaemonState | The current state of the daemon after attempting to start it. |
status
Get the current status of the Reachy Mini daemon.
stop
Stop the Reachy Mini daemon.
Parameters:
| Name | Type | Description |
|---|---|---|
goto_sleep_on_stop | bool | If True, put Reachy Mini to sleep on stop. Defaults to True. |
Returns:
| Type | Description |
|---|---|
DaemonState | The current state of the daemon after attempting to stop it. |
reachy_mini.daemon.daemon.DaemonState
Enum representing the state of the Reachy Mini daemon.
reachy_mini.daemon.daemon.DaemonStatus
Dataclass representing the status of the Reachy Mini daemon.
Backend Classes
Abstract Backend
reachy_mini.daemon.backend.abstract.MotorControlMode
Enum for motor control modes.
Robot Backend
reachy_mini.daemon.backend.robot.RobotBackend
Real robot backend for Reachy Mini.
Methods
close
Close the motor controller connection and release resources.
compensate_head_gravity
Calculate the currents necessary to compensate for gravity.
disable_motors
Disable the motors by turning the torque off.
enable_motors
Enable the motors by turning the torque on.
get_all_joint_positions
Get the current joint positions of the robot.
Returns:
| Type | Description |
|---|---|
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_imu_data
Get current IMU data (accelerometer, gyroscope, quaternion, temperature).
Returns:
| Type | Description |
|---|---|
dict | None | Dict with 'accelerometer', 'gyroscope', 'quaternion', and 'temperature' keys, or None if IMU is not available. |
get_present_antenna_joint_positions
Get the current joint positions of the antennas.
Returns:
| Type | Description |
|---|---|
list | A list of joint positions for the antennas. |
get_present_head_joint_positions
Get the current joint positions of the head.
Returns:
| Type | Description |
|---|---|
list | A list of joint positions for the head, including the body rotation. |
get_status
Get the current status of the robot backend.
read_hardware_errors
Read hardware errors from the motor controller.
run
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
Change the operation mode of the antennas motors.
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.
Parameters:
| Name | Type | Description |
|---|---|---|
mode | int | The operation mode for the antennas motors (0: torque control, 3: position control, 5: current-based position control). |
set_head_operation_mode
Change the operation mode of the head motors.
The operation modes can be:
- 0: torque control
- 3: position control
- 5: current-based position control
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.
Parameters:
| Name | Type | Description |
|---|---|---|
mode | int | The operation mode for the head motors. |
set_motor_torque_ids
Set the torque state for specific motor names.
Parameters:
| Name | Type | Description |
|---|---|---|
ids | list[int] | List of motor IDs to set the torque state for. |
on | bool | True to enable torque, False to disable. |
reachy_mini.daemon.backend.robot.RobotBackendStatus
Status of the Robot Backend.
MuJoCo Backend
reachy_mini.daemon.backend.mujoco.MujocoMockupBackend
Mockup class to avoid import errors when MuJoCo is not installed.
reachy_mini.daemon.backend.mujoco.MujocoMockupBackendStatus
Mockup class to avoid import errors when MuJoCo is not installed.
Mockup Simulation Backend
reachy_mini.daemon.backend.mockup_sim.MockupSimBackend
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).
Methods
get_present_antenna_joint_positions
Get the current joint positions of the antennas.
get_present_head_joint_positions
Get the current joint positions of the head.
get_status
Get the status of the backend.
run
Run the simulation loop.
In mockup-sim mode, target positions are applied immediately.
set_motor_torque_ids
Set the motor torque state for specific motor names.
No-op in mockup-sim mode.
reachy_mini.daemon.backend.mockup_sim.MockupSimBackendStatus
Status of the MockupSim backend.
Daemon Utilities
reachy_mini.daemon.utils.convert_enum_to_dict
Convert a dataclass containing Enums to a dictionary with enum values.
reachy_mini.daemon.utils.find_serial_port
Find the serial port for Reachy Mini based on VID and PID or the Raspberry Pi UART for the wireless version.
Parameters:
| Name | Type | Description |
|---|---|---|
wireless_version | bool | Whether to look for the wireless version using the Raspberry Pi UART. |
vid | str | Vendor ID of the device. (eg. "1a86"). |
pid | str | Product ID of the device. (eg. "55d3"). |
pi_uart | str | Path to the Raspberry Pi UART device. (eg. "/dev/ttyAMA3"). |
reachy_mini.daemon.utils.get_ip_address
Get the IP address of a specific network interface (Linux and Windows).
App
Models
reachy_mini.daemon.app.models.Matrix4x4Pose
Represent a 3D pose by its 4x4 transformation matrix (translation is expressed in meters).
reachy_mini.daemon.app.models.XYZRPYPose
Represent a 3D pose using position (x, y, z) in meters and orientation (roll, pitch, yaw) angles in radians.
reachy_mini.daemon.app.models.FullBodyTarget
Represent the full body including the head pose and the joints for antennas.
reachy_mini.daemon.app.models.DoAInfo
Direction of Arrival info from the microphone array.
reachy_mini.daemon.app.models.FullState
Represent the full state of the robot including all joint positions and poses.
Dependencies
reachy_mini.daemon.app.dependencies.get_daemon
Get the daemon as request dependency.
reachy_mini.daemon.app.dependencies.get_backend
Get the backend as request dependency.
reachy_mini.daemon.app.dependencies.get_app_manager
Get the app manager as request dependency.
reachy_mini.daemon.app.dependencies.ws_get_backend
Get the backend as websocket dependency.
Jobs
reachy_mini.daemon.app.bg_job_register.JobStatus
Enum for job status.
reachy_mini.daemon.app.bg_job_register.JobInfo
Pydantic model for install job status.
reachy_mini.daemon.app.bg_job_register.JobHandler
Handler for background jobs.
reachy_mini.daemon.app.bg_job_register.run_command
Start a background job, with a custom logger and return its job_id.
reachy_mini.daemon.app.bg_job_register.get_info
Get the info of a job by its ID.
reachy_mini.daemon.app.bg_job_register.ws_poll_info
WebSocket endpoint to stream job logs in real time.
Main Application
reachy_mini.daemon.app.main.Args
Arguments for configuring the Reachy Mini daemon.
reachy_mini.daemon.app.main.create_app
Create and configure the FastAPI application.
reachy_mini.daemon.app.main.run_app
Run the FastAPI app with Uvicorn.
reachy_mini.daemon.app.main
Run the FastAPI app with Uvicorn.
App Routers
Daemon Router
reachy_mini.daemon.app.routers.daemon.start_daemon
Start the daemon.
reachy_mini.daemon.app.routers.daemon.stop_daemon
Stop the daemon, optionally putting the robot to sleep.
reachy_mini.daemon.app.routers.daemon.restart_daemon
Restart the daemon.
reachy_mini.daemon.app.routers.daemon.get_daemon_status
Get the current status of the daemon.
State Router
reachy_mini.daemon.app.routers.state.get_head_pose
Get the present head pose.
Parameters:
| Name | Type | Description |
|---|---|---|
use_pose_matrix | bool | Whether to use the pose matrix representation (4x4 flattened) or the translation + Euler angles representation (x, y, z, roll, pitch, yaw). |
backend | Backend | The backend instance. |
Returns:
| Type | Description |
|---|---|
AnyPose | The present head pose. |
reachy_mini.daemon.app.routers.state.get_body_yaw
Get the present body yaw (in radians).
reachy_mini.daemon.app.routers.state.get_antenna_joint_positions
Get the present antenna joint positions (in radians) - (left, right).
reachy_mini.daemon.app.routers.state.get_doa
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
Get the full robot state, with optional fields.
reachy_mini.daemon.app.routers.state.ws_full_state
WebSocket endpoint to stream the full state of the robot.
Motors Router
reachy_mini.daemon.app.routers.motors.get_motor_status
Get the current status of the motors.
reachy_mini.daemon.app.routers.motors.set_motor_mode
Set the motor control mode.
Move Router
reachy_mini.daemon.app.routers.move.get_running_moves
Get a list of currently running move tasks.
reachy_mini.daemon.app.routers.move.goto
Request a movement to a specific target.
reachy_mini.daemon.app.routers.move.play_wake_up
Request the robot to wake up.
reachy_mini.daemon.app.routers.move.play_goto_sleep
Request the robot to go to sleep.
reachy_mini.daemon.app.routers.move.list_recorded_move_dataset
List available recorded moves in a dataset.
reachy_mini.daemon.app.routers.move.play_recorded_move_dataset
Request the robot to play a predefined recorded move from a dataset.
reachy_mini.daemon.app.routers.move.stop_move
Stop a running move task.
reachy_mini.daemon.app.routers.move.set_target
POST route to set a single FullBodyTarget.
reachy_mini.daemon.app.routers.move.ws_move_updates
WebSocket route to stream move updates.
Apps Router
reachy_mini.daemon.app.routers.apps.list_available_apps
List available apps (including not installed).
reachy_mini.daemon.app.routers.apps.list_all_available_apps
List all available apps (including not installed).
reachy_mini.daemon.app.routers.apps.install_app
Install a new app by its info (background, returns job_id).
reachy_mini.daemon.app.routers.apps.remove_app
Remove an installed app by its name (background, returns job_id).
reachy_mini.daemon.app.routers.apps.job_status
Get status/logs for a job.
reachy_mini.daemon.app.routers.apps.ws_apps_manager
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
Start an app by its name.
reachy_mini.daemon.app.routers.apps.restart_app
Restart the currently running app.
reachy_mini.daemon.app.routers.apps.stop_app
Stop the currently running app.
reachy_mini.daemon.app.routers.apps.current_app_status
Get the status of the currently running app, if any.
reachy_mini.daemon.app.routers.apps.install_private_space
Install a private HuggingFace space.
Requires HF token to be stored via /api/hf-auth/save-token first.
Update Router
reachy_mini.daemon.app.routers.update.available
Check if an update is available for Reachy Mini Wireless.
reachy_mini.daemon.app.routers.update.start_update
Start the update process for Reachy Mini Wireless version.
reachy_mini.daemon.app.routers.update.get_update_info
Get the info of an update job.
reachy_mini.daemon.app.routers.update.websocket_logs
WebSocket endpoint to stream update logs in real time.
Cache Router
reachy_mini.daemon.app.routers.cache.clear_huggingface_cache
Clear HuggingFace cache directory.
reachy_mini.daemon.app.routers.cache.reset_apps
Remove applications virtual environment directory.
Kinematics Router
reachy_mini.daemon.app.routers.kinematics.get_kinematics_info
Get the current information of the kinematics.
reachy_mini.daemon.app.routers.kinematics.get_urdf
Get the URDF representation of the robot.
reachy_mini.daemon.app.routers.kinematics.get_stl_file
Get the path to an STL asset file.
Volume Router
reachy_mini.daemon.app.routers.volume.get_volume
Get the current output volume level.
reachy_mini.daemon.app.routers.volume.set_volume
Set the output volume level and play a test sound.
reachy_mini.daemon.app.routers.volume.play_test_sound
Play a test sound.
reachy_mini.daemon.app.routers.volume.get_microphone_volume
Get the current microphone input volume level.
reachy_mini.daemon.app.routers.volume.set_microphone_volume
Set the microphone input volume level.
Logs Router
reachy_mini.daemon.app.routers.logs.websocket_daemon_logs
WebSocket endpoint to stream journalctl logs for reachy-mini-daemon service in real time.
HF Auth Router
reachy_mini.daemon.app.routers.hf_auth.save_token
Save HuggingFace token after validation.
reachy_mini.daemon.app.routers.hf_auth.get_auth_status
Check if user is authenticated with HuggingFace.
reachy_mini.daemon.app.routers.hf_auth.delete_token
Delete stored HuggingFace token.