安装

环境要求

当前文档面向 Ubuntu 22.04 和 ROS2 Humble:

Ubuntu 22.04
ROS2 Humble
Python 3

安装 ROS2 后,先加载 ROS 环境:

source /opt/ros/humble/setup.bash

创建工作空间

mkdir -p ~/lebai_ws/src
cd ~/lebai_ws/src
git clone --branch humble-dev https://github.com/lebai-robotics/lebai-ros-sdk.git
cd ~/lebai_ws

安装依赖

安装 Python SDK:

python3 -m pip install pylebai

安装 ROS 包依赖:

rosdep update
rosdep install --from-paths src --ignore-src --rosdistro humble -y --skip-keys pylebai

构建

colcon build --packages-select lebai_interfaces lebai_driver lebai_tutorials --symlink-install
source install/setup.bash

检查安装

查看驱动 launch 文件:

ros2 launch lebai_driver driver.launch.py --show-args

查看可用接口:

ros2 interface list | grep lebai_interfaces

常用包

lebai_driver

启动机器人驱动、控制器发现和独立 gripper 节点。

lebai_interfaces

提供 ROS2 message 和 service 类型。

lebai_tutorials

提供可直接运行的 Python 示例。