Repository navigation
Enhance wheel-leg functionality and improve RL model validation - #10
Conversation
Preserve the verified preview graph while stamping paired-107 and YAML layout metadata. Authenticate source/contract hashes, record the deployment receipt, and reject model/YAML policy-rate mismatches. Add positive inference and negative clock, mechanical, winding and history contract checks. Preserve the preview's unqualified hardware status.
Drop explanatory and cross-component comments in rl_bridge, the policy runtime and the wheel-leg mirror. Keep data-layout and protocol facts.
|
Important Review skippedToo many files! This PR contains 103 files, which is 3 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Action performed
|
|
@coderabbitai summary |
Action performed
|
* chore(rl): remove stamping tools and synthetic tests * feat(rl): integrate wheel-leg deployment and startup model validation * refactor(rl): run policy inference in RMCS worker thread * fix(rl): remove install rule for deleted launch directory * feat(wheel_leg): add leg target winding functionality * feat(wheel_leg): enhance wheel leg model configuration * 11 * feat(rl_controller): enhance recovery and observation handling * feat(wheel_leg): enhance wheel-leg YAML interface and config * fix(wheel_leg): preserve deployed recovery timing and push-off * chore: keep only the recovery vehicle profile * chore: drop the wheel-leg YAML integration test * chore: point docs and tools at the renamed vehicle profile * refactor(rl): keep threaded policy bridge separate from chassis control * chore: add new ONNX model files for wheel leg * feat(rl): validate and package the 200 Hz directional wheel-leg actor Preserve the verified preview graph while stamping paired-107 and YAML layout metadata. Authenticate source/contract hashes, record the deployment receipt, and reject model/YAML policy-rate mismatches. Add positive inference and negative clock, mechanical, winding and history contract checks. Preserve the preview's unqualified hardware status. * test(observation_frame): add unit tests for gate behavior * feat(policy): add observation version and normalization checks * feat(policy): package prone and WheelBipe deployment snapshots * refactor: give RL bridge explicit worker and action output ownership * feat(policy): export evaluated WheelBipe 8500 snapshot independently * feat(policy): add WheelBipe deployment files * feat(telemetry): add WheelLegMirrorComponent for ROS 2 integration * chore: remove narrative comments from RL bridge sources Drop explanatory and cross-component comments in rl_bridge, the policy runtime and the wheel-leg mirror. Keep data-layout and protocol facts. * feat(simulation): add wheel_leg_policy_host for local testing * refactor(telemetry): remove raw IMU data handling * feat(rl_bridge): add structured configuration support * fix(docs): update wheel-leg controller references * refactor: remove unused test files and dependencies * feat(latency): add wheel leg latency benchmark tool * refactor: remove utility functions and improve structure * feat(receipts): add model receipt generation support
概述
本 PR 将
rmcs_rl从独立策略服务进程 + 自定义 ROS 消息重构为进程内推理的 RMCS 插件组件,同时统一轮腿观测/动作的 YAML 契约,补齐模型交付收据、遥测与文档。规模:32 个提交,103 个文件,+4065 / −6461。
背景
旧方案通过
policy_server独立进程与msg/Action.msg、Observation.msg、PolicyStatus.msg与主控通信。跨进程带来时延与同步开销,消息接口与观测布局各自演进容易漂移,且模型与观测契约缺少启动期校验。主要改动
1. 推理层内置(
src/policy/)onnx_runtime.*:ORT 会话封装与 IO 校验(单入单出、float32、rank 1–3)policy_model.*:启动期契约校验(模型 sha、观测契约、版本、metadata、零观测有限性)policy_worker.*:工作线程 + 双缓冲;失败闭锁、reset()恢复、队列计数2. 接线层重写(
src/rl_bridge/)config.*:结构化 YAML(observations.*/actions.*)解析与校验observation_builder.hpp:按order组装,select → source_clip → scale → offset → clipobservation_frame_gate/history/timeline:帧序号门控、历史堆叠、节流policy_actions.hpp/policy_status.hpp:动作通道与状态通道拆分rl_bridge.cpp:会话、使能、复位、失效传播3. 遥测(
src/visualization/)WheelLegMirrorComponent发布joint_states、imu_body、rl_projected_gravity、rl_angular_velocity、diagnostics,供 Isaac Sim 镜像4. 模型交付
model_receipts/:每个部署模型配一份.deployment.json收据prepare_wheel_leg_model.py(盖章/校验)、export_wheel_leg_training_pair.py(离线导出候选)5. 工具与文档
wheel_leg_policy_host(本地仿真)、wheel_leg_latency_bench(时延基准)、install_rl_deps.sh(ORT 依赖)、wheel_leg_telemetry.py(Foxglove 接收/录制)docs/wheel_leg_live_mirror.md、docs/troubleshooting.md;README 改为中文并补“快速开始”破坏性变更
msg/Action.msg、Observation.msg、PolicyStatus.msg)——外部消费者会编译失败。已确认本工作区内无引用。src/policy_server.cpp、policy_server_launcher.cpp、launch/policy_server.launch.py)。include/rmcs_rl/**全部删除,改到src/下,include 路径变化。key=value字符串改为结构化映射,旧配置不再兼容。stamp_*、rl_layout.py、check_policy_contract.py、install_model_tools.sh,由prepare_wheel_leg_model.py取代。验证
colcon build --packages-up-to rmcs_rl(容器qzhhhi/rmcs-develop)build-rmcs、未做实车验证建议重点审查
src/rl_bridge.cpp的会话/复位/失效语义,与旧policy_server的行为差异observation_builder.hpp的组装顺序与缩放,是否与各车型 YAML 对齐test/*.cpp、fixtures、layout 脚本),新增仅 1 个 46 行 Python 测试models/下 18 个模型文件有增删,确认部署实际指向的模型仍在