版本

系统版本:ubuntu22.04
ROS2版本:humble
Moveit版本:moveit2-humble

安装 ROS 2 和 Colcon

如果您在接下来的几个步骤中遇到错误,一个好的开始是返回并确保您已正确安装 ROS 2。用户通常忘记的一个是获取 ROS 2 安装本身。

source /opt/ros/humble/setup.bash

安装rosdep以安装系统依赖项:

sudo apt install python3-rosdep

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

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

这里如果出错,把rosdep换成rosdepc
sudo apt-get install python3-pip
sudo pip3 install rosdepc

使用mixin安装Colcon ROS 2 构建系统:

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

如果报错:Connection refused> (https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml)>

https://www.guyuehome.com/37844

如果还是不行,就换成gitee的链接:

colcon mixin add default2 https://gitee.com/zhenshenglee/colcon-mixin-repository/raw/master/index.yaml
colcon mixin update default2

https://blog.csdn.net/weixin_41131063/article/details/123171717

安装vcstool:

sudo apt install python3-vcstool

创建 Colcon 工作区并下载教程

对于教程,您需要有一个colcon工作区设置。

mkdir -p ~/ws_moveit2/src

进入您的 Colcon 工作区并拉取 MoveIt 教程源:

cd ~/ws_moveit2/src
sudo apt install git
git clone https://github.com/ros-planning/moveit2_tutorials -b humble --depth 1

接下来我们将下载 MoveIt 其余部分的源代码:

vcs import < moveit2_tutorials/moveit2_tutorials.repos

这里如果出错是网络问题,github DDS受到污染。
打开/home/**/ws_moveit2/src/moveit2_tutorials.repos

repositories:launch_param_builder:type: giturl: https://github.com/PickNikRobotics/launch_param_builderversion: mainmoveit2:type: giturl: https://github.com/ros-planning/moveit2version: humblemoveit_resources:type: giturl: https://github.com/ros-planning/moveit_resourcesversion: ros2moveit_task_constructor:type: giturl: https://github.com/ros-planning/moveit_task_constructor.gitversion: ros2moveit_visual_tools:type: giturl: https://github.com/ros-planning/moveit_visual_toolsversion: ros2rosparam_shortcuts:type: giturl: https://github.com/PickNikRobotics/rosparam_shortcutsversion: ros2srdfdom:type: giturl: https://github.com/ros-planning/srdfdom.gitversion: ros2

在src目录下分别用git clone ***下载到7个文件夹内。可以尝试在网址前面加上:https://ghproxy.com/ ,后面加 -ros2/-humble。
(实践发现:如果有-humble分支最好用这个,没有的话用ros2)

git clone https://ghproxy.com/https://github.com/PickNikRobotics/launch_param_builder -b main
git clone https://ghproxy.com/https://github.com/ros-planning/moveit2 -b humble
git clone https://ghproxy.com/https://github.com/ros-planning/moveit_resources -b humble
git clone https://ghproxy.com/https://github.com/ros-planning/moveit_task_constructor.git -b humble
git clone https://ghproxy.com/https://github.com/ros-planning/moveit_visual_tools -b ros2
git clone https://ghproxy.com/https://github.com/PickNikRobotics/rosparam_shortcuts -b ros2
git clone https://ghproxy.com/https://github.com/ros-planning/srdfdom.git -b ros2

构建Colcon 工作区

以下将从 Debian 安装任何不在您的工作区中的软件包依赖项。这是将安装 MoveIt 及其所有依赖项的步骤:

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

下一个命令将配置您的 Colcon 工作区:

cd ~/ws_moveit2
colcon build --mixin release

此构建命令可能需要很长时间(20 分钟以上),具体取决于您的计算机速度和可用 RAM 量(我们建议 32 GB)。如果您的计算机内存不足,或者您的构建通常很难在您的计算机上完成,您可以将参数附加到上面的 colcon 命令。–parallel-workers 1

如果 mixin 报错了,可以换一种编译方式:

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

这一步出错:ERROR:colcon:colcon build: Duplicate package names not supported。因为重名了,删掉一个。

https://www.guyuehome.com/bubble/detail/id/66980

https://blog.csdn.net/shanpenghui/article/details/89210049
因为你在没有删除vcstool import的情况下重复import了一次,解决方法:把src文件夹里面你从ros2的github下载的东西都删除,再做一次。 无效。是因为重名了,删掉一个。

这里在用树莓派4B(4G)编译时,会卡死。需要增加swap交换空间。期间会在编译过程中自动退出,需要多编译几次。
树莓派编译工作空间卡死

我把交换空间设置为8G,还是会卡死或崩溃,发现swap并没有充分利用,而是自带内存满了导致的(和CPU关系不太大)。
尝试使用如下命令编译:

colcon build --mixin release --executor sequential

https://answers.ros.org/question/368249/colcon-build-number-of-threads/
https://answers.ros.org/question/407554/colcon-build-freeze-a-raspberry-pi/

崩溃时,尝试卸载占用RAM较大的桌面,完成后再安装。

sudo apt autoremove ubuntu-desktop
sudo apt install ubuntu-desktop

树莓派4B尝试数次后,才编译成功(以后考虑电脑编译完再拷过去,但没有试)。

设置Colcon 工作区

来源 Colcon 工作区:

source ~/ws_moveit2/install/setup.bash

可选:将上一个命令添加到您的.bashrc:

echo 'source ~/ws_moveit2/install/setup.bash' >> ~/.bashrc

运行样例程序

ros2 launch moveit2_tutorials demo.launch.py rviz_tutorial:=true

添加MotionPlanning后可看到机械臂。

故障问题解决

  • struct planning_interface::motionplanresponse has no member named trajectorystruct lanning_interface::motionplanresponse has no member named trajectory

