Linux系统环境:

系统出厂自带Ubuntu(V-20.04)系统,内置 ROS2 Galactic 开发环境,无需搭建和管理,只需更新mercury_x1_ros2包即可。

mercury_x1_ros2是大象机器人推出的适用于其Mercury X1系列机械臂的ROS2包

ROS2项目地址: http://github.com/elephantrobotics/mercury_x1_ros2

机械臂API驱动库地址: https://github.com/elephantrobotics/pymycobot

1 更新 mercury_x1_ros2 包

为了保证用户能及时使用最新的官方包,可以通过文件管理器进入/home/er文件夹,打开ROS2环境终端,然后运行命令更新:

# 克隆github上的代码
git clone --depth 1 https://github.com/elephantrobotics/mercury_x1_ros2.git
cd ~/mercury_x1_ros2       # 返回工作区
colcon build --symlink-install # 构建工作区中的代码,--symlink-install:避免每次调整 python 脚本时都需要重新编译
source install/setup.bash # 添加环境变量

# 单独编译功能包:
# 如果只编译“turn_on_mercury_robot”,则需要执行命令:
colcon build --packages-select turn_on_mercury_robot

注意: 如果在/home/er目录下已经存在mercury_x1_ros2文件夹,则需要先删除原来的mercury_x1_ros2,然后再执行上述命令。 其中,目录路径中的er为系统的用户名。 如有不一致,请修改。

至此ROS2环境搭建完成,你可以学习ROS2的基础知识 或者ROS2使用案例


← 上一页 | 下一页 →

results matching ""

    No results matching ""