软件设置

SDK安装、网络连接、ROS2与MoveIt2双臂规划、浏览器teleop面板、VLA模型集成和一键数据管道。 从网络发现到自主操作的一切。

跳转到一个部分:

第 1 步 — SDK 安装

SDK安装

VLAI L1 通过控制 roboticscenter Python SDK,既提供高层任务API,又提供低层联合控制。 安装在您的主机上。

创建虚拟环境

python -m venv ~/.venvs/vlai
source ~/.venvs/vlai/bin/activate

安装SDK

pip install roboticscenter[l1]

验证安装

python -c "from roboticscenter import L1; print('SDK OK')"
rc --version   # command-line tool
第 2 步 — 网络连接

连接到 L1

L1 运行自己的板载 ROS2 堆栈,并通过本地网络公开 gRPC 控制 API。 您的主机 PC 通过 WiFi 或以太网与其通信。

初始网络设置

# Power on the L1 — it will connect to the configured WiFi automatically
# Then discover it on your network:
rc discover
# Output: L1-XXXX found at 192.168.1.45 (port 8888)

连接并验证

rc connect --device l1 --host 192.168.1.45
# Output: Connected to VLAI L1 (firmware v2.1.4, battery: 87%)

# Or use the Python SDK:
from roboticscenter import L1

robot = L1(host="192.168.1.45")
robot.connect()
print(robot.get_status())
# {'battery': 87, 'arm_left': 'ready', 'arm_right': 'ready', 'base': 'ready'}
robot.disconnect()

设置静态IP(建议实验室使用)

rc config set network.static_ip 192.168.1.100
rc config set network.gateway 192.168.1.1
rc config apply   # reboots the L1 network stack
步骤 3 — ROS2 + MoveIt2

ROS2 与 MoveIt2 双臂控制

L1 附带运行在船上的 ROS2 Humble。 您的主机 PC 作为 ROS2 节点通过同一网络进行连接。 您的主机上需要 ROS2 Humble。

在主机上安装 ROS2 Humble (Ubuntu 22.04)

sudo apt update && sudo apt install ros-humble-desktop \
  ros-humble-moveit ros-humble-ros2-control \
  ros-humble-ros2-controllers -y

启动L1 ROS2桥

# On the L1 (via SSH or the onboard terminal):
ros2 launch vlai_l1_ros2 l1_bringup.launch.py

# On your host PC:
source /opt/ros/humble/setup.bash
export ROS_DOMAIN_ID=42   # must match the L1's domain ID
ros2 topic list   # should show /l1/left_arm/joint_states, etc.

双臂MoveIt2规划

source /opt/ros/humble/setup.bash
ros2 launch vlai_l1_moveit l1_moveit.launch.py

# In another terminal — plan and execute a bimanual task:
ros2 run vlai_l1_moveit bimanual_demo
# Executes: left arm picks object, right arm receives and places

通过 Python 进行单独手臂控制

from roboticscenter import L1
import numpy as np

robot = L1(host="192.168.1.45")
robot.connect()

# Move left arm to Cartesian pose (position + quaternion)
pose = {
    "position": [0.4, 0.1, 0.35],    # x, y, z in meters from base
    "orientation": [0, 0, 0, 1]      # quaternion xyzw
}
robot.left_arm.move_to_pose(pose, speed=0.3)

# Read current joint state
state = robot.left_arm.get_joint_state()
print("Left arm joints:", state.positions)  # 8 values in radians

robot.disconnect()

移动底座控制

从机器人中心导入 L1 机器人 = L1(主机=“192.168.1.45”) 机器人.connect() # 以 0.5 m/s 的速度向前行驶 1 米 机器人.base.move(x=1.0, y=0.0, 速度=0.5) # 顺时针旋转90度 robots.base.rotate(角度=-90,速度=0.3) # 度 # 调整提升高度(106 至 162 厘米) robots.base.set_lift_height(130) # 厘米 # 停止 机器人.base.stop() 机器人.disconnect()
第 4 步 — 浏览器 Teleop

浏览器远程操作面板

L1 包括一个内置浏览器远程操作面板 - 无需安装软件。 导航到端口 8888 上的 L1 IP。

访问面板

# Open in browser:
http://192.168.1.45:8888

# Or launch via CLI:
rc teleop --device l1

该面板提供:

  • 移动底座WASD键盘控制
  • 左/右臂笛卡尔操纵杆(在 3D 视口中单击并拖动)
  • 夹具打开/关闭按钮
  • 来自所有已安装摄像机的摄像机馈送
  • 一键剧集录制开始/停止
  • 电池及联合状态状态面板

VR teleop(Developer Pro 和 Max)

rc teleop --device l1 --mode vr
# Opens a WebXR session — put on Meta Quest and visit the displayed URL
第 5 步 — VLA 集成

视觉-语言-行动模型集成

L1 Developer Pro 和 Max 层包括能够在本地运行 VLA 推理的板载计算。 对于所有层,您都可以在主机 PC 上运行 VLA 推理并将操作流式传输到机器人。

在主机 PC(任何层)上运行 OpenVLA

pip 安装机器人中心[vla] 从机器人中心导入 L1 从 robotscenter.vla 导入 OpenVLAClient 机器人 = L1(主机=“192.168.1.45”) 机器人.connect() vla = OpenVLAClient( 型号=“openvla/openvla-7b”, device="cuda" # 或“cpu”以降低推理速度 ) # 捕获观察结果 obs = robots.capture_observation() # 返回RGB图像+关节状态 # 从 VLA 获取操作(文本条件) 动作 = vla. 预测( 图像=obs["图像"], 指令=“拿起蓝色块并将其放在红色板上” ) # 动作:手臂关节增量字典 + 夹具命令 # 对机器人执行动作 机器人.execute_action(动作) 机器人.disconnect()

设备上 VLA 推理 (Developer Pro/Max)

rc deploy vla \
  --model openvla/openvla-7b \
  --quantize int4   # fits in 6GB VRAM on V3 compute (70 TOPS)

# Now VLA runs on the L1's onboard compute — no host PC needed:
rc run policy \
  --task "Pick up the blue block and place it on the red plate" \
  --max_steps 50
故障排除

常见问题

错误1 rc discovery 找不到设备

L1 不在同一子网中。 企业 WiFi 网络通常具有客户端隔离功能 - 请咨询 IT 部门或使用专用路由器。

# Try direct connection by IP if you know it:
rc connect --device l1 --host 192.168.1.45

# Or connect the L1 via Ethernet directly to your laptop:
# Set your laptop to 192.168.2.1/24, L1 will appear at 192.168.2.100
错误2 MoveIt2 规划失败:未找到路径

目标位姿位于手臂可到达的工作空间之外或与机器人主体发生碰撞。

# Check reachability first:
from roboticscenter import L1
robot = L1(host="192.168.1.45")
robot.connect()
reachable = robot.left_arm.check_pose_reachable(
    position=[0.4, 0.1, 0.35])
print("Reachable:", reachable)  # if False, adjust target pose
robot.disconnect()

软件工作正常吗? 开始收集数据。

一旦手臂开始移动,下一步就是远程操作和数据集记录。