mirror of
https://github.com/pollen-robotics/microduck.git
synced 2026-12-03 11:00:02 +08:00
Two new subcrates, absorbed from the prototype side: - `kinematics`: FK parsed from the same robot_walk.xml the policies train against — update the MJCF and it still works. Compiled for the control loop: per-site flattened chains, indexed joints, zero allocation per query (~7-10x the prototype crate's site_pose). Hand-rolled quat/pose math pinned to MuJoCo's mj_kinematics at 1e-6 by fixture, cv2/sensor conventions and alpha sign pins carried over from the runtime shim. - `odometry`: the Rhoban-derived contact estimator (sole-corner anchor, IMU re-projection), with the foot chains taken from the kinematics model instead of hand-transcribed segment tables, and each foot's chain evaluated once per tick instead of once per corner. robotd ticks the estimator at the loop's own 50 Hz on the sample it already read — no extra bus traffic, which is exactly the pressure the spasms investigation taught this loop not to add — and publishes the estimate as `odom` on robot.state (serde-default, no API bump). The monitor shows x/y/yaw on its own header row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
751 B
TOML
19 lines
751 B
TOML
# Contact-based odometry: where the robot is, from its own legs and IMU.
|
|
#
|
|
# A port of the prototype runtime's Rhoban-derived estimator (sole-corner
|
|
# anchoring, IMU re-projection), with one structural change: the foot chains
|
|
# come from the `kinematics` crate's MJCF model instead of segment tables
|
|
# transcribed by hand — the geometry has one source of truth. No dedicated
|
|
# service: it is a pure struct robotd ticks inside its control loop, because
|
|
# its inputs are exactly the sample the loop already holds.
|
|
[package]
|
|
name = "odometry"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
duck-ipc-proto = { path = "../duck-ipc-proto" }
|
|
kinematics = { path = "../kinematics" }
|