Files
Mujoco_WASM/web_platform/src/robot/profiles/lekiwi.test.ts
T
chenlin 3ad29356c9
web-platform-ci / TypeScript, lint, unit, build (push) Has been cancelled
web-platform-ci / Playwright E2E (push) Has been cancelled
lekiwi-compatibility / cpu-compatibility (push) Has been cancelled
feat(lekiwi): release V0.10.1 初步集成 LeKiwi,优化碰撞模型
集成通用机器人数值接口、本机控制桥、LeRobot 插件和统一键盘遥操作。采用离线 CoACD 全臂碰撞配方 revision 4、局部装配区切分与结构自接触,限制直接关节位姿写入并保留安全看门狗。同步版本号、变更记录、来源许可证和兼容性验证。
2026-09-20 14:42:30 +08:00

14 lines
623 B
TypeScript

import fixture from '../../../../contracts/fixtures/lekiwi-kinematics.json';
import { bodyToWheels, LEKIWI_PROFILE } from './lekiwi';
it('matches the real LeRobot 0.6.1 forward kinematics and proportional saturation within half an encoder tick', () => {
expect(LEKIWI_PROFILE.wheels).toEqual(fixture.wheelOrder);
const radPerTick = (2 * Math.PI) / 4096;
for (const { body, wheelRaw } of fixture.cases) {
const wheel = bodyToWheels(body[0], body[1], (body[2] * Math.PI) / 180);
wheel.forEach((value, i) =>
expect(Math.abs(value / radPerTick - wheelRaw[i])).toBeLessThanOrEqual(0.500001),
);
}
});