Skip to main content

Daemon

Core Daemon Classes

reachy_mini.daemon.daemon.Daemon

Source

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

Source

Restart the Reachy Mini daemon.

Parameters:

NameTypeDescription
simboolIf True, run in simulation mode using Mujoco. Defaults to None (uses the previous value).
mockup_simboolIf True, run in lightweight simulation mode (no MuJoCo). Defaults to None (uses the previous value).
serialportstrSerial port for real motors. Defaults to None (uses the previous value).
scenestrName of the scene to load in simulation mode ("empty" or "minimal"). Defaults to None (uses the previous value).
headlessboolIf True, run Mujoco in headless mode (no GUI). Defaults to None (uses the previous value).
use_audioboolIf True, enable audio. Defaults to None (uses the previous value).
localhost_onlyboolIf True, restrict the server to localhost only clients. Defaults to None (uses the previous value).
wake_up_on_startboolIf True, wake up Reachy Mini on start. Defaults to None (don't wake up).
goto_sleep_on_stopboolIf True, put Reachy Mini to sleep on stop. Defaults to None (don't go to sleep).

Returns:

TypeDescription
DaemonStateThe current state of the daemon after attempting to restart it.

run4ever

Source

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:

NameTypeDescription
simboolIf True, run in simulation mode using Mujoco. Defaults to False.
mockup_simboolIf True, run in lightweight simulation mode (no MuJoCo). Defaults to False.
serialportstrSerial port for real motors. Defaults to "auto", which will try to find the port automatically.
scenestrName of the scene to load in simulation mode ("empty" or "minimal"). Defaults to "empty".
localhost_onlyboolIf True, restrict the server to localhost only clients. Defaults to True.
wake_up_on_startboolIf True, wake up Reachy Mini on start. Defaults to True.
goto_sleep_on_stopboolIf True, put Reachy Mini to sleep on stop. Defaults to True.
check_collisionboolIf True, enable collision checking. Defaults to False.
kinematics_enginestrKinematics engine to use. Defaults to "AnalyticalKinematics".
headlessboolIf True, run Mujoco in headless mode (no GUI). Defaults to False.
use_audioboolIf True, enable audio. Defaults to True.

start

Source

Start the Reachy Mini daemon.

Parameters:

NameTypeDescription
simboolIf True, run in simulation mode using Mujoco. Defaults to False.
mockup_simboolIf True, run in lightweight simulation mode (no MuJoCo). Defaults to False.
serialportstrSerial port for real motors. Defaults to "auto", which will try to find the port automatically.
scenestrName of the scene to load in simulation mode ("empty" or "minimal"). Defaults to "empty".
localhost_onlyboolIf True, restrict the server to localhost only clients. Defaults to True.
wake_up_on_startboolIf True, wake up Reachy Mini on start. Defaults to True.
check_collisionboolIf True, enable collision checking. Defaults to False.
kinematics_enginestrKinematics engine to use. Defaults to "AnalyticalKinematics".
headlessboolIf True, run Mujoco in headless mode (no GUI). Defaults to False.
use_audioboolIf True, enable audio. Defaults to True.
hardware_config_filepathstr | NonePath to the hardware configuration YAML file. Defaults to None.

Returns:

TypeDescription
DaemonStateThe current state of the daemon after attempting to start it.

status

Source

Get the current status of the Reachy Mini daemon.


stop

Source

Stop the Reachy Mini daemon.

Parameters:

NameTypeDescription
goto_sleep_on_stopboolIf True, put Reachy Mini to sleep on stop. Defaults to True.

Returns:

TypeDescription
DaemonStateThe current state of the daemon after attempting to stop it.

reachy_mini.daemon.daemon.DaemonState

Source

Enum representing the state of the Reachy Mini daemon.


reachy_mini.daemon.daemon.DaemonStatus

Source

Dataclass representing the status of the Reachy Mini daemon.


Backend Classes

Abstract Backend

reachy_mini.daemon.backend.abstract.MotorControlMode

Source

Enum for motor control modes.


Robot Backend

reachy_mini.daemon.backend.robot.RobotBackend

Source

Real robot backend for Reachy Mini.

Methods

close

Source

Close the motor controller connection and release resources.


compensate_head_gravity

Source

Calculate the currents necessary to compensate for gravity.


disable_motors

Source

Disable the motors by turning the torque off.


enable_motors

Source

Enable the motors by turning the torque on.


get_all_joint_positions

Source

Get the current joint positions of the robot.

Returns:

TypeDescription
tupleA 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

Source

Get current IMU data (accelerometer, gyroscope, quaternion, temperature).

Returns:

TypeDescription
dict | NoneDict with 'accelerometer', 'gyroscope', 'quaternion', and 'temperature' keys, or None if IMU is not available.

get_present_antenna_joint_positions

Source

Get the current joint positions of the antennas.

Returns:

TypeDescription
listA list of joint positions for the antennas.

get_present_head_joint_positions

Source

Get the current joint positions of the head.

Returns:

TypeDescription
listA list of joint positions for the head, including the body rotation.

get_status

Source

Get the current status of the robot backend.


read_hardware_errors

Source

Read hardware errors from the motor controller.


run

Source

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

Change the operation mode of the antennas motors.

warning

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:

NameTypeDescription
modeintThe operation mode for the antennas motors (0: torque control, 3: position control, 5: current-based position control).

set_head_operation_mode

Source

Change the operation mode of the head motors.

The operation modes can be:

  • 0: torque control
  • 3: position control
  • 5: current-based position control
warning

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:

NameTypeDescription
modeintThe operation mode for the head motors.

set_motor_torque_ids

Source

Set the torque state for specific motor names.

Parameters:

NameTypeDescription
idslist[int]List of motor IDs to set the torque state for.
onboolTrue to enable torque, False to disable.

reachy_mini.daemon.backend.robot.RobotBackendStatus

Source

Status of the Robot Backend.


MuJoCo Backend

reachy_mini.daemon.backend.mujoco.MujocoMockupBackend

Source

Mockup class to avoid import errors when MuJoCo is not installed.


reachy_mini.daemon.backend.mujoco.MujocoMockupBackendStatus

Source

Mockup class to avoid import errors when MuJoCo is not installed.


Mockup Simulation Backend

reachy_mini.daemon.backend.mockup_sim.MockupSimBackend

Source

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

Source

Get the current joint positions of the antennas.


get_present_head_joint_positions

Source

Get the current joint positions of the head.


get_status

Source

Get the status of the backend.


run

Source

Run the simulation loop.

In mockup-sim mode, target positions are applied immediately.


set_motor_torque_ids

Source

Set the motor torque state for specific motor names.

note

No-op in mockup-sim mode.


reachy_mini.daemon.backend.mockup_sim.MockupSimBackendStatus

Source

Status of the MockupSim backend.


Daemon Utilities

reachy_mini.daemon.utils.convert_enum_to_dict

Source

Convert a dataclass containing Enums to a dictionary with enum values.


reachy_mini.daemon.utils.find_serial_port

Source

Find the serial port for Reachy Mini based on VID and PID or the Raspberry Pi UART for the wireless version.

Parameters:

NameTypeDescription
wireless_versionboolWhether to look for the wireless version using the Raspberry Pi UART.
vidstrVendor ID of the device. (eg. "1a86").
pidstrProduct ID of the device. (eg. "55d3").
pi_uartstrPath to the Raspberry Pi UART device. (eg. "/dev/ttyAMA3").

reachy_mini.daemon.utils.get_ip_address

Source

Get the IP address of a specific network interface (Linux and Windows).


App

Models

reachy_mini.daemon.app.models.Matrix4x4Pose

Source

Represent a 3D pose by its 4x4 transformation matrix (translation is expressed in meters).


reachy_mini.daemon.app.models.XYZRPYPose

Source

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

Source

Represent the full body including the head pose and the joints for antennas.


reachy_mini.daemon.app.models.DoAInfo

Source

Direction of Arrival info from the microphone array.


reachy_mini.daemon.app.models.FullState

Source

Represent the full state of the robot including all joint positions and poses.


Dependencies

reachy_mini.daemon.app.dependencies.get_daemon

Source

Get the daemon as request dependency.


reachy_mini.daemon.app.dependencies.get_backend

Source

Get the backend as request dependency.


reachy_mini.daemon.app.dependencies.get_app_manager

Source

Get the app manager as request dependency.


reachy_mini.daemon.app.dependencies.ws_get_backend

Source

Get the backend as websocket dependency.


Jobs

reachy_mini.daemon.app.bg_job_register.JobStatus

Source

Enum for job status.


reachy_mini.daemon.app.bg_job_register.JobInfo

Source

Pydantic model for install job status.


reachy_mini.daemon.app.bg_job_register.JobHandler

Source

Handler for background jobs.


reachy_mini.daemon.app.bg_job_register.run_command

Source

Start a background job, with a custom logger and return its job_id.


reachy_mini.daemon.app.bg_job_register.get_info

Source

Get the info of a job by its ID.


reachy_mini.daemon.app.bg_job_register.ws_poll_info

Source

WebSocket endpoint to stream job logs in real time.


Main Application

reachy_mini.daemon.app.main.Args

Source

Arguments for configuring the Reachy Mini daemon.


reachy_mini.daemon.app.main.create_app

Source

Create and configure the FastAPI application.


reachy_mini.daemon.app.main.run_app

Source

Run the FastAPI app with Uvicorn.


reachy_mini.daemon.app.main

Source

Run the FastAPI app with Uvicorn.


App Routers

Daemon Router

reachy_mini.daemon.app.routers.daemon.start_daemon

Source

Start the daemon.


reachy_mini.daemon.app.routers.daemon.stop_daemon

Source

Stop the daemon, optionally putting the robot to sleep.


reachy_mini.daemon.app.routers.daemon.restart_daemon

Source

Restart the daemon.


reachy_mini.daemon.app.routers.daemon.get_daemon_status

Source

Get the current status of the daemon.


State Router

reachy_mini.daemon.app.routers.state.get_head_pose

Source

Get the present head pose.

Parameters:

NameTypeDescription
use_pose_matrixboolWhether to use the pose matrix representation (4x4 flattened) or the translation + Euler angles representation (x, y, z, roll, pitch, yaw).
backendBackendThe backend instance.

Returns:

TypeDescription
AnyPoseThe present head pose.

reachy_mini.daemon.app.routers.state.get_body_yaw

Source

Get the present body yaw (in radians).


reachy_mini.daemon.app.routers.state.get_antenna_joint_positions

Source

Get the present antenna joint positions (in radians) - (left, right).


reachy_mini.daemon.app.routers.state.get_doa

Source

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

Get the full robot state, with optional fields.


reachy_mini.daemon.app.routers.state.ws_full_state

Source

WebSocket endpoint to stream the full state of the robot.


Motors Router

reachy_mini.daemon.app.routers.motors.get_motor_status

Source

Get the current status of the motors.


reachy_mini.daemon.app.routers.motors.set_motor_mode

Source

Set the motor control mode.


Move Router

reachy_mini.daemon.app.routers.move.get_running_moves

Source

Get a list of currently running move tasks.


reachy_mini.daemon.app.routers.move.goto

Source

Request a movement to a specific target.


reachy_mini.daemon.app.routers.move.play_wake_up

Source

Request the robot to wake up.


reachy_mini.daemon.app.routers.move.play_goto_sleep

Source

Request the robot to go to sleep.


reachy_mini.daemon.app.routers.move.list_recorded_move_dataset

Source

List available recorded moves in a dataset.


reachy_mini.daemon.app.routers.move.play_recorded_move_dataset

Source

Request the robot to play a predefined recorded move from a dataset.


reachy_mini.daemon.app.routers.move.stop_move

Source

Stop a running move task.


reachy_mini.daemon.app.routers.move.set_target

Source

POST route to set a single FullBodyTarget.


reachy_mini.daemon.app.routers.move.ws_move_updates

Source

WebSocket route to stream move updates.


Apps Router

reachy_mini.daemon.app.routers.apps.list_available_apps

Source

List available apps (including not installed).


reachy_mini.daemon.app.routers.apps.list_all_available_apps

Source

List all available apps (including not installed).


reachy_mini.daemon.app.routers.apps.install_app

Source

Install a new app by its info (background, returns job_id).


reachy_mini.daemon.app.routers.apps.remove_app

Source

Remove an installed app by its name (background, returns job_id).


reachy_mini.daemon.app.routers.apps.job_status

Source

Get status/logs for a job.


reachy_mini.daemon.app.routers.apps.ws_apps_manager

Source

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

Start an app by its name.


reachy_mini.daemon.app.routers.apps.restart_app

Source

Restart the currently running app.


reachy_mini.daemon.app.routers.apps.stop_app

Source

Stop the currently running app.


reachy_mini.daemon.app.routers.apps.current_app_status

Source

Get the status of the currently running app, if any.


reachy_mini.daemon.app.routers.apps.install_private_space

Source

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

Source

Check if an update is available for Reachy Mini Wireless.


reachy_mini.daemon.app.routers.update.start_update

Source

Start the update process for Reachy Mini Wireless version.


reachy_mini.daemon.app.routers.update.get_update_info

Source

Get the info of an update job.


reachy_mini.daemon.app.routers.update.websocket_logs

Source

WebSocket endpoint to stream update logs in real time.


Cache Router

reachy_mini.daemon.app.routers.cache.clear_huggingface_cache

Source

Clear HuggingFace cache directory.


reachy_mini.daemon.app.routers.cache.reset_apps

Source

Remove applications virtual environment directory.


Kinematics Router

reachy_mini.daemon.app.routers.kinematics.get_kinematics_info

Source

Get the current information of the kinematics.


reachy_mini.daemon.app.routers.kinematics.get_urdf

Source

Get the URDF representation of the robot.


reachy_mini.daemon.app.routers.kinematics.get_stl_file

Source

Get the path to an STL asset file.


Volume Router

reachy_mini.daemon.app.routers.volume.get_volume

Source

Get the current output volume level.


reachy_mini.daemon.app.routers.volume.set_volume

Source

Set the output volume level and play a test sound.


reachy_mini.daemon.app.routers.volume.play_test_sound

Source

Play a test sound.


reachy_mini.daemon.app.routers.volume.get_microphone_volume

Source

Get the current microphone input volume level.


reachy_mini.daemon.app.routers.volume.set_microphone_volume

Source

Set the microphone input volume level.


Logs Router

reachy_mini.daemon.app.routers.logs.websocket_daemon_logs

Source

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

Source

Save HuggingFace token after validation.


reachy_mini.daemon.app.routers.hf_auth.get_auth_status

Source

Check if user is authenticated with HuggingFace.


reachy_mini.daemon.app.routers.hf_auth.delete_token

Source

Delete stored HuggingFace token.

Loading Comments...