MoveIt2 源码安装

2025.5.21

安装 rosdep 来安装系统依赖项

sudo apt install python3-rosdep

安装 ROS2 后,请确保您拥有最新的软件包

sudo rosdep init
rosdep update
sudo apt update
sudo apt dist-upgrade

使用 mixin 安装 Colcon ROS2 构建系统

sudo apt install python3-colcon-common-extensions
sudo apt install python3-colcon-mixin
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update default

下载 MoveIt2 和教程的源代码

mkdir -p ~/ws_moveit/src
cd ~/ws_moveit2/src
git clone --branch humble https://github.com/ros-planning/moveit2_tutorials

安装 vcstool

sudo apt install python3-vcstool

使用 vcstool 下载 MoveIt2 其余部分的源代码

vcs import < moveit2_tutorials/moveit2_tutorials.repos

安装 MoveIt2 及其所有依赖项

sudo apt update && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y

编译工作空间

cd ~/ws_moveit2
colcon build --mixin release

运行 Demo

source install/setup.bash 
ros2 launch moveit2_tutorials demo.launch.py

posted @ 2025-07-17 22:18  安度因小王子  阅读(187)  评论(0)    收藏  举报