论坛
潜水/灌水快乐,沉淀知识,认识更多同行。
ToB圈子
加入IT圈,遇到更多同好之人。
朋友圈
看朋友圈动态,了解ToB世界。
ToB门户
了解全球最新的ToB事件
博客
Blog
排行榜
Ranklist
文库
业界最专业的IT文库,上传资料也可以赚钱
下载
分享
Share
导读
Guide
相册
Album
记录
Doing
搜索
本版
文章
帖子
ToB圈子
用户
免费入驻
产品入驻
解决方案入驻
公司入驻
案例入驻
登录
·
注册
只需一步,快速开始
账号登录
立即注册
找回密码
用户名
Email
自动登录
找回密码
密码
登录
立即注册
首页
找靠谱产品
找解决方案
找靠谱公司
找案例
找对的人
专家智库
悬赏任务
圈子
SAAS
ToB企服应用市场:ToB评测及商务社交产业平台
»
论坛
›
软件与程序人生
›
云原生
›
Ubuntu22.04 + ROS2 Humble配置Moveit2情况
Ubuntu22.04 + ROS2 Humble配置Moveit2情况
万有斥力
金牌会员
|
2024-7-17 20:42:14
|
显示全部楼层
|
阅读模式
楼主
主题
547
|
帖子
547
|
积分
1641
Ubuntu22.04 + ROS2 Humble配置Moveit2情况
情况配置:
ubuntu 22.04
ROS2 humble
moveit2
1.Ubuntu22.04配置ROS2
配置Ubuntu22.04 + ROS2 Humble这里就不再介绍了,具体可以参考这篇Ubuntu22.04 + ROS2 Humble的情况配置
2.二进制安装Moveit2
其实安装moveit2只需要一句话
sudo apt install ros-humble-moveit
复制代码
运行不报错即代表安装乐成
3.配置Moveit的官方教程
3.1安装rosdep
打开一个新的terminal
source /opt/ros/humble/setup.bash
sudo apt install python3-rosdep
复制代码
然后初始化rosdep,并更新情况的依赖
sudo rosdep init
rosdep update
sudo apt update
sudo apt dist-upgrade
复制代码
使用mixin构建情况
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
复制代码
安装vcstool
sudo apt install python3-vcstool
复制代码
3.2下载moveit的tutorials
起首创建一个工作空间
mkdir -p ~/ws_moveit2/src
cd ~/ws_moveit2/src
git clone --branch humble https://github.com/ros-planning/moveit2_tutorials
复制代码
可以在ws_moveit2/src/moveit2_tutorials文件夹下找到moveit2_tutorials.repos文件,该文件的内容如下:
repositories:
launch_param_builder:
type: git
url: https://github.com/PickNikRobotics/launch_param_builder
version: main
moveit2:
type: git
url: https://github.com/ros-planning/moveit2
version: humble
moveit_resources:
type: git
url: https://github.com/ros-planning/moveit_resources
version: humble
moveit_task_constructor:
type: git
url: https://github.com/ros-planning/moveit_task_constructor.git
version: humble
moveit_visual_tools:
type: git
url: https://github.com/ros-planning/moveit_visual_tools
version: ros2
rosparam_shortcuts:
type: git
url: https://github.com/PickNikRobotics/rosparam_shortcuts
version: ros2
srdfdom:
type: git
url: https://github.com/ros-planning/srdfdom.git
version: ros2
复制代码
这个文件里包含了moveit2的及其相关依赖的源码,我们还需要将这些仓库和对应分支的代码克隆下来,
vcs import < moveit2_tutorials/moveit2_tutorials.repos
复制代码
假如克隆失败,repos文件中的https://github.com/前都加上前缀https://ghproxy.com/,然后再克隆一次,假如乐成会出现如下的信息
=== ./launch_param_builder (git) ===
Cloning into '.'...
=== ./moveit2 (git) ===
Cloning into '.'...
=== ./moveit_resources (git) ===
Cloning into '.'...
=== ./moveit_task_constructor (git) ===
Cloning into '.'...
=== ./moveit_visual_tools (git) ===
Cloning into '.'...
=== ./rosparam_shortcuts (git) ===
Cloning into '.'...
=== ./srdfdom (git) ===
Cloning into '.'...
复制代码
然后安装剩余的依赖
sudo apt update && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y
复制代码
出下如下的效果则乐成
Unpacking ros-humble-forward-command-controller (2.34.0-1jammy.20240404.132907) ...
Selecting previously unselected package ros-humble-position-controllers.
Preparing to unpack .../ros-humble-position-controllers_2.34.0-1jammy.20240404.133529_amd64.deb ...
Unpacking ros-humble-position-controllers (2.34.0-1jammy.20240404.133529) ...
Setting up ros-humble-forward-command-controller (2.34.0-1jammy.20240404.132907) ...
Setting up ros-humble-position-controllers (2.34.0-1jammy.20240404.133529) ...
#All required rosdeps installed successfully
复制代码
最后我们可以进入工作空间然后开始编译了
cd ~/ws_moveit2
colcon build --mixin release
复制代码
这个编译的时间可能会很久,请耐心期待。
3.3安装中间件Middleware
官方推荐使用Cyclone DDS作为中间件的解决方案
sudo apt install ros-humble-rmw-cyclonedds-cpp
复制代码
截至 2022 年 9 月 26 日,默认的 ROS 2 中间件 (RMW) 实现存在问题。 作为解决方法,请切换到 Cyclone DDS。所以我们需要在~/.bashrc文件中添加这样一句话
# You may want to add this to ~/.bashrc to source it automatically
# >>> moveit2 Cyclone DDS <<<
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
复制代码
4.启动测试用例
进入我们的工作空间
cd ~/ws_moveit2/src
source install/setup.bash
复制代码
然后直接启动
ros2 launch moveit2_tutorials demo.launch.py rviz_config:=panda_moveit_config_demo_empty.rviz
复制代码
然后会出现一个空缺的rviz2的界面
然后选择Add > MotionPlanning就会出现一个呆板臂的模型,接下来就可以安装官方的教程开始学习了。
Reference
[1]MoveIt 2 Binary Install
[2]MoveIt Quickstart in RViz
[3]《动手学Moveit2》3.安装Moveit2测试
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
本帖子中包含更多资源
您需要
登录
才可以下载或查看,没有账号?
立即注册
x
回复
使用道具
举报
0 个回复
倒序浏览
返回列表
快速回复
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
or
立即注册
本版积分规则
发表回复
回帖并转播
回帖后跳转到最后一页
发新帖
回复
万有斥力
金牌会员
这个人很懒什么都没写!
楼主热帖
阿里巴巴Java开发手册(全册四版) ...
EFCore 动态拼接查询条件(表达式树方式 ...
几个函数的使用例子:更新VBRK-XBLNR, ...
spring aware接口具有什么功能呢? ...
跨域攻击的方法介绍
2022年混过的那些SAP项目
docker实战
Nginx 学习笔记
OpenJDK和OracleJDK的区别说明
LeetCode 力扣 205. 同构字符串
标签云
挺好的
服务器
快速回复
返回顶部
返回列表