基于ROS2 Humble的UR5e机械臂运动规划演示系统,集成MoveIt2框架、OMPL算法库和Gazebo仿真环境,提供完整的机器人运动规划解决方案。
本项目展示了专业级机械臂运动规划系统,主要特性包括:
- ├── ur5e_gazebo/ # Gazebo仿真 ├── ARCHITECTURE.md # 架构文档 └── README.md # 本文件
## 算法支持
| 算法 | 特点 | 适用场景 | 性能 |
|------|------|----------|------|
| **RRT-Connect** | 快速双向探索 | 通用规划任务 | 🟢 快速 |
| **RRT*** | 渐近最优 | 高质量路径需求 | 🟡 中等 |
| **PRM** | 预计算路径图 | 重复查询 | 🟢 查询快 |
| **BIT*** | 平衡最优算法 | 复杂环境 | 🟡 平衡 |
| **FMT*** | 快速收敛 | 实时应用 | 🟢 快速 |
## 功能演示
### 规划结果分析
✅ RRT-Connect规划成功! 📊 详细规划结果: ⏱️ 规划时间: 33 ms 🛣️ 路径航点数: 14 个 ⏰ 轨迹总时长: 1.24 秒 🎯 目标位置: Return Home
🔧 规划器配置: � 算法: RRT-Connect (双向快速探索随机树) ⚙️ 规划时间限制: 5.0 秒 🔄 规划尝试配置: 已设置 🚀 速度缩放: 已优化
📊 路径质量分析: 🔄 各关节运动范围 (弧度): J1(基座): 0.547, J2(肩部): 0.242, J3(肘部): 0.956 J4(腕1): 1.130, J5(腕2): 0.000, J6(腕3): 0.000 📏 路径总长度(关节空间): 2.145 弧度 📈 平均段长度: 0.165 弧度
### 执行监控反馈
```text
🎉 轨迹执行成功!
📊 执行结果统计:
⏱️ ��际执行时间: 1240 ms
⏰ 预计执行时间: 1.24 秒
✅ 成功到达目标位置: Return Home
🎯 执行效率: 100.0% (实际/预计时间比)
- 高精度物理仿真
- 实时3D可视化
- 精确接触力计算
- ROS2无缝集成🤖 UR5e机器人模型**: 官方Universal Robots规格和自定义简化模型
- 📐 MoveIt2框架: 工业标准运动规划框架
- 🧠 OMPL算法库: 多种开源运动规划算法
- 🌍 Gazebo仿真: 基于物理的仿真环境
- 👁️ RViz可视化: 3D可视化和规划界面
- 🔧 模块化设计: 易于扩展和定制的架构
本项目采用标准ROS2工作空间结构,包含以下主要包:
ompl_demo/ # 工作空间根目录 ├── build/ # 编译生成目录 ├── install/ # 安装目录 ├── log/ # 日志目录 ├── config/ # 全局配置文件 │ └── ur_controllers.yaml # UR机器人控制器配置 ├── launch/ # 系统级启动文件 │ ├── ur5e_complete_demo.launch.py # 完整系统演示 │ ├── ur5e_official_display.launch.py # 官方UR5e模型展示 │ └── ur5e_ompl_integration.launch.py # OMPL集成演示 ├── ompl_pkg/ # 主要运动规划包 │ ├── config/ # 包配置文件 │ │ └── ur_controllers.yaml # 控制器配置 │ ├── include/ # C++头文件目录 │ ├── launch/ # 包启动文件 │ │ ├── ur5e_demo.launch.py # 基础演示启动 │ │ └── ur5e_ompl_integration.launch.py # OMPL集成启动 │ ├── src/ # C++源代码 │ │ ├── ompl_node.cpp # OMPL演示节点 │ │ └── ur5e_simple_planner.cpp # UR5e运动规划器 │ ├── CMakeLists.txt # CMake构建配置 │ └── package.xml # ROS包配置 ├── ur5e_description/ # 机器人描述包 │ ├── config/ # RViz配置 │ │ ├── ur5e.rviz # 标准RViz配置 │ │ └── ur5e_simple.rviz # 简化RViz配置 │ ├── launch/ # 可视化启动文件 │ │ ├── display.launch.py # 标准显示启动 │ │ └── display_simple.launch.py # 简化显示启动 │ ├── meshes/ # 机器人网格文件 │ ├── urdf/ # 机器人URDF模型 │ │ ├── ur5e.urdf.xacro # 主URDF文件 │ │ ├── ur5e_robot.urdf.xacro # 机器人模型 │ │ ├── ur5e_robot_simple.urdf.xacro # 简化模型 │ │ └── ur5e_simple.urdf # 简化URDF │ ├── CMakeLists.txt # CMake构建配置 │ └── package.xml # ROS包配置 ├── ur5e_moveit_config/ # MoveIt2配置包 │ ├── config/ # MoveIt配置文件 │ │ ├── controllers.yaml # 控制器配置 │ │ ├── kinematics.yaml # 运动学配置 │ │ ├── moveit.yaml # MoveIt主配置 │ │ ├── moveit.rviz # MoveIt RViz配置 │ │ ├── ompl_planning.yaml # OMPL规划配置 │ │ ├── ros2_controllers.yaml # ROS2控制器配置 │ │ ├── ur5e.srdf # 语义机器人描述 │ │ └── ur5e.srdf.xacro # SRDF模板 │ ├── launch/ # MoveIt启动文件 │ │ └── move_group.launch.py # MoveIt move_group启动 │ ├── CMakeLists.txt # CMake构建配置 │ └── package.xml # ROS包配置 ├── ur5e_gazebo/ # Gazebo仿真包 │ ├── config/ # 仿真配置 │ │ └── ur5e_controllers.yaml # Gazebo控制器配置 │ ├── launch/ # 仿真启动文件 │ │ └── ur5e_gazebo.launch.py # Gazebo仿真启动 │ ├── urdf/ # Gazebo专用URDF │ │ └── ur5e_gazebo.urdf.xacro # Gazebo机器人模型 │ ├── worlds/ # 仿真世界文件 │ │ └── ur5e_world.world # UR5e仿真世界 │ ├── CMakeLists.txt # CMake构建配置 │ └── package.xml # ROS包配置 ├── ARCHITECTURE.md # 系统架构文档 ├── README.md # 项目说明文档 └── .gitignore # Git忽略配置
## 🌟 主要特性
### 🎯 **多层次运动规划架构**
- **基础层**: ROS2通信和机器人状态管理
- **规划层**: MoveIt2框架和OMPL算法集成
- **仿真层**: Gazebo物理仿真和可视化
- **应用层**: 用户接口和演示程序
### 🧠 **OMPL算法支持**
| 算法类型 | 算法名称 | 特点 | 适用场景 | 性能评级 |
|---------|---------|------|----------|----------|
| **基于采样** | RRT-Connect | 快速双向探索 | 通用规划任务 | ⭐⭐⭐⭐⭐ |
| **渐近最优** | RRT* | 渐近最优解 | 高质量路径需求 | ⭐⭐⭐⭐ |
| **基于路径图** | PRM | 预计算路径网络 | 重复查询环境 | ⭐⭐⭐⭐ |
| **批处理优化** | BIT* | 平衡探索与利用 | 复杂约束环境 | ⭐⭐⭐ |
| **快速收敛** | FMT* | 快速收敛最优解 | 实时应用场景 | ⭐⭐⭐⭐ |
### 🛠️ **系统组件**
- **6自由度运动学**: 完整的6DOF机械臂控制
- **多模型支持**: 官方和自定义机器人描述
- **实时状态发布**: 关节位置和状态实时更新
- **路径规划**: 自动轨迹生成和优化
- **碰撞检测**: 障碍物检测和避免
- **交互控制**: 手动和自动操作模式
## 🚀 快速开始
### 📋 环境要求
- **操作系统**: Ubuntu 22.04 LTS
- **ROS版本**: ROS2 Humble
- **MoveIt版本**: MoveIt2 2.5+
- **编译器**: GCC 11+ (C++17支持)
- **Python版本**: Python 3.10+
### 🔧 依赖安装
```bash
# 更新系统包
sudo apt update && sudo apt upgrade -y
# 安装ROS2 Humble基础环境
sudo apt install -y ros-humble-desktop-full
# 安装MoveIt2运动规划框架
sudo apt install -y ros-humble-moveit
# 安装Gazebo仿真环境
sudo apt install -y ros-humble-gazebo-ros-pkgs
# 安装Universal Robots官方支持包
sudo apt install -y ros-humble-ur ros-humble-ur-description
sudo apt install -y ros-humble-ur-bringup ros-humble-ur-moveit-config
# 安装额外的ROS2工具
sudo apt install -y ros-humble-joint-state-publisher-gui
sudo apt install -y ros-humble-robot-state-publisher
sudo apt install -y ros-humble-rviz2
sudo apt install -y ros-humble-ros2-control
sudo apt install -y ros-humble-ros2-controllers
# 安装构建工具
sudo apt install -y python3-colcon-common-extensions
sudo apt install -y python3-vcstool
# 进入工作空间
cd /home/admin/develop/ws/ompl_demo
# 配置ROS2环境
source /opt/ros/humble/setup.bash
# 编译所有包
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
# 配置工作空间环境
source install/setup.bashcolcon build
source install/setup.bash
### 🎮 运行演示
#### 1️⃣ 基础可视化演示
```bash
# 启动UR5e机器人可视化 (使用官方模型)
ros2 launch ur5e_description display.launch.py
# 或者使用简化模型
ros2 launch ur5e_description display_simple.launch.py
# 终端1: 启动机器人可视化
ros2 launch ur5e_description display.launch.py
# 终端2: 运行OMPL运动规划器
ros2 run ompl_pkg ur5e_simple_planner# 启动完整演示系统 (Gazebo + MoveIt2 + RViz2)
ros2 launch launch/ur5e_complete_demo.launch.py# 仅启动Gazebo仿真环境
ros2 launch ur5e_gazebo ur5e_gazebo.launch.py# 使用Universal Robots官方模型
ros2 launch launch/ur5e_official_display.launch.py系统支持多种OMPL算法,每种算法都有其独特的优势:
算法性能对比:
┌─────────────┬──────────┬────────────┬──────────────┬──────────┐
│ 算法 │ 规划时间 │ 路径质量 │ 内存使用 │ 成功率 │
├─────────────┼──────────┼────────────┼──────────────┼──────────┤
│ RRT-Connect │ 快速 │ 中等 │ 低 │ 高 │
│ RRT* │ 中等 │ 最优 │ 中等 │ 中高 │
│ PRM │ 慢 │ 好 │ 高 │ 高 │
│ BIT* │ 中等 │ 很好 │ 中等 │ 中高 │
│ FMT* │ 快速 │ 好 │ 中等 │ 中高 │
└─────────────┴──────────┴────────────┴──────────────┴──────────┘
系统提供详细的性能分析和执行统计:
✅ RRT-Connect规划成功!
📊 详细规划结果:
⏱️ 规划时间: 33 ms
🛣️ 路径航点数: 14 个
⏰ 轨迹总时长: 1.24 秒
🎯 目标位置: Return Home
🔧 规划器配置:
🧠 算法: RRT-Connect (双向快速探索随机树)
⚙️ 规划时间限制: 5.0 秒
🔄 规划尝试配置: 已设置
🚀 速度缩放: 已优化
📊 路径质量分析:
🔄 各关节运动范围 (弧度):
J1(基座): 0.547, J2(肩部): 0.242, J3(肘部): 0.956
J4(腕1): 1.130, J5(腕2): 0.000, J6(腕3): 0.000
📏 路径总长度(关节空间): 2.145 弧度
📈 平均段长度: 0.165 弧度
🎉 轨迹执行成功!
📊 执行结果统计:
⏱️ 实际执行时间: 1240 ms
⏰ 预计执行时间: 1.24 秒
✅ 成功到达目标位置: Return Home
🎯 执行效率: 100.0% (实际/预计时间比)
在 ur5e_simple_planner.cpp 中修改规划器算法:
// 选择不同的OMPL算法
move_group_->setPlannerId("RRTConnectkConfigDefault"); // RRT-Connect (推荐)
move_group_->setPlannerId("RRTstarkConfigDefault"); // RRT* (渐近最优)
move_group_->setPlannerId("PRMkConfigDefault"); // PRM (路径图方法)
move_group_->setPlannerId("BITstarkConfigDefault"); // BIT* (批处理优化)
move_group_->setPlannerId("FMTkConfigDefault"); // FMT* (快速收敛)// 调整规划参数以获得最佳性能
move_group_->setPlanningTime(5.0); // 规划时间限制(秒)
move_group_->setNumPlanningAttempts(3); // 尝试次数
move_group_->setMaxVelocityScalingFactor(0.5); // 速度缩放因子
move_group_->setMaxAccelerationScalingFactor(0.5); // 加速度缩放因子
move_group_->setGoalTolerance(0.01); // 目标容差编辑 ur5e_gazebo/worlds/ur5e_world.world 添加障碍物:
<model name="obstacle_box">
<pose>0.5 0.5 0.25 0 0 0</pose>
<link name="box_link">
<collision name="box_collision">
<geometry>
<box><size>0.2 0.2 0.5</size></box>
</geometry>
</collision>
<visual name="box_visual">
<geometry>
<box><size>0.2 0.2 0.5</size></box>
</geometry>
</visual>
</link>
</model>错误信息:
ERROR: Could not find parameter robot_description
解决方法:
# 检查robot_description参数
ros2 param list | grep robot_description
# 手动设置参数
ros2 param set /robot_state_publisher robot_description "$(cat install/ur5e_description/share/ur5e_description/urdf/ur5e.urdf.xacro)"错误信息:
ERROR: RRT-Connect运动规划失败
解决方法:
- 检查目标位置是否在工作空间内
- 验证关节限制设置
- 增加规划时间限制
- 尝试不同的规划算法
错误信息:
ERROR: Gazebo simulation crashed with exit code -11
解决方法:
# 清理Gazebo临时文件
rm -rf ~/.gazebo/
# 检查显卡驱动支持
glxinfo | grep OpenGL
# 使用软件渲染模式
export LIBGL_ALWAYS_SOFTWARE=1错误信息:
WARN: Controller manager not available
解决方法:
# 检查控制器状态
ros2 control list_controllers
# 重启控制器管理器
ros2 lifecycle set /controller_manager configure
ros2 lifecycle set /controller_manager activate# 查看活动节点
ros2 node list
# 监控话题数据
ros2 topic echo /joint_states
ros2 topic echo /move_group/display_planned_path
# 检查服务状态
ros2 service list | grep move_group
# 查看变换关系
ros2 run tf2_tools view_frames.py
# 监控系统日志
ros2 log echo -a- 创建新的描述包:
ros2 pkg create --build-type ament_cmake my_robot_description- 配置URDF模型:
<!-- 添加到my_robot.urdf.xacro -->
<robot name="my_robot">
<!-- 添加关节和连杆定义 -->
</robot>- 创建MoveIt配置:
# 使用MoveIt配置助手
ros2 launch moveit_setup_assistant setup_assistant.launch.py- 配置OMPL算法:
编辑 ur5e_moveit_config/config/ompl_planning.yaml:
my_manipulator:
default_planner_config: RRTConnectkConfigDefault
planner_configs:
- MyCustomAlgorithm:
type: geometric::RRT
range: 0.0
goal_bias: 0.05- 在代码中使用:
move_group_->setPlannerId("MyCustomAlgorithm");- 添加传感器到URDF:
<link name="camera_link">
<sensor name="camera" type="camera">
<!-- 传感器配置 -->
</sensor>
</link>- 配置感知流水线:
# 在moveit配置中添加
sensors:
- sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
point_cloud_topic: /camera/depth/points- 🏗️ 系统架构文档: 详细的系统设计和模块说明
- 🚀 快速开始指南: 环境配置和基础使用
- ⚙️ 高级配置说明: 参数调整和定制化配置
- 🛠️ 故障排除指南: 常见问题和解决方案
- 📚 扩展开发文档: 功能扩展和二次开发
欢迎为项目贡献代码和文档!请遵循以下准则:
- 遵循ROS2编码规范和C++17标准
- 添加适当的单元测试和集成测试
- 保持向后兼容性
- 更新相关文档和配置文件
- 使用Issue模板报告问题
- 提供详细的错误信息和重现步骤
- 附加相关的系统信息和日志
- 清楚描述建议的功能
- 解释使用场景和价值
- 考虑向后兼容性
本项目基于Apache License 2.0开源,详见各包的package.xml文件。
- ROS2 Humble官方文档: ROS2框架完整文档
- MoveIt2教程: MoveIt2运动规划教程
- OMPL官方网站: 开源运动规划库
- Gazebo仿真文档: 机器人仿真平台
- Universal Robots文档: UR机器人技术资料
- ROS Answers: ROS技术问答社区
- MoveIt Discourse: MoveIt用户论坛
- GitHub Discussions: ROS2开发讨论
✅ 系统状态: 所有包编译成功,功能测试通过
📅 最后更新: 2025年7月27日
🔧 ROS2版本: Humble
🎯 测试状态:
- ✅ 机器人可视化正常
- ✅ 运动规划功能正常
- ✅ 官方UR5e集成完成
- ✅ Gazebo仿真环境稳定
🤖 可用模型: 官方UR5e + 自定义简化模型
🎮 演示脚本: 完整系统演示、基础可视化、运动规划演示
⭐ 如果这个项目对您有帮助,请给我们一个Star!
ompl_demo/
├── ompl_pkg/ # 主要规划包
│ ├── src/ # 源代码
│ │ ├── ur5e_simple_planner.cpp # 主要规划节点
│ │ └── ompl_node.cpp # OMPL演示节点
│ ├── launch/ # 启动文件
│ └── config/ # 配置文件
├── ur5e_description/ # 机器人描述
├── ur5e_moveit_config/ # MoveIt2配置
├── ur5e_gazebo/ # Gazebo仿真
├── ARCHITECTURE.md # 架构文档
└── README.md # 本文件
| 算法 | 特点 | 适用场景 | 性能 |
|---|---|---|---|
| RRT-Connect | 快速双向探索 | 通用规划任务 | 🟢 快速 |
| RRT* | 渐近最优 | 高质量路径需求 | 🟡 中等 |
| PRM | 预计算路径图 | 重复查询 | 🟢 查询快 |
| BIT* | 平衡最优算法 | 复杂环境 | 🟡 平衡 |
| FMT* | 快速收敛 | 实时应用 | 🟢 快速 |
✅ RRT-Connect规划成功!
📊 详细规划结果:
⏱️ 规划时间: 33 ms
🛣️ 路径航点数: 14 个
⏰ 轨迹总时长: 1.24 秒
🎯 目标位置: Return Home
🔧 规划器配置:
🧠 算法: RRT-Connect (双向快速探索随机树)
⚙️ 规划时间限制: 5.0 秒
🔄 规划尝试配置: 已设置
🚀 速度缩放: 已优化
📊 路径质量分析:
🔄 各关节运动范围 (弧度):
J1(基座): 0.547, J2(肩部): 0.242, J3(肘部): 0.956
J4(腕1): 1.130, J5(腕2): 0.000, J6(腕3): 0.000
📏 路径总长度(关节空间): 2.145 弧度
📈 平均段长度: 0.165 弧度
🎉 轨迹执行成功!
📊 执行结果���计:
⏱️ 实际执行时间: 1240 ms
⏰ 预计执行时间: 1.24 秒
✅ 成功到达目标位置: Return Home
🎯 执行效率: 100.0% (实际/预计时间比)
- 规划时间统计
- 路径质量评估
- 执行效率监控
- 算法性能对比
- 详细错误码说明
- 失败原因分析
- 调试建议提供
- 系统状态监控
在 ur5e_simple_planner.cpp 中修改规划器:
// 选择不同的OMPL算法
move_group_->setPlannerId("RRTConnectkConfigDefault"); // RRT-Connect
move_group_->setPlannerId("RRTstarkConfigDefault"); // RRT*
move_group_->setPlannerId("PRMkConfigDefault"); // PRM
move_group_->setPlannerId("BITstarkConfigDefault"); // BIT*
move_group_->setPlannerId("FMTkConfigDefault"); // FMT*move_group_->setPlanningTime(5.0); // 规划时间限制
move_group_->setNumPlanningAttempts(3); // 尝试次数
move_group_->setMaxVelocityScalingFactor(0.5); // 速度缩放
move_group_->setMaxAccelerationScalingFactor(0.5); // 加速度缩放-
MoveIt2初始化失败
ERROR: Could not find parameter robot_description解决: 确保robot_description参数正确加载
ros2 param list | grep robot_description -
规划失败
ERROR: RRT-Connect运动规划失败解决: 检查目标位置是否在工作空间内,验证关节限制
-
执行失败
WARN: 轨迹执行失败 - 控制失败解决: 检查控制器状态和关节约束设置
- RViz2可视化: 查看机器人模型和规划路径
- 话题监控:
ros2 topic echo /joint_states - 服务调用:
ros2 service list | grep move_group - 日志分析: 查看详细的规划和执行日志
- 在MoveIt2配置中添加算法配置
- 修改规划节点的算法选择逻辑
- 更新性能分析和日志输出
- 创建新的robot_description包
- 配置对应的MoveIt2参数
- 调整控制器和仿真��置
- 添加传感器URDF描述
- 配置碰撞检测
- 实现环境感知算法
- 📋 架构文档: 详细的系统架构和模块说明
- 🚀 快速开始: 见上方快速开始部分
- 🔧 配置指南: 见配置定制部分
- 🐛 故障排除: 见故障排除部分
欢迎提交Issue和Pull Request!请确保:
- 代码符合ROS2编码规范
- 添加适当的测试和文档
- 保持向后兼容性
- 更新相关配置文件
本项目基于MIT许可证开源,详见LICENSE文件。
⭐ 如果这个项目对您有帮助,请给我们一个Star! ├── ur5e_description/ # Custom simplified robot models │ ├── urdf/ # Custom URDF files │ ├── config/ # RViz configurations │ └── launch/ # Visualization launch files ├── ur5e_moveit_config/ # Custom MoveIt configuration │ ├── config/ # Planning parameters and kinematics │ └── launch/ # MoveIt launch files ├── ur5e_gazebo/ # Gazebo simulation integration │ ├── worlds/ # Simulation worlds with obstacles │ ├── config/ # Controller configuration │ └── launch/ # Simulation launch files ├── ompl_pkg/ # Motion planning nodes │ ├── src/ # C++ planning algorithms │ └── launch/ # Planning demo launch files └── launch/ # System-wide launch files ├── ur5e_official_display.launch.py # Official UR model ├── ur5e_complete_demo.launch.py # Full system demo └── ur5e_ompl_integration.launch.py # OMPL integration
## 🛠️ Key Features
### Motion Planning Options
- **Official UR5e Model**: Real Universal Robots specifications
- **Custom Simplified Model**: Lightweight for testing
- **OMPL Integration**: Multiple planning algorithms
- **Gazebo Simulation**: Physics-based testing environment
- **Real-time Control**: Joint-space trajectory execution
### System Components
- **6-DOF Kinematics**: Full 6-degree-of-freedom arm control
- **Multiple Model Support**: Official and custom robot descriptions
- **Joint State Publishing**: Real-time joint position control
- **Path Planning**: Automated trajectory generation
- **Collision Avoidance**: Obstacle detection and avoidance
- **Interactive Control**: Manual and automated operation modes
## 🚀 Quick Start
### 1. Build the Workspace
```bash
cd /home/admin/develop/ws/ompl_demo
source /opt/ros/humble/setup.bash
colcon build
source install/setup.bash
# Use official Universal Robots UR5e model
ros2 launch ur_description view_ur.launch.py ur_type:=ur5e# Terminal 1: Launch custom robot visualization
ros2 launch ur5e_description display_simple.launch.py
# Terminal 2: Run dynamic joint movement test
python3 test_ur5e_visualization.py# Terminal 1: Start robot visualization
ros2 launch ur5e_description display_simple.launch.py
# Terminal 2: Run OMPL motion planner
ros2 run ompl_pkg ur5e_simple_planner# Launch complete system with Gazebo + RViz + Motion Planning
ros2 launch ur5e_complete_demo.launch.pyros2 launch ur5e_gazebo ur5e_gazebo.launch.py- test_ur5e_visualization.py - Dynamic joint movement demonstration
- test_ur5e_official.py - Official UR5e model testing
- demo_ur5e_official.py - System capability overview
- Joint State Publisher GUI: Use sliders to manually control joints
- RViz Visualization: Observe robot movement in real-time
- Terminal Monitoring: Watch planning algorithm output
- Gazebo Physics: Test in realistic simulation environment
- Model Loading: Robot description published to
/robot_description - Joint State Publishing: Current positions published to
/joint_states - Motion Planning: OMPL algorithms compute collision-free paths
- Trajectory Execution: Planned motions sent to robot controllers
- Real-time Feedback: Status monitoring and error handling
# Run dynamic joint movement test
python3 test_ur5e_visualization.py# Start motion planner with predefined waypoints
ros2 run ompl_pkg ur5e_simple_planner# Launch with joint state publisher GUI
ros2 launch ur_description view_ur.launch.py ur_type:=ur5eThe system provides comprehensive robotic control capabilities:
- Real-time Joint Control: Direct joint position commanding
- Path Planning: Automated trajectory generation between waypoints
- Collision Avoidance: Safe motion in complex environments
- Visualization: Real-time 3D robot visualization
- Simulation: Physics-based Gazebo integration
- Official Models: Support for Universal Robots specifications
ur5e_official_display.launch.py- Official UR5e model visualizationur5e_complete_demo.launch.py- Complete system demonstrationur5e_gazebo.launch.py- Gazebo simulation environmentdisplay_simple.launch.py- Custom simplified model
- Official UR5e: Real Universal Robots specifications
- Custom Simplified: Lightweight testing model
- Gazebo Integration: Physics simulation support
- Build Failures: Ensure ROS2 Humble is properly installed
- Missing UR Packages: Install official Universal Robots packages
- Launch Failures: Check that all dependencies are built
- Visualization Issues: Verify RViz configuration and display
# Install Universal Robots official packages
sudo apt install ros-humble-ur ros-humble-ur-description
sudo apt install ros-humble-ur-bringup ros-humble-ur-moveit-config
# Install additional dependencies
sudo apt install ros-humble-joint-state-publisher-gui
sudo apt install ros-humble-robot-state-publisher
sudo apt install ros-humble-rviz2# Clean build if having issues
cd /home/admin/develop/ws/ompl_demo
rm -rf build install log
colcon build- Robot Model Integration: Official vs custom URDF models
- Joint Control: Real-time position commanding
- Motion Planning: OMPL algorithm integration
- Visualization: RViz and Gazebo integration
- ROS2 Architecture: Publishers, subscribers, and launch systems
This project is licensed under the Apache License 2.0 - see the individual package.xml files for details.
This is a demonstration project showcasing ROS2, Universal Robots integration, and OMPL motion planning. Feel free to extend and modify for your specific robotic applications.
System Status: ✅ All packages built successfully
Last Updated: July 2025
ROS2 Distribution: Humble
Test Status: ✅ Robot visualization working, ✅ Motion planning functional, ✅ Official UR5e integration complete
Models Available: Official UR5e + Custom simplified models
Demo Scripts: test_ur5e_visualization.py, test_ur5e_official.py, demo_ur5e_official.py