博客地址: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. File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent

    IDEA编译报以下错误 File encoding has not been set, using platform encoding UTF-8, i.e. build is platform de ...

  2. 给jui(dwz)的菜单树换一套漂亮的图标

    JUI是一个免费开源的框架,在使用初期,会遇到一些麻烦,因为文档实在太少了,完全不知道从哪里入门,但是,一旦你深入学习后,你会发现,你的选择是不错的,它会提高你开发的效率,同时,你会深深爱上它. 目前 ...

  3. python pandas库总结-数据分析和操作工具

    参考:https://pandas.pydata.org/ Input/output相关函数 pandas.read_excel-将Excel文件读入pandas数据框 支持读取xls, xlsx, ...

  4. nacos实现Java和.NetCore的服务注册和调用

    用nacos作为服务注册中心,如何注册.NetCore服务,如何在Java中调用.NetCore服务呢?可以分为下面几个步骤: 0.运行nacos 1.开发.net core服务,然后调用nacos提 ...

  5. 问道Golang,6月龄必知必会(二)

    在我看来,golnag有许多反直观的设计,而且这些设计通常不能自圆其说,导致gohper一而再再而三的调入陷阱. 网上也有很多gohper总结了一些笔记,我再提炼精简一下,挂在脑图树上便于记忆. 值类 ...

  6. ECharts连接数据库的具体实现

    相关描述 我们由之前的实例可以得知,要是不连接数据库的话,只是需要套用一下ECharts的相关模板即可,这部分内容我在前几篇中已经叙述过了: 现在,我们需要实现的是,将数据库里面的数据导入到web网页 ...

  7. Javaweb学习第十二弹--Request和Response

    XML配置方式编写Servlet 3.0版本之前,仅仅支持XML配置文件的配置方式 1.编写Servlet类 2.在web.xml中配置该Servlet Request和Response Reques ...

  8. ASP.NET Core - 选型系统之选型配置

    1. 选项 前面讲完了.NET Core 下的配置系统,我们可以通过 IConfiguration 服务从各种来源的配置中读取到配置信息,但是每次要用的时候都通过 Iconfiguration 读取配 ...

  9. Qt 学习笔记 - 第五章 - Qt 时间编程 - Qt 时钟

    原文地址:Qt 学习笔记 - 第五章 - Qt 时间编程 - Qt 时钟 Qt 学习笔记全系列传送门: Qt 学习笔记 - 第一章 - 快速开始.信号与槽 Qt 学习笔记 - 第二章 - 添加图片.布 ...

  10. python轮流监听多台服务器资源情况

    在主动持续监听某台服务器基础上,优化为同时监听多台服务器资源占用情况: 优点:较初版,设备监听范围有了明显提升: 缺点:主动式,轮询方式,实时性较差. #-*- coding: utf-8 -*- # ...