博客地址:https://www.cnblogs.com/zylyehuo/

参考链接

Moveit!机械臂控制

文件下载-古月ROS教程视频配套资料

解决Could not find a package configuration file provided by “manipulation_msgs“

moveIt之Unable to identify any set of controllers that can actuate the specified joints问题解决

Unable to identify any set of controllers that can actuate the specified joints: joint1 joint2 ...出错

环境配置

Ubuntu 18.04 melodic

成果图

Part 1: Rviz 机械臂仿真

step1: 下载机械臂模型

下载地址

文件下载-古月ROS教程视频配套资料

step2: 创建工作空间

mkdir -p 6R_mechanical_arm/src
cd 6R_mechanical_arm
catkin_make

step3: src文件夹

将之前下载的机械臂模型中 description、gazebo、planning文件夹复制到 src文件夹下

step4: 在 rviz 中显示机械臂模型

在终端中运行 roscore
在工作空间 6R_mechanical_arm 中打开终端

roslaunch marm_description view_arm.launch

step5: 安装 MoveIt

在终端执行以下命令
sudo apt-get install ros-melodic-moveit

step6: 启动 MoveIt

在终端执行以下命令
rosrun moveit_setup_assistant moveit_setup_assistant

step7: 配置 MoveIt

(1)Start

(2)Self-Collisions

(3)Planning Groups(核心)

检查是否与下图一致

(4)Robot Poses

(5)End Effectors

(6)Author Information

(7)Configuration Files

step8: 重新编译工作空间

step9: 启动demo文件,测试 rviz 仿真环境

拖动规划

直接鼠标拖动机械臂末端执行器

点击 plan ,进行路径规划

点击 excute ,机械臂运动

设置动画是否循环播放

随机目标点规划

设置初始位姿

添加场景物体

可通过拖动箭头变换位置

Part 2: MoveIt 基础编程

以下代码运行都是在 rviz 打开的前提下执行

关节空间规划

在工作空间中打开终端

source ./devel/setup.bash

rosrun marm_planning moveit_fk_demo.py

工作空间规划

在工作空间中打开终端

source ./devel/setup.bash

rosrun marm_planning moveit_ik_demo.py

笛卡尔路径规划

显示路径

走直线

在工作空间中打开终端

source ./devel/setup.bash

rosrun marm_planning moveit_cartesian_demo.py _cartesian:=True   (走直线)

走曲线

在工作空间中打开终端

source ./devel/setup.bash

rosrun marm_planning moveit_cartesian_demo.py _cartesian:=False  (走曲线)

*

避障规划

在工作空间中打开终端

source ./devel/setup.bash

rosrun marm_planning moveit_obstacles_demo.py

Part 3: Gazebo 机械臂仿真

step1: 依赖文件配置

(1)关节轨迹控制器

trajectory_control.yaml

arm_trajectory_controller.launch

(2)MoveIt 控制器

在 6R_mechanical_arm/src/marm_moveit_config/config 路径下新建 controllers.yaml 文件

6R_mechanical_arm/src/marm_moveit_config/config/controllers.yaml

controller_manager_ns: controller_manager
controller_list:
- name: arm/arm_joint_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- joint1
- joint2
- joint3
- joint4
- joint5
- joint6 - name: arm/gripper_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_joint1
- finger_joint2

6R_mechanical_arm/src/marm_moveit_config/launch/arm_moveit_controller_manager.launch.xml

<launch>
<!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
<arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
<param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/> <!-- load controller_list -->
<!-- Gazebo -->
<rosparam file="$(find marm_moveit_config)/config/controllers.yaml"/>
</launch>

6R_mechanical_arm/src/marm_moveit_config/launch/moveit_planning_execution.launch