在src删除出错模块,重新下载。

 git clone https://ghproxy.com/https://github.com/ros-planning/moveit_task_constructor.git -b ros2替换为git clone https://ghproxy.com/https://github.com/ros-planning/moveit_task_constructor.git -b humble
  • spawner-6 process has finished cleanly
    在Install/moveit2_tutorials/share找到demo.launch.py,nodes_to_starts添加:rviz_node_turorial

https://github.com/ros-planning/moveit2_tutorials/issues/586

参考

https://moveit.picknik.ai/humble/doc/tutorials/getting_started/getting_started.html
https://blog.csdn.net/qq_43557907/article/details/125636298

ROS MoveIT2(humble)安装总结相关推荐

  1. ROS 2 Humble Hawksbill 丰富和成熟生态扩展

    ROS1从kinetic之后,生态非常成熟,但是由于ROS1内核设计比较早,不能高效稳定地适应分布并行和实时等应用,存在缺陷,从melodic和noetic之后,一直是ROS1和ROS2并存地状态. ...

  2. 的环境下 qt 运行在_Ubuntu16.04环境下运行vins mono(环境配置及编译)之ROS kinetic的安装...

    所需环境:ubuntu16.04+ROS kinetic+opencv 3.3.1+eigen3.3.3+ceres solver 1.14 1.ROS Kinetic 的安装 (1)设置source ...

  3. agx 安装ros opencv_Ubuntu下安装realsense+melodic+OpenCV

    realsenseD435i驱动: 因特尔实感深度摄像头提供了两种版本:D415和D435 .而D435i在D435的基础上增加了一些单元,更适合于ROS机器人的系统位置感知. 支持的平台: Ubun ...

  4. ROS入门-4.安装ROS系统(ubuntu20.04版本安装ros的noetic版本)

    ubuntu20.04版本安装ros的noetic版本 1.添加软件源 2.添加密钥 3.更新 4.安装ROS 5.初始化rosdep 6.设置环境变量 7.测试ROS安装是否成功 1.添加软件源 2 ...

  5. Ubuntu16.04下ROS Kinetic的安装(2022)

    文章目录 Ubuntu16.04下ROS Kinetic的安装(2022) 一.Ubuntu16.04配置 二.ROS Kinetic安装过程 1.软件中心配置 2.ROS的下载安装 2.1添加源和密 ...

  6. (一)ROS Kinetic的安装与配置,

    第一次,机器人学起来 kinglee988关注 2018.11.26 04:59:17字数 2,760阅读 5,099 Copyright (c)  陕西科技大学北斗机器人协会,版权所有 David ...

  7. ROS Navigation Stack安装

    ROS Navigation Stack安装 Navigation导航包是做导航几乎都要用的,大家可以先去ROS Wiki上学习下 我们先Git下对应版本的软件包,我是Kinetic的,所以是Kine ...

  8. ros卸载和安装,问题总结

    ros卸载与安装问题总结 完全卸载: //依次输入: $sudo apt-get purge ros-* $sudo rm -rf /etc/ros $gedit ~/.bashrc 参考https: ...

  9. 罗技F710无线手柄在ROS下的安装使用

    1. 运行环境 操作系统: Ubuntu 14.04 ROS版本: ROS Indigo 2. 安装手柄驱动和包 依次输入以下命令安装 sudo apt-get install ros-indigo- ...

  10. Ubuntu14.04 for ROS indigo的安装(电脑配置)

    前言 由于个人需要,将笔记本电脑重新装了系统.首先用空白U盘进行系统刻盘,然后电脑所有数据备份,最后重新安装.装入的系统是exbot 机器人提供的Ubuntu14.04 for ros indigo, ...

最新文章

  1. 如何使python print输出不换行
  2. Tiniux 3.0 / Memory.c / OSMemFree
  3. 滴滴 KDD CUP 2020 赛题详解
  4. IOS安装CocoaPods完整流程
  5. MPLS服务合同到期了,是否该续签?
  6. java 前言中不允许有内容_解析xml字符串时报“前言中不允许有内容”错误。
  7. JavaScript 中call apply 那点简单事
  8. 为什么使用MATLAB的imnoise函数添加高斯噪声时要将方差除以255^2
  9. Django常见面试题总结(一)
  10. Photoshop如何自定义形状
  11. 2021年山东省安全员A证考试题及山东省安全员A证考试试卷
  12. vue项目强制清除页面缓存
  13. 形如in (‘111,222,333‘) 的 ,Oracle的in函数(报错:无效数字)
  14. Chrome 浏览器书签功能很强大
  15. 苹果手机很卡怎么解决_iPhone很卡怎么办,教您如何解决iPhone很卡问题!
  16. UEStudio/UltraEdit 的语法高亮文件 (*.uew)
  17. 金蝶eas怎么引出凭证_金蝶EAS如何设置凭证模版
  18. BIM家装族库丨艺术家具族
  19. 老鼠毒药问题、犯人问题
  20. 软件评测师:操作系统基础知识(一)

热门文章

  1. 软件測试系列之入门篇(一)
  2. matlab注册表版本号,通过注册表发现Windows版本信息
  3. 7-301 sdut- C语言实验-数组逆序(数组移位)
  4. 计算机考研复试---中文自我介绍模板+英文自我介绍模板+项目毕设介绍模板( 干货满满!!!)
  5. 《西瓜书》第六章 公式6.2推导 空间任一点到超平面的距离
  6. 缓冲区溢出之栈溢出利用(手动编写无 payload 的 Exploit)
  7. 购买重疾险的十大误区(建议收藏)
  8. c语言用定时器按键发音,c语言中怎样设置计时器?
  9. NDK开发——Android Studio+CMake实现QQ变声效果
  10. seo提交工具_seo整体网站优化步骤大全