一、VR 设备选型及环境配置
三种可用设备:Apple Vision Pro、PICO 4 Ultra Enterprise 或 Meta Quest 3。官方教程按照 Apple Vision Pro 编写,但考虑到成本,最终决定使用 PICO 4 Ultra Enterprise。
在笔记本上配置环境:
- 创建 conda 环境
conda create -n tv python=3.8
conda activate tv
conda install pinocchio -c conda-forge
pip install meshcat
- 克隆项目并安装依赖
cd ~
git clone https://github.com/unitreerobotics/avp_teleoperate.git
cd avp_teleoperate
pip install -r requirements.txt
- 安装 mkcert
# Linux 环境示例
sudo apt-get install build-essential procps curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install mkcert
- 生成证书
查看本机 IP 地址:
ifconfig | grep inet
假设 IP 为 192.168.100.133,创建证书:
mkcert -install && mkcert -cert-file cert.pem -key-file key.pem 192.168.100.133 localhost 127.0.0.1
将生成的 cert.pem 和 key.pem 拷贝到项目 teleop 目录下:
cp cert.pem key.pem ~/avp_teleoperate/teleop/
设置防火墙:
sudo ufw allow 8012
在 VR 设备中安装证书(参考官方文档)。
二、修改 avp_teleoperate
1. 代码目录结构
avp_teleoperate/
├── act # 模仿学习策略相关文件
├── assets # 机器人 URDF 相关文件
├── scripts
└── teleop
├── image_server/
│ ├── image_client.py
│ └── image_server.py
├── robot_control/
│ ├── robot_arm_ik.py
│ ├── robot_arm.py
│ └── robot_hand.py
├── teleop_hand_and_arm.py
└── teleop_hand.py


