码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 6R机械臂运动规划及仿真


    博客地址: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>
    <arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
    <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>
    <rosparam file="$(find marm_moveit_config)/config/controllers.yaml"/>
    launch>

    6R_mechanical_arm/src/marm_moveit_config/launch/moveit_planning_execution.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
    # The visualization component of MoveIt!
    [/arm/joint_states]

    (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" 删掉即可
  • 相关阅读:
    016 Spring Boot + Vue 图书管理系统
    【Python基础篇019】hashlib模块初识
    arcgis 网络分析 生成可达范围/等时线
    RSA加密原理与RSA公钥加密系统、数字签名
    Linux(进程间通信)
    传统网站与数字化网站的对比
    三维数模(.obj .stl)转化为点云
    羽夏壳世界——异或加密的实现
    2023-09-09青少年软件编程(C语言)等级考试试卷(二级)解析
    互联网热门词汇-媒体经常说的热门词
  • 原文地址:https://www.cnblogs.com/zylyehuo/p/17398403.html
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号