qidao123.com技术社区-IT企服评测·应用市场

标题: Ubuntu22.04基于ROS2-Humble安装moveit2教程(亲测) [打印本页]

作者: 耶耶耶耶耶    时间: 昨天 08:57
标题: Ubuntu22.04基于ROS2-Humble安装moveit2教程(亲测)
一、安装ROS2-Humble

1、参考:Ubuntu22.04安装ROS2-humble-CSDN博客

2、确保安装完成

  1. source /opt/ros/humble/setup.bash
复制代码
方法一:二进制安装

  1. sudo apt install ros-humble-moveit*
复制代码
方法二:安装源码编译

一、卸载二进制安装包

  1. sudo apt autoremove ros-humble-moveit*
复制代码
二、安装moveit2_tutorials及其干系的安装包

1、创建文件夹

  1. mkdir -p ~/ws_moveit/src
  2. cd ~/ws_moveit2/src
复制代码
2、下载moveit2_tutorials(humble版本)

  1. git clone https://github.com/ros-planning/moveit2_tutorials -b humble
复制代码
若git clone拉取失败,可进入https://github.com/ros-planning/moveit2_tutorials下载

免费的github加速器下载:Ubuntu安装Watt Toolkit加速器-CSDN博客

注:下载后解压到src目录,且定名为moveit2_tutorials,防止其他错误

3、下载vcstool——该工具可以自动读取repo文件并克隆其中的代码。

  1. sudo apt install python3-vcstool
复制代码
4、进入src目录,下载其他包

  1. vcs import < moveit2_tutorials/moveit2_tutorials.repos
复制代码
若拉取失败,同上,进入github下载对应包,进行手动解压

进入moveit2_tutorials目录可看到moveit2_tutorials.repos文件



依次复制链接进入下载,一定要查对版本是否正确后再下载,否则后续步骤可能出错

比如以下方式进行选择版本 


博主帮你们整理了干系的链接以及版本

  1. launch_param_builder:
  2.     https://github.com/PickNikRobotics/launch_param_builder
  3.     #版本: main
复制代码
  1. moveit2:
  2.     https://github.com/ros-planning/moveit2
  3.     #版本: humble
复制代码
  1. moveit_resources:
  2.     https://github.com/ros-planning/moveit_resources
  3.     #版本: humble
复制代码
  1. moveit_task_constructor:
  2.     https://github.com/ros-planning/moveit_task_constructor
  3.     #版本: humble
复制代码
  1. moveit_visual_tools:
  2.     https://github.com/ros-planning/moveit_visual_tools
  3.     #版本: ros2
复制代码
  1. rosparam_shortcuts:
  2.     https://github.com/PickNikRobotics/rosparam_shortcuts
  3.     #版本: ros2
复制代码
  1. srdfdom:
  2.     https://github.com/ros-planning/srdfdom
  3.     #版本: ros2
复制代码
三、安装依赖

1、安装rosdep

  1. sudo apt install python3-rosdep
  2. sudo rosdep init
  3. rosdep update
  4. sudo apt update
  5. sudo apt dist-upgrade
复制代码
如果发生报错,安装rosdepc (也可参考小鱼的一键安装)

  1. sudo apt-get install python3-pip
  2. sudo pip3 install rosdepc
复制代码
2、安装依赖

  1. cd ws_moveit/
  2. rosdep install --from-path src --ignore-src -r -y  #若安装的是rosdep
复制代码
  1. rosdepc install --from-path src --ignore-src -r -y  #若安装的是rosdepc
复制代码
四、编译源码

  1. cd ws_moveit/
  2. colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
  3. echo 'source ~/ws_moveit/install/setup.bash' >> ~/.bashrc#每次打开自动source
复制代码
五、个人编译过程中出现的报错以及办理方法

1、重要是moveit_task_constructor编译过程中的报错

(还有些错误忘记了,以是没有记载,如果有新错误的小伙伴可在批评区进行反馈,也算帮助博主美满了)

(1)找不到pybind这个包,进入提示目录进行查看,发现目录为空,我们手动去下载压缩包

下载地点

(2)将安装包放入~/ws_moveit2/src/moveit_task_constructor/core/python/pybind文件夹

重新编译,发现找不到smart_holder头文件,进入提示目录查看,确实是空的,手动下载:下载地点

解压事后,放入~/ws_moveit2/src/moveit_task_constructor/core/python/src文件夹,该更换的选择更换,该归并的选择归并就行了

注:大部门错误都是安装包版本的问题,一定要看仔细了再下载!!!

2、编译卡死问题

博主已经总结过了,点击链接参考

关于colcon编译卡死的办理办法-CSDN博客

有新问题记得批评区及时反馈哦!


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 qidao123.com技术社区-IT企服评测·应用市场 (https://dis.qidao123.com/) Powered by Discuz! X3.4