> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinatric.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Motion and hardware feedback

> Subscribe to motion, actuator, IMU, validity, battery, and hardware feedback.

Subscribe on the external DDS domain. The gateway publishes Kinatric JSON topics as `std_msgs::msg::dds_::String_`. The D2 topics retain their pinned SDK types.

| Topic | Type | Available data |
| - | - | - |
| `rt/sportmodestate` | D2 `SportModeState_` | `stamp`, `mode`, `progress`, and IMU fields when supplied by the backend. Published while the current state has a mapped D2 mode. |
| `rt/lowstate` | D2 `LowState_` | CRC-protected live actuator and IMU feedback. Pair it with the validity report using `tick`. |
| `rt/kinatric/control_state` | JSON string | Live FSM `state`, `action_phase`, and `controller` when available. `authorization` reports SDK ownership, `hardware` reports HAL health, and `last_motion` holds the most recent cached motion snapshot. |
| `rt/kinatric/operation_state` | JSON string | RPC results include `service`, `id`, `api_id`, `code`, `writer`, `participant`, `grant_epoch`, `status`, and `noreply`. Low-level ingress reports use `service="low"` and include a `reason` such as `forwarded` or `invalid_command`. |
| `rt/kinatric/state_validity` | JSON string | `source`, `environment`, and `joints`. When joint data is available, also includes `tick` and validity flags for IMU, acceleration, temperature, sport mode, and BMS. |
| `rt/kinatric/robot_description` | `kinatric::RobotDescriptionV1` | Robot `model`, `profile_hash`, actuator count, slot-indexed actuator names, kinds and limits, and the `x`, `y`, and yaw command limits. Use transient-local durability to receive the cached description. |
| `rt/kinatric/hal_health` | JSON string | HAL phase, faults, and hardware diagnostics when available. |
| `rt/kinatric/battery` | JSON string | BMS availability, connection, validity, and sampled pack data. `rt/kinatric/battery_state` is an alias. |
| `rt/wirelesscontroller` | D2 `WirelessController_` | Read-only local input axes `lx`, `ly`, `rx`, `ry` and the `keys` bit mask while the input service publishes. |

The native `SportModeState_` maps phases as follows. Its `progress` field is phase-dependent. The locomotion runtime pauses this stream after high-level control is released.

| `SportModeState_.mode` | D2 motion phase |
| -: | - |
| `0` | `Stand`, `Prepare`, `GetUp`, `Warmup`, `ReturnStand`, `StandFallback` |
| `3` | `Blend`, `RL` |
| `5` | `GetDown` |
| `7` | `Passive` |

The JSON field `control_state.mode` maps `Stand` to `0`, `RL` to `3`, `Passive` to `7`, and other FSM states to `-1`. Use `control_state.state` for the exact FSM state. In `control_state.controller`, `internal` means the onboard controller, `waiting` means high-level control is released and no low-level writer has been selected by the HAL, and `external` means a low-level writer is selected.
For each `LowState_` sample, check the SDK CRC, match `LowState_.tick` to `state_validity.tick`, and require `joints=true` before consuming actuator measurements. Check `imu`, `acceleration`, and `temperature` before using those fields. The validity worker targets a 20 ms loop. `LowState_` itself is forwarded from the HAL as it arrives and has its own cadence.

| LowState field | Meaning |
| - | - |
| `motor_state[i].q`, `.dq`, `.tau_est` | Angle in rad, angular velocity in rad/s, and estimated torque in N·m. Use the robot description to select the configured slots. |
| `motor_state[i].temperature` | Motor temperature in °C when valid, rounded to an integer. |
| `imu_state.quaternion`, `.gyroscope`, `.rpy` | Orientation quaternion in `w, x, y, z` order, angular velocity in rad/s, and roll, pitch and yaw in rad. |
| `imu_state.accelerometer` | Linear acceleration in m/s² when `acceleration=true`. |
| `bms_state.soc` | Integer percentage when fresh BMS data is available. Use the separate battery topic for pack details and freshness. |

Foot forces, body position, and measured body velocity are unavailable in this interface. Other unpopulated D2 fields carry their IDL defaults. The Nano ROS 2 bridge converts `/cmd_vel` to `Move`, publishes matched joint and IMU feedback to `/joint_states` and `/imu/data`, and uses `base_link` for IMU messages.

### Subscribe to feedback in Python

This read-only example prints one validity report and its matching 12-leg-axis feedback sample when available. Run it from the repository root in Bash with the same network variables as the status probe. The `feedback_report` helper checks the tick and CRC before returning joint data.

```sh theme={null}
PYTHONPATH=sdk python - "$D2_DOMAIN" "$PC_IFACE" "$D2_IP" <<'PY'
import json
import sys

from d2_client import connect, feedback_report
from kinatric_sdk import ChannelSubscriber, LowState_, String_

domain, interface, peer = sys.argv[1:]
connect(int(domain), interface, peer)
validity = ChannelSubscriber("rt/kinatric/state_validity", String_)
lowstate = ChannelSubscriber("rt/lowstate", LowState_)
validity.Init()
lowstate.Init()
try:
    report, feedback = feedback_report(validity, lowstate)
    print(json.dumps({"validity": report, "feedback": feedback}))
finally:
    lowstate.Close()
    validity.Close()
PY
```

Continue to [low-level control](https://docs.kinatric.com/sdk/motion-services/low-level-control.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.