<launch>
# The planning and execution components of MoveIt! configured to
# publish the current configuration of the robot (simulated or real)
# and the current state of the world as seen by the planner
<include file="$(find marm_moveit_config)/launch/move_group.launch">
<arg name="publish_monitored_planning_scene" value="true" />
</include>
# The visualization component of MoveIt!
<include file="$(find marm_moveit_config)/launch/moveit_rviz.launch"/> <!-- We do not have a robot connected, so publish fake joint states -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="/use_gui" value="false"/>
<rosparam param="/source_list">[/arm/joint_states]</rosparam>
</node> </launch>

(3)启动环境

arm_world.launch

(4)联结所有 launch 文件

arm_bringup_moveit.launch

step2: 启动 gazebo 和 rviz 仿真环境

在工作空间路径下打开终端,输入以下命令

source ./devel/setup.bash

roslaunch marm_gazebo arm_bringup_moveit.launch

调整 rviz 设置

调整 gazebo 设置

存在模型抖动现象,暂时不调整

step3: 使用 MoveIt

调整机器人目标位置

点击 Plan & Execute

问题汇总

1、Could not find a package configuration file provided by “manipulation_msgs“

解决方法

参考地址:解决Could not find a package configuration file provided by “manipulation_msgs“

下载地址:

GitHub - ros-interactive-manipulation/manipulation_msgs: The package in this repo is DEPRECATED (see https://github.com/ros-interactive-manipulation/manipulation_msgs/issues/9)

GitHub - ros-interactive-manipulation/household_objects_database_msgs: Messages for the household_objects_database. The package in this repo is DEPRECATED and you're advised to see moveit_msgs instead (see also https://github.com/ros-interactive-manipulation/household_objects_database_msgs/issues/5)

2、点击 plan&execute 后,rviz有变化,gazebo无变化

解决方案一:
在终端执行以下代码 sudo apt install ros-melodic-ros-controllers
解决方案二:
修改文件:
工作空间/src/marm_moveit_config/launch/trajectory_execution.launch.xml 将参数 pass_all_args="true" 删掉即可

6R机械臂运动规划及仿真的更多相关文章

  1. FOC中的Clarke变换和Park变换详解(动图+推导+仿真+附件代码)

    文章目录 1 前言 2 自然坐标系ABC 3 αβ\alpha\betaαβ 坐标系 3.1 Clarke变换 3.2 Clarke反变换 4 dqdqdq 坐标系 4.1 Park变换 正转 反转 ...

  2. 如何用MoveIt快速搭建机器人运动规划平台?

    MoveIt = RobotGo,翻译成中文就是“机器人,走你!”所以,MoveIt的主要就是一款致力于让机器人能够自主运动及其相关技术的软件,它的所有模块都是围绕着运动规划的实现而设计的. 两个月前 ...

  3. ROS是Robot Operating System

    ROS是Robot Operating System 机器人操作系统ROS | 简介篇   同样,从个人微信公众号Nao(ID:qRobotics)搬运. 前言 先放一个ROS Industrial一 ...

  4. 机器人操作系统ROS | 简介篇

    同样,从个人微信公众号Nao(ID:qRobotics)搬运. 前言 先放一个ROS Industrial一周年剪辑视频. ROS已经发布八周年了,在国外科研机构中非常受欢迎.目前,以美国西南研究院为 ...

  5. 嵌入式的我们为什么要学ROS

  6. 基于 Mathematica 的机器人仿真环境(机械臂篇)[转]

    完美的教程,没有之一,收藏学习. 目的 本文手把手教你在 Mathematica 软件中搭建机器人的仿真环境,具体包括以下内容(所使用的版本是 Mathematica 11.1,更早的版本可能缺少某些 ...

  7. 一步步制作下棋机器人之 coppeliasim进行Scara机械臂仿真与python控制

    稚晖君又发布了新的机器人,很是强大. 在编写时看到了稚晖君的招聘信息,好想去试试啊! 小时候都有一个科幻梦,如今的职业也算与梦想有些沾边了.但看到稚晖君这种闪着光芒的作品,还是很是羡慕. 以前就想做一 ...

  8. V-rep学习笔记:机器人路径规划2

    路径规划问题是机器人学研究的一个重要领域,它是指给定操作环境以及起始和目标的位置姿态,要求选择一条从起始点到目标点的路径,使运动物体(移动机器人或机械臂)能安全.无碰撞地通过所有的障碍物而达到目标位置 ...

  9. 机械臂运动学逆解(Analytical solution)

    计算机器人运动学逆解首先要考虑可解性(solvability),即考虑无解.多解等情况.在机器人工作空间外的目标点显然是无解的.对于多解的情况从下面的例子可以看出平面二杆机械臂(两个关节可以360°旋 ...

  10. ROS机械臂 Movelt 学习笔记1 | 基础准备

    环境:Ubuntu18.04 + ROS Melodic 1. 安装ROS 官网下载安装步骤:http://wiki.ros.org/melodic/Installation/Ubuntu 一键安装的 ...

随机推荐

  1. Axios的相关应用

    Axios 的案例应用 要求利用axios实现之前利用AJAX实现的验证用户是否登录的案例 鉴于这两种语法的相似性,只需要在AJAX里面的注册界面里面的script标签里面包含的代码修改为如下代码即可 ...

  2. 用声网 Android UIKit 为实时视频通话应用添加自定义背景丨声网 SDK 教程

    使用声网 SDK 和 UIKit 创建视频推流应用非常简单,而且声网还有许多功能,可以提高视频通话的质量和便利性.例如,我们可以在视频通话过程中使用虚拟背景,为视频通话增添趣味性. 我们可以通过以下三 ...

  3. 当基础设施故障后,声网 SD-RTN™ 如何保障 RTE 服务的高可用性

    云计算的出现为企业的管理.业务开展.资源整合等带来了极大的便利性,也是数字化建设的核心基建之一,然而局部宕机或者大面积宕机事件对于云厂商来说却也无法避免,全球领先的计算平台也不例外.例如,美国东部时间 ...

  4. 同步协程的必备工具: WaitGroup

    1. 简介 本文将介绍 Go 语言中的 WaitGroup 并发原语,包括 WaitGroup 的基本使用方法.实现原理.使用注意事项以及常见的使用方式.能够更好地理解和应用 WaitGroup 来协 ...

  5. 第四朵“云”!全托管的时序数据云平台 TDengine Cloud 正式支持阿里云

    3 月 13 日,全托管的时序数据处理云服务平台 TDengine Cloud 正式支持阿里云,这是继 Microsoft Azure.AWS.Google Cloud 后 TDengine Clou ...

  6. vue之混入(mixins)的使用方法

    特点:1.方法和参数在各组件中不共享 2.值为对象的选项,如methods,components等,选项会被合并,键冲突的组件会覆盖混入对象的 混入对象中的方法 3.值为函数的选项,如created, ...

  7. css中所有的选择器(包括比较少见的选择器)

    jQuery.CSS常用选择器 符号 描述 示例 说明 紧接无符号 相当于"并且"关系 input.k-textbox{   ...} 选出input并且包含k-textbox类的 ...

  8. mixins使用混入引入组件,并可以使用公共函数。组件类同名函数可以替代公共函数。使用$ref获得子元素数据和元素dom节点。使用$parents获得父元素数据。slot插槽的使用

    父组件: <template> <div class="box"> <Header > <div slot="left" ...

  9. JS中我们为什么要new个实例而不直接执行

    正常情况:<script> function sayHello() { alert("hello") } sayHello();直接调用他 </script> ...

  10. day20:正则表达式

    单个字符的匹配 findall(正则表达式,字符串) 把符合正则表达式的字符串存在列表中返回 预定义字符集(8) \d 匹配数字 \D 匹配非数字 \w 匹配数字字母下划线 \W 匹配非数字或字母或下 ...