3ad29356c9
集成通用机器人数值接口、本机控制桥、LeRobot 插件和统一键盘遥操作。采用离线 CoACD 全臂碰撞配方 revision 4、局部装配区切分与结构自接触,限制直接关节位姿写入并保留安全看门狗。同步版本号、变更记录、来源许可证和兼容性验证。
14 lines
623 B
TypeScript
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),
|
|
);
|
|
}
|
|
});
|