Buckets:

|
download
raw
44.9 kB
# Daemon
## Core Daemon Classes[[reachy_mini.daemon.daemon.Daemon]]
#### reachy_mini.daemon.daemon.Daemon[[reachy_mini.daemon.daemon.Daemon]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L33)
Daemon for simulated or real Reachy Mini robot.
Runs the server with the appropriate backend (Mujoco for simulation or RobotBackend for real hardware).
acquire_mediareachy_mini.daemon.daemon.Daemon.acquire_mediahttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L143[]
Re-acquire camera and audio hardware after a release.
Restarts the GstMediaServer pipeline and central signalling relay.
Idempotent: no-op if not currently released or no media server.
#### release_media[[reachy_mini.daemon.daemon.Daemon.release_media]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L127)
Release camera and audio hardware so clients can access them directly.
Stops the GstMediaServer pipeline and central signalling relay.
Idempotent: no-op if already released or no media server.
#### restart[[reachy_mini.daemon.daemon.Daemon.restart]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L454)
Restart the Reachy Mini daemon.
**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.
#### start[[reachy_mini.daemon.daemon.Daemon.start]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L212)
Start the Reachy Mini daemon.
**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.
#### status[[reachy_mini.daemon.daemon.Daemon.status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L524)
Get the current status of the Reachy Mini daemon.
#### stop[[reachy_mini.daemon.daemon.Daemon.stop]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/daemon.py#L360)
Stop the Reachy Mini daemon.
Note:
The relay releases its remote hold on `self.robot_app_lock` via
`relay.stop()`. A local-app hold is *not* force-released here
because the daemon is going down; the lock object dies with the
process. If restart-in-place is ever added, force-release the
`LOCAL_APP` state here before restart.
**Parameters:**
goto_sleep_on_stop (bool) : If True, put Reachy Mini to sleep on stop. Defaults to True.
**Returns:**
`DaemonState`
The current state of the daemon after attempting to stop it.
#### reachy_mini.io.protocol.DaemonState[[reachy_mini.io.protocol.DaemonState]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L39)
Enum representing the state of the Reachy Mini daemon.
#### reachy_mini.io.protocol.DaemonStatus[[reachy_mini.io.protocol.DaemonStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L79)
Status of the Reachy Mini daemon.
## Robot App Lock
The robot *app lock* is the daemon's single source of truth for which
managed app currently holds the robot. It serializes the two managed
entry points — local Python apps launched by :class:`AppManager` and
remote WebRTC clients routed through the central signaling relay.
It does **not** gate every code path that can drive the robot: SDK
clients talking to the daemon directly over LAN/WebSocket bypass it.
The name uses "app" deliberately to reflect that narrower scope.
### Concurrency model
Two managed entry points can open a session with the robot:
1. **Local path** — a Python app launched via
``POST /api/apps/start``. Runs as a subprocess of the daemon,
talks to the backend directly.
2. **Remote path** — a browser client authenticated through the
HuggingFace central signaling server, routed to the robot over
WebRTC. Handled by ``CentralSignalingRelay`` in its own thread.
Without coordination, both paths can grab the robot at the same time
and fight over motor commands, camera, and audio. :class:`RobotAppLock`
prevents that with three mutually exclusive states:
- ``free`` — no managed app holds the slot.
- ``local_app(name)`` — a Python app is running.
- ``remote_session(name)`` — a remote WebRTC client is connected.
**Acquire rules:**
- The local path uses :meth:`RobotAppLock.acquire_local_evicting_remote`.
If a remote session is active, the lock is transitioned atomically
to ``local_app`` and the relay is asked to send ``endSession`` to
the remote peer and to local GStreamer so the existing WebRTC
connection tears down cleanly. If another Python app already holds
the lock, the acquire raises ``RuntimeError``.
- The remote path uses :meth:`RobotAppLock.try_acquire_remote`. This
fails fast (returns ``False``) whenever the lock is not ``free`` —
incoming remote sessions are refused with
``{"type": "endSession", "reason": "robot_busy_local_app"}``.
**Release rules:**
- :meth:`RobotAppLock.release_local` is called from the subprocess
monitor's ``finally`` block, so clean exits, crashes, ``SIGKILL``,
OOM and task cancellation all release the lock.
- :meth:`RobotAppLock.release_remote` is called from every
``endSession`` handler (both directions), from
``_close_connections`` on disconnect/reconnect, and from the relay's
``stop()``. All release calls are idempotent — they no-op if the
lock is not in the corresponding state.
**Cross-thread considerations:** the lock state is guarded by a
``threading.Lock``. The eviction callback is registered by the relay
and invoked by AppManager from the main asyncio loop, but dispatches
the actual session tear-down onto the relay's own event loop via
``asyncio.run_coroutine_threadsafe``. AppManager awaits the tear-down
before spawning the Python subprocess, so the remote peer has
released its media handles before the local app opens them.
### API reference[[reachy_mini.daemon.robot_app_lock.RobotAppLock]]
#### reachy_mini.daemon.robot_app_lock.RobotAppLock[[reachy_mini.daemon.robot_app_lock.RobotAppLock]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L64)
Thread-safe lock coordinating local app and remote session access to the robot.
acquire_local_evicting_remotereachy_mini.daemon.robot_app_lock.RobotAppLock.acquire_local_evicting_remotehttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L115[{"name": "app_name", "val": ": str"}]- `RuntimeError` -- If another local app already holds the lock. Caller
should not start a second Python app concurrently.`RuntimeError`
Acquire the lock for a local Python app, evicting any remote session.
If a remote session is held, it is transitioned to `local_app`
atomically and the registered eviction handler is invoked (after
releasing the mutex) so the relay can notify the remote peer.
#### release_local[[reachy_mini.daemon.robot_app_lock.RobotAppLock.release_local]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L158)
Release the lock held by a local app.
Idempotent: if the lock is free or held by a remote session, this
is a no-op (with a warning). Safe to call from `monitor_process`
regardless of how the subprocess exited.
**Parameters:**
app_name : Optional name of the app expected to hold the lock. If provided and the current holder differs, logs a warning but still releases — this protects against stale releases after a rapid stop/start cycle.
#### release_remote[[reachy_mini.daemon.robot_app_lock.RobotAppLock.release_remote]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L218)
Release a remote-session hold. Idempotent.
#### set_remote_eviction_handler[[reachy_mini.daemon.robot_app_lock.RobotAppLock.set_remote_eviction_handler]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L91)
Register (or clear) the coroutine invoked when a local acquire evicts a remote session.
The handler must be safe to call from the caller of
`acquire_local_evicting_remote` — typically the main asyncio loop.
Pass `None` to clear.
#### status[[reachy_mini.daemon.robot_app_lock.RobotAppLock.status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L106)
Return a snapshot of the current lock state.
#### try_acquire_remote[[reachy_mini.daemon.robot_app_lock.RobotAppLock.try_acquire_remote]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L194)
Attempt to acquire the lock for a remote WebRTC session.
**Returns:**
True if the lock was acquired (state transitioned to
`remote_session`). False if a local app or another remote
session is already holding it — caller must refuse the
incoming session.
#### reachy_mini.daemon.robot_app_lock.RobotAppLockState[[reachy_mini.daemon.robot_app_lock.RobotAppLockState]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L45)
Lock state enum. Values are stable strings suitable for serialization.
#### reachy_mini.daemon.robot_app_lock.RobotAppLockStatus[[reachy_mini.daemon.robot_app_lock.RobotAppLockStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/robot_app_lock.py#L53)
Snapshot of the lock state, suitable for JSON serialization.
Returned by `RobotAppLock.status` and by the
`GET /api/daemon/robot-app-lock-status` endpoint.
## Backend Classes
### Abstract Backend[[reachy_mini.io.protocol.MotorControlMode]]
#### reachy_mini.io.protocol.MotorControlMode[[reachy_mini.io.protocol.MotorControlMode]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L31)
Enum for motor control modes.
### Robot Backend[[reachy_mini.daemon.backend.robot.RobotBackend]]
#### reachy_mini.daemon.backend.robot.RobotBackend[[reachy_mini.daemon.backend.robot.RobotBackend]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L32)
Real robot backend for Reachy Mini.
closereachy_mini.daemon.backend.robot.RobotBackend.closehttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L313[]
Close the motor controller connection and release resources.
#### compensate_head_gravity[[reachy_mini.daemon.backend.robot.RobotBackend.compensate_head_gravity]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L509)
Calculate the currents necessary to compensate for gravity.
#### disable_motors[[reachy_mini.daemon.backend.robot.RobotBackend.disable_motors]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L333)
Disable the motors by turning the torque off.
#### enable_motors[[reachy_mini.daemon.backend.robot.RobotBackend.enable_motors]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L326)
Enable the motors by turning the torque on.
#### get_all_joint_positions[[reachy_mini.daemon.backend.robot.RobotBackend.get_all_joint_positions]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L435)
Get the current joint positions of the robot.
**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_imu_data[[reachy_mini.daemon.backend.robot.RobotBackend.get_imu_data]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L474)
Get current IMU data (accelerometer, gyroscope, quaternion, temperature).
**Returns:**
An ImuDataMsg, or None if IMU is not available.
#### get_present_antenna_joint_positions[[reachy_mini.daemon.backend.robot.RobotBackend.get_present_antenna_joint_positions]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L463)
Get the current joint positions of the antennas.
**Returns:**
`list`
A list of joint positions for the antennas.
#### get_present_head_joint_positions[[reachy_mini.daemon.backend.robot.RobotBackend.get_present_head_joint_positions]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L452)
Get the current joint positions of the head.
**Returns:**
`list`
A list of joint positions for the head, including the body rotation.
#### get_status[[reachy_mini.daemon.backend.robot.RobotBackend.get_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L320)
Get the current status of the robot backend.
#### read_hardware_errors[[reachy_mini.daemon.backend.robot.RobotBackend.read_hardware_errors]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L610)
Read hardware errors from the motor controller.
#### run[[reachy_mini.daemon.backend.robot.RobotBackend.run]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L138)
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[[reachy_mini.daemon.backend.robot.RobotBackend.set_antennas_operation_mode]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L395)
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.
**Parameters:**
mode (int) : The operation mode for the antennas motors (0: torque control, 3: position control, 5: current-based position control).
mode (int) : The operation mode for the antennas motors. This could be a specific mode like position control, velocity control, or torque control.
#### set_head_operation_mode[[reachy_mini.daemon.backend.robot.RobotBackend.set_head_operation_mode]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L340)
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.
**Parameters:**
mode (int) : The operation mode for the head motors.
mode (int) : The operation mode for the head motors. This could be a specific mode like position control, velocity control, or torque control.
#### set_motor_torque_ids[[reachy_mini.daemon.backend.robot.RobotBackend.set_motor_torque_ids]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/robot/backend.py#L575)
Set the torque state for specific motor names.
**Parameters:**
ids (list[int]) : List of motor IDs to set the torque state for.
on (bool) : True to enable torque, False to disable.
#### reachy_mini.io.protocol.RobotBackendStatus[[reachy_mini.io.protocol.RobotBackendStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L55)
Status of the Robot Backend.
### MuJoCo Backend[[reachy_mini.daemon.backend.mujoco.MujocoMockupBackend]]
#### reachy_mini.daemon.backend.mujoco.MujocoMockupBackend[[reachy_mini.daemon.backend.mujoco.MujocoMockupBackend]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mujoco/__init__.py#L12)
Mockup class to avoid import errors when MuJoCo is not installed.
#### reachy_mini.io.protocol.MujocoBackendStatus[[reachy_mini.io.protocol.MujocoBackendStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L65)
Status of the Mujoco backend.
### Mockup Simulation Backend[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend]]
#### reachy_mini.daemon.backend.mockup_sim.MockupSimBackend[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L26)
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_present_antenna_joint_positionsreachy_mini.daemon.backend.mockup_sim.MockupSimBackend.get_present_antenna_joint_positionshttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L149[]
Get the current joint positions of the antennas.
#### get_present_head_joint_positions[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend.get_present_head_joint_positions]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L143)
Get the current joint positions of the head.
#### get_status[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend.get_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L139)
Get the status of the backend.
#### run[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend.run]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L73)
Run the simulation loop.
In mockup-sim mode, target positions are applied immediately.
#### set_motor_torque_ids[[reachy_mini.daemon.backend.mockup_sim.MockupSimBackend.set_motor_torque_ids]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/backend/mockup_sim/backend.py#L163)
Set the motor torque state for specific motor names.
No-op in mockup-sim mode.
#### reachy_mini.io.protocol.MockupSimBackendStatus[[reachy_mini.io.protocol.MockupSimBackendStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/io/protocol.py#L72)
Status of the MockupSim backend.
## Daemon Utilities[[reachy_mini.daemon.utils.find_serial_port]]
#### reachy_mini.daemon.utils.find_serial_port[[reachy_mini.daemon.utils.find_serial_port]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/utils.py#L145)
Find the serial port for Reachy Mini based on VID and PID or the Raspberry Pi UART for the wireless version.
**Parameters:**
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[[reachy_mini.daemon.utils.get_ip_address]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/utils.py#L173)
Get the IP address of a specific network interface (Linux and Windows).
## App
### Models[[reachy_mini.daemon.app.models.Matrix4x4Pose]]
#### reachy_mini.daemon.app.models.Matrix4x4Pose[[reachy_mini.daemon.app.models.Matrix4x4Pose]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L14)
Represent a 3D pose by its 4x4 transformation matrix (translation is expressed in meters).
from_pose_arrayreachy_mini.daemon.app.models.Matrix4x4Pose.from_pose_arrayhttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L36[{"name": "arr", "val": ": numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]"}]
Create a Matrix4x4 pose representation from a 4x4 pose array.
#### to_pose_array[[reachy_mini.daemon.app.models.Matrix4x4Pose.to_pose_array]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L63)
Convert the Matrix4x4Pose to a 4x4 numpy array.
#### reachy_mini.daemon.app.models.XYZRPYPose[[reachy_mini.daemon.app.models.XYZRPYPose]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L68)
Represent a 3D pose using position (x, y, z) in meters and orientation (roll, pitch, yaw) angles in radians.
from_pose_arrayreachy_mini.daemon.app.models.XYZRPYPose.from_pose_arrayhttps://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L78[{"name": "arr", "val": ": numpy.ndarray[tuple[typing.Any, ...], numpy.dtype[numpy.float64]]"}]
Create an XYZRPYPose representation from a 4x4 pose array.
#### to_pose_array[[reachy_mini.daemon.app.models.XYZRPYPose.to_pose_array]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L95)
Convert the XYZRPYPose to a 4x4 numpy array.
#### reachy_mini.daemon.app.models.FullBodyTarget[[reachy_mini.daemon.app.models.FullBodyTarget]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L116)
Represent the full body including the head pose and the joints for antennas.
#### reachy_mini.daemon.app.models.DoAInfo[[reachy_mini.daemon.app.models.DoAInfo]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L144)
Direction of Arrival info from the microphone array.
#### reachy_mini.daemon.app.models.FullState[[reachy_mini.daemon.app.models.FullState]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/models.py#L151)
Represent the full state of the robot including all joint positions and poses.
### Dependencies[[reachy_mini.daemon.app.dependencies.get_daemon]]
#### reachy_mini.daemon.app.dependencies.get_daemon[[reachy_mini.daemon.app.dependencies.get_daemon]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/dependencies.py#L10)
Get the daemon as request dependency.
#### reachy_mini.daemon.app.dependencies.get_backend[[reachy_mini.daemon.app.dependencies.get_backend]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/dependencies.py#L16)
Get the backend as request dependency.
#### reachy_mini.daemon.app.dependencies.get_app_manager[[reachy_mini.daemon.app.dependencies.get_app_manager]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/dependencies.py#L27)
Get the app manager as request dependency.
#### reachy_mini.daemon.app.dependencies.ws_get_backend[[reachy_mini.daemon.app.dependencies.ws_get_backend]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/dependencies.py#L33)
Get the backend as websocket dependency.
### Jobs[[reachy_mini.daemon.app.bg_job_register.JobStatus]]
#### reachy_mini.daemon.app.bg_job_register.JobStatus[[reachy_mini.daemon.app.bg_job_register.JobStatus]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L15)
Enum for job status.
#### reachy_mini.daemon.app.bg_job_register.JobInfo[[reachy_mini.daemon.app.bg_job_register.JobInfo]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L24)
Pydantic model for install job status.
#### reachy_mini.daemon.app.bg_job_register.JobHandler[[reachy_mini.daemon.app.bg_job_register.JobHandler]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L33)
Handler for background jobs.
#### reachy_mini.daemon.app.bg_job_register.run_command[[reachy_mini.daemon.app.bg_job_register.run_command]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L44)
Start a background job, with a custom logger and return its job_id.
#### reachy_mini.daemon.app.bg_job_register.get_info[[reachy_mini.daemon.app.bg_job_register.get_info]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L93)
Get the info of a job by its ID.
#### reachy_mini.daemon.app.bg_job_register.ws_poll_info[[reachy_mini.daemon.app.bg_job_register.ws_poll_info]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/bg_job_register.py#L103)
WebSocket endpoint to stream job logs in real time.
### Main Application[[reachy_mini.daemon.app.main.Args]]
#### reachy_mini.daemon.app.main.Args[[reachy_mini.daemon.app.main.Args]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/main.py#L61)
Arguments for configuring the Reachy Mini daemon.
#### reachy_mini.daemon.app.main.create_app[[reachy_mini.daemon.app.main.create_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/main.py#L98)
Create and configure the FastAPI application.
#### reachy_mini.daemon.app.main.run_app[[reachy_mini.daemon.app.main.run_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/main.py#L291)
Run the FastAPI app with Uvicorn.
#### reachy_mini.daemon.app.main[[reachy_mini.daemon.app.main]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/main.py#L422)
Run the FastAPI app with Uvicorn.
## App Routers
### Daemon Router[[reachy_mini.daemon.app.routers.daemon.start_daemon]]
#### reachy_mini.daemon.app.routers.daemon.start_daemon[[reachy_mini.daemon.app.routers.daemon.start_daemon]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/daemon.py#L22)
Start the daemon.
#### reachy_mini.daemon.app.routers.daemon.stop_daemon[[reachy_mini.daemon.app.routers.daemon.stop_daemon]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/daemon.py#L51)
Stop the daemon, optionally putting the robot to sleep.
#### reachy_mini.daemon.app.routers.daemon.restart_daemon[[reachy_mini.daemon.app.routers.daemon.restart_daemon]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/daemon.py#L67)
Restart the daemon.
#### reachy_mini.daemon.app.routers.daemon.get_daemon_status[[reachy_mini.daemon.app.routers.daemon.get_daemon_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/daemon.py#L83)
Get the current status of the daemon.
#### reachy_mini.daemon.app.routers.daemon.get_robot_app_lock_status[[reachy_mini.daemon.app.routers.daemon.get_robot_app_lock_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/daemon.py#L100)
Return the current state of the robot's managed-app lock.
The daemon's single source of truth for which managed app (if any)
currently holds the robot:
- `free`: no managed app holds the slot.
- `local_app`: a Python app launched via AppManager is running.
`holder_name` is the app name.
- `remote_session`: a remote WebRTC client is connected via the
central signaling relay. `holder_name` is a generic `"remote"`
placeholder (the real consumer app name lives on the central
server and is surfaced via its own `/api/robot-status`).
Note that SDK clients talking to the daemon directly bypass this
lock; it only reflects the two *managed* app entry points.
Intended for UI layers (desktop app, dashboard) that want to render
a busy/free indicator without trying to open a session.
### State Router[[reachy_mini.daemon.app.routers.state.get_head_pose]]
#### reachy_mini.daemon.app.routers.state.get_head_pose[[reachy_mini.daemon.app.routers.state.get_head_pose]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L21)
Get the present head pose.
**Parameters:**
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:**
`AnyPose`
The present head pose.
#### reachy_mini.daemon.app.routers.state.get_body_yaw[[reachy_mini.daemon.app.routers.state.get_body_yaw]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L39)
Get the present body yaw (in radians).
#### reachy_mini.daemon.app.routers.state.get_antenna_joint_positions[[reachy_mini.daemon.app.routers.state.get_antenna_joint_positions]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L47)
Get the present antenna joint positions (in radians) - (left, right).
#### reachy_mini.daemon.app.routers.state.get_doa[[reachy_mini.daemon.app.routers.state.get_doa]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L57)
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[[reachy_mini.daemon.app.routers.state.get_full_state]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L74)
Get the full robot state, with optional fields.
#### reachy_mini.daemon.app.routers.state.ws_full_state[[reachy_mini.daemon.app.routers.state.ws_full_state]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/state.py#L130)
WebSocket endpoint to stream the full state of the robot.
### Motors Router[[reachy_mini.daemon.app.routers.motors.get_motor_status]]
#### reachy_mini.daemon.app.routers.motors.get_motor_status[[reachy_mini.daemon.app.routers.motors.get_motor_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/motors.py#L29)
Get the current status of the motors.
#### reachy_mini.daemon.app.routers.motors.set_motor_mode[[reachy_mini.daemon.app.routers.motors.set_motor_mode]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/motors.py#L35)
Set the motor control mode.
### Move Router[[reachy_mini.daemon.app.routers.move.get_running_moves]]
#### reachy_mini.daemon.app.routers.move.get_running_moves[[reachy_mini.daemon.app.routers.move.get_running_moves]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L131)
Get a list of currently running move tasks.
#### reachy_mini.daemon.app.routers.move.goto[[reachy_mini.daemon.app.routers.move.goto]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L137)
Request a movement to a specific target.
#### reachy_mini.daemon.app.routers.move.play_wake_up[[reachy_mini.daemon.app.routers.move.play_wake_up]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L152)
Request the robot to wake up.
#### reachy_mini.daemon.app.routers.move.play_goto_sleep[[reachy_mini.daemon.app.routers.move.play_goto_sleep]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L158)
Request the robot to go to sleep.
#### reachy_mini.daemon.app.routers.move.list_recorded_move_dataset[[reachy_mini.daemon.app.routers.move.list_recorded_move_dataset]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L164)
List available recorded moves in a dataset.
#### reachy_mini.daemon.app.routers.move.play_recorded_move_dataset[[reachy_mini.daemon.app.routers.move.play_recorded_move_dataset]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L177)
Request the robot to play a predefined recorded move from a dataset.
#### reachy_mini.daemon.app.routers.move.stop_move[[reachy_mini.daemon.app.routers.move.stop_move]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L195)
Stop a running move task.
#### reachy_mini.daemon.app.routers.move.set_target[[reachy_mini.daemon.app.routers.move.set_target]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L216)
POST route to set a single FullBodyTarget.
#### reachy_mini.daemon.app.routers.move.ws_move_updates[[reachy_mini.daemon.app.routers.move.ws_move_updates]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/move.py#L201)
WebSocket route to stream move updates.
### Apps Router[[reachy_mini.daemon.app.routers.apps.list_available_apps]]
#### reachy_mini.daemon.app.routers.apps.list_available_apps[[reachy_mini.daemon.app.routers.apps.list_available_apps]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L46)
List available apps (including not installed).
#### reachy_mini.daemon.app.routers.apps.list_all_available_apps[[reachy_mini.daemon.app.routers.apps.list_all_available_apps]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L55)
List all available apps (including not installed).
#### reachy_mini.daemon.app.routers.apps.install_app[[reachy_mini.daemon.app.routers.apps.install_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L63)
Install a new app by its info (background, returns job_id).
#### reachy_mini.daemon.app.routers.apps.remove_app[[reachy_mini.daemon.app.routers.apps.remove_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L78)
Remove an installed app by its name (background, returns job_id).
#### reachy_mini.daemon.app.routers.apps.job_status[[reachy_mini.daemon.app.routers.apps.job_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L91)
Get status/logs for a job.
#### reachy_mini.daemon.app.routers.apps.ws_apps_manager[[reachy_mini.daemon.app.routers.apps.ws_apps_manager]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L101)
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[[reachy_mini.daemon.app.routers.apps.start_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L109)
Start an app by its name.
#### reachy_mini.daemon.app.routers.apps.restart_app[[reachy_mini.daemon.app.routers.apps.restart_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L121)
Restart the currently running app.
#### reachy_mini.daemon.app.routers.apps.stop_app[[reachy_mini.daemon.app.routers.apps.stop_app]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L132)
Stop the currently running app.
#### reachy_mini.daemon.app.routers.apps.current_app_status[[reachy_mini.daemon.app.routers.apps.current_app_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L143)
Get the status of the currently running app, if any.
#### reachy_mini.daemon.app.routers.apps.install_private_space[[reachy_mini.daemon.app.routers.apps.install_private_space]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/apps.py#L157)
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]]
#### reachy_mini.daemon.app.routers.update.available[[reachy_mini.daemon.app.routers.update.available]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/update.py#L32)
Check if an update is available for Reachy Mini Wireless.
#### reachy_mini.daemon.app.routers.update.start_update[[reachy_mini.daemon.app.routers.update.start_update]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/update.py#L58)
Start the update process for Reachy Mini Wireless version.
#### reachy_mini.daemon.app.routers.update.get_update_info[[reachy_mini.daemon.app.routers.update.get_update_info]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/update.py#L117)
Get the info of an update job.
#### reachy_mini.daemon.app.routers.update.websocket_logs[[reachy_mini.daemon.app.routers.update.websocket_logs]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/update.py#L126)
WebSocket endpoint to stream update logs in real time.
### Cache Router[[reachy_mini.daemon.app.routers.cache.clear_huggingface_cache]]
#### reachy_mini.daemon.app.routers.cache.clear_huggingface_cache[[reachy_mini.daemon.app.routers.cache.clear_huggingface_cache]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/cache.py#L13)
Clear HuggingFace cache directory.
#### reachy_mini.daemon.app.routers.cache.reset_apps[[reachy_mini.daemon.app.routers.cache.reset_apps]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/cache.py#L32)
Remove applications virtual environment directory.
### Kinematics Router[[reachy_mini.daemon.app.routers.kinematics.get_kinematics_info]]
#### reachy_mini.daemon.app.routers.kinematics.get_kinematics_info[[reachy_mini.daemon.app.routers.kinematics.get_kinematics_info]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/kinematics.py#L29)
Get the current information of the kinematics.
#### reachy_mini.daemon.app.routers.kinematics.get_urdf[[reachy_mini.daemon.app.routers.kinematics.get_urdf]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/kinematics.py#L42)
Get the URDF representation of the robot.
#### reachy_mini.daemon.app.routers.kinematics.get_stl_file[[reachy_mini.daemon.app.routers.kinematics.get_stl_file]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/kinematics.py#L48)
Get the path to an STL asset file.
### Volume Router[[reachy_mini.daemon.app.routers.volume.get_volume]]
#### reachy_mini.daemon.app.routers.volume.get_volume[[reachy_mini.daemon.app.routers.volume.get_volume]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/volume.py#L80)
Get the current output volume level.
#### reachy_mini.daemon.app.routers.volume.set_volume[[reachy_mini.daemon.app.routers.volume.set_volume]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/volume.py#L89)
Set the output volume level and play a test sound.
#### reachy_mini.daemon.app.routers.volume.play_test_sound[[reachy_mini.daemon.app.routers.volume.play_test_sound]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/volume.py#L115)
Play a test sound.
#### reachy_mini.daemon.app.routers.volume.get_microphone_volume[[reachy_mini.daemon.app.routers.volume.get_microphone_volume]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/volume.py#L144)
Get the current microphone input volume level.
#### reachy_mini.daemon.app.routers.volume.set_microphone_volume[[reachy_mini.daemon.app.routers.volume.set_microphone_volume]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/volume.py#L153)
Set the microphone input volume level.
### Logs Router[[reachy_mini.daemon.app.routers.logs.websocket_daemon_logs]]
#### reachy_mini.daemon.app.routers.logs.websocket_daemon_logs[[reachy_mini.daemon.app.routers.logs.websocket_daemon_logs]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/logs.py#L15)
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]]
#### reachy_mini.daemon.app.routers.hf_auth.save_token[[reachy_mini.daemon.app.routers.hf_auth.save_token]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/hf_auth.py#L46)
Save HuggingFace token after validation.
#### reachy_mini.daemon.app.routers.hf_auth.get_auth_status[[reachy_mini.daemon.app.routers.hf_auth.get_auth_status]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/hf_auth.py#L62)
Check if user is authenticated with HuggingFace.
#### reachy_mini.daemon.app.routers.hf_auth.delete_token[[reachy_mini.daemon.app.routers.hf_auth.delete_token]]
[Source](https://github.com/pollen-robotics/reachy_mini/blob/vr_1069/src/reachy_mini/daemon/app/routers/hf_auth.py#L92)
Delete stored HuggingFace token.

Xet Storage Details

Size:
44.9 kB
·
Xet hash:
2c1e4d9f3f1d25e7dbb2c53604b5302e812206559dfabd79ff17c7de7b5f7975

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