# Unitree R1 rt/lowcmd踝关节槽位映射与mode_pr配置解析

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-11-24-unitree-sdk2-python-196
> 频道：pitfalls | 更新日期：2026-11-24 | 标签：auto, github-issue, unitree_sdk2_python
> 核心摘要：R1底层控制中rt/lowcmd槽位4/5/10/11的含义取决于mode_pr字段，默认为0时对应关节空间pitch/roll，设为1时对应电机AB位置且顺序互换。

# Unitree R1 rt/lowcmd踝关节槽位映射与mode_pr配置解析

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[R1: are the ankle slots on rt/lowcmd joint-space pitch/roll or the A/B motors?](https://github.com/unitreerobotics/unitree_sdk2_python/issues/196)（GitHub unitreerobotics/unitree_sdk2_python #196）

**状态**：已解决

## 问题

开发者在使用unitree_sdk2_python对R1进行500Hz rt/lowcmd调试时，不确定槽位4、5、10、11是直接映射踝关节pitch/roll还是并联连杆的A/B电机位置；同时需确认rt/lowstate反馈的q、dq、tau_est是在关节空间还是电机空间，以及mode_pr参数的具体作用与默认值。

## 环境

机型：Unitree R1 EDU；SDK：unitree_sdk2_python；接口：rt/lowcmd与rt/lowstate（debug mode, 500 Hz）；URDF版本：unitree_ros 1c300a6。

## 解决办法

1. 设置 `LowCmd_.mode_pr = 0`（PR模式，默认值）时，槽位4/10对应ankle pitch，槽位5/11对应ankle roll，此时指令与反馈（q, tau_est）均为关节空间量，与URDF定义一致。
2. 设置 `LowCmd_.mode_pr = 1`（AB模式）时，相同槽位直接接收电机位置指令，但需注意映射顺序反转：槽位4/10对应B电机，槽位5/11对应A电机。
3. 通过 `unitree_hg_msg_dds__LowCmd_()` 创建消息时 `mode_pr` 默认为0，若未显式修改则始终处于关节空间控制模式。
4. 实测验证：在 `mode_pr = 0` 下，行走或调试模式中rt/lowstate反馈数据确认为关节空间pitch/roll，左右脚电机相关性极低（-0.00至-0.18），证实固件内部已自动完成并联机构逆解转换。

讨论原作者：@MustafaOrhon 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub unitreerobotics/unitree_sdk2_python #196：R1: are the ankle slots on rt/lowcmd joint-space pitch/roll or the A/B motors?](https://github.com/unitreerobotics/unitree_sdk2_python/issues/196)