ROS 进阶学习笔记(17):ROS导航2:关于 move_base Package(底盘移动包)

原创 2016年06月02日 16:46:06

== 关于move_base 包(底盘移动包?移动底盘包?) ==

开始之前,我sonictl@CSDN有几个问题(Link on ROS_Answer)需要搞定:

  1. costmap_2d包 与 move_base包 是什么关系?
  2. 导航时,在RviZ工具中,可以看到,inflate 地图是由一个叫做 /move_base/local_costmap/costmap 主题生成的,这个主题的发布者又是move_base,怎么发布的?
  3. 到底是costmap_2d发布的/move_base/local_costmap/costmap还是move_base发布的它?又回到第1个问题,关系问题。
  4. http://wiki.ros.org/costmap_2d/hydro/obstacles 这里是不是可以探寻一点东西出来,以调整obstacle层的刷新机制
  5. 我sonictl@CSDN要解决的就是inflated obstacle层的刷新机制

How to solve the problem:



=== 我学这个包的时候,尽量总结wiki page上的内容如下,算是sonictl@CSDN读书笔记:===
wikipage: http://wiki.ros.org/move_base
move_base package 所属Stack: navigation
关于这个包在 ROS Navigation 框架中的位置,参见:ROS探索总结(十三)——导航与定位框架

【Summary】

The move_base package provides an implementation of an action (see the actionlib package) that, given a goal in the world, will attempt to reach it with a mobile base. The move_base node links together a global and local planner to accomplish its global navigation task. It supports any global planner adhering to the nav_core::BaseGlobalPlanner interface specified in the nav_core package and any local planner adhering to the nav_core::BaseLocalPlanner interface specified in thenav_core package. The move_base node also maintains two costmaps, one for the global planner, and one for a local planner (see thecostmap_2d package) that are used to accomplish navigation tasks.

这个包就是一个Action的实现,关于action,是一个ROS里的概念,需要到链接去学习。这个action就是要有几个输入,比如goal,然后它要给出的就是你的mobile base怎么到那里去的一个action输出。the move_base node实际上是一个link, 把全局规划器、局部规划器连接起来,以达成导航到目的地的目标。nav_core::BaseGlobalPlanner 接口里由nav_core指定的那些全局或 nav_core::BaseLocalPlanner 接口里由nav_core指定的局部规划器都被 move_base 支持。move_base node 还维护了俩costmap, 一个是为全局规划器准备的 global costmap, 一个是local的,这俩costmap也是为了完成sonictl@CSDN导航的任务。


【关于 move_base Nodes】

This package provides the move_base ROS Node which is a major component of thenavigation stack. A detailed description of this Node and its configuration options is found below. 主要的结构就是见下图咯:


    要说的呢,就是move_base看起来仿佛是个壳儿,壳儿负责和外界交流,它肚子里的才是干货~~sonictl@CSDN呵呵!

    The move_base node provides a ROS interface for configuring, running, and interacting with thenavigation stack on a robot. A high-level view of the move_base node and its interaction with other components is shown above. The blue vary based on the robot platform, the gray are optional but are provided for all systems, and the white nodes are required but also provided for all systems. For more information on configuration of themove_base node, and the navigation stack as a whole, please see thenavigation setup and configuration tutorial.

    这里讲了各个颜色的方框代表的含义,给了一个tutorial的链接,教你怎么配置 navigation setup and configuration. 配置导航stack肯定会用到的link

   

【期望的机器人的行为】

先扔了一幅图:

Running the move_base node on a robot that is properly configured (please seenavigation stack documentation for more details) results in a robot that will attempt to achieve a goal pose with its base to within a user-specified tolerance. In the absence of dynamic obstacles, the move_base node will eventually get within this tolerance of its goal or signal failure to the user. Themove_base node may optionally perform recovery behaviors when the robot perceives itself as stuck. By default, themove_base node will take the following actions to attempt to clear out space(sonictl@CSDN):

First, obstacles outside of a user-specified region will be cleared from the robot's map. Next, if possible, the robot will perform an in-place rotation to clear out space. If this too fails, the robot will more aggressively clear its map, removing all obstacles outside of the rectangular region in which it can rotate in place. This will be followed by another in-place rotation. If all this fails, the robot will consider its goal infeasible and notify the user that it has aborted. These recovery behaviors can be configured using the recovery_behaviors parameter, and disabled using therecovery_behavior_enabled parameter.

对图作一下解释: 在你已经配置得比较好的机器人上运行 move_base node就会让你的机器人跑到指定的位姿去,在tolerance,容错值允许的范围内到达。In the absence of dynamic obstacles,要么 move_base node会最终到达,要么会返回一个失败信号。当机器人感觉被卡住stuck时,the move_base node可能会选择性地执行recovery 恢复行为。默认的,这个 move_base node 会采取以下的措施来clear out space: 搞清楚自己的处境?

  • 首先,机器人清扫地图,无关紧要的障碍就不处理了。
  • 然后,机器人会原地转圈来搞清楚自己处境clear out space
  • 如果这个失败,机器人会变得更勇敢地clear its map, 移除矩形区域以外的所有的障碍,而这个矩形区域是它可以在其中原地转圈的区域。
  • 接下来就是另一个 in-place 转圈原地转圈。
  • 如果上述所有步骤都失败了,机器人可能会考虑它的goal达不到了并通知用户aborted任务失败。
        sonictl@CSDN: 这些恢复行为可以在 the recovery_behaviors parameter 里配置,或者开关这些行为:and be disabled using the recovery_behavior_enabled parameter


【Action API】

The move_base node provides an implementation of theSimpleActionServer (seeactionlib documentation), that takes in goals containinggeometry_msgs/PoseStamped messages. You can communicate with themove_base node over ROS directly, but the recommended way to send goals tomove_base if you care about tracking their status is by using theSimpleActionClient. Please see actionlib documentation for more information.

The move_base node 提供的是一个SimpleActionServer (seeactionlib documentation)的动作服务器,它吃进 goals containinggeometry_msgs/PoseStamped messages。你可以在ROS架构上和move_base node 通信,但如果你关心它们的状态的话,推荐的方式是通过使用 theSimpleActionClient给它发goals, 详见actionlib documentation for more information。(看来 actionlib documentation 是必须要搞一搞才行了~~)

sonictl: 这里面涉及到ROS里的几个值得总结的概念分类问题: 1. What is Service/Actionlib/plugin...     2. What is message/topic/parameter/node/tf   3. ...other concepts

Action Subscribed Topics:

move_base/goal (move_base_msgs/MoveBaseActionGoal)

  •         A goal for move_base to pursue in the world.
move_base/cancel (actionlib_msgs/GoalID)
  •         A request to cancel a specific goal.

Action Published Topics:

move_base/feedback (move_base_msgs/MoveBaseActionFeedback)

  •         Feedback contains the current position of the base in the world.
move_base/status (actionlib_msgs/GoalStatusArray)
  •         Provides status information on the goals that are sent to themove_base action.
move_base/result (move_base_msgs/MoveBaseActionResult)Result is empty for the move_base action.


【Subscribed Topics】

move_base_simple/goal (geometry_msgs/PoseStamped)Provides a non-action interface to move_base for users that don't care about tracking the execution status of their goals.

【Published Topics】

cmd_vel (geometry_msgs/Twist)A stream of velocity commands meant for execution by a mobile base.

【Services】

这几个services还是挺有用的,我sonictl就不纯翻译了。sonictl@CSDN

~make_plan (nav_msgs/GetPlan)

  • Allows an external user to ask for a plan to a given pose frommove_base without causingmove_base to execute that plan.  请求一个plan, 但它不执行
~clear_unknown_space (std_srvs/Empty)
  • Allows an external user to tell move_base to clear unknown space in the area directly around the robot. This is useful when move_base has its costmaps stopped for a long period of time and then started again in a new location in the environment. - Available in versions from 1.1.0-groovy 
~clear_costmaps (std_srvs/Empty)Allows an external user to tell move_base to clear obstacles in the costmaps used by move_base. This could cause a robot to hit things and should be used with caution. -New in 1.3.1

【Parameters】

这些参数一般是写在 ~/ws_catkin/rbx1/rbx1_nav/config/turtlebot/base_local_planner_params.yaml 文件里(MyBook: ros_by_example_hydro_volume1)

~base_global_planner (string, default:"navfn/NavfnROS"For 1.1+ series)

  • The name of the plugin for the global planner to use withmove_base, seepluginlib documentation for more details on plugins. This plugin must adhere to thenav_core::BaseGlobalPlanner interface specified in thenav_core package. (1.0 series default:"NavfnROS")
    全局规划器的名字,让move_base拿来用的,关于pluginlib, 要看文档。这个plugin 必须要粘在nave_core::BaseGlobalPlanner 的接口上使用,nav_core定义了那些接口。1.0 系列的默认的全局规划器名字是:NavfnROS
~base_local_planner (string, default:"base_local_planner/TrajectoryPlannerROS"For 1.1+ series)
  • The name of the plugin for the local planner to use withmove_base seepluginlib documentation for more details on plugins. This plugin must adhere to thenav_core::BaseLocalPlanner interface specified in thenav_core package. (1.0 series default:"TrajectoryPlannerROS")
    局部规划器的插件名,关于插件的事情就还是那个链接了。这个plugin 必须要粘在nave_core::BaseLocalPlanner 的接口上使用,nav_core定义了那些接口。1.0 系列的默认的全局规划器名字是:TrajectoryPlannerROS
~recovery_behaviors (list, default: [{name: conservative_reset, type: clear_costmap_recovery/ClearCostmapRecovery}, {name: rotate_recovery, type: rotate_recovery/RotateRecovery}, {name: aggressive_reset, type: clear_costmap_recovery/ClearCostmapRecovery}] For 1.1+ series)
  • A list of recovery behavior plugins to use with move_base, see pluginlib documentation for more details on plugins. These behaviors will be run whenmove_base fails to find a valid plan in the order that they are specified. After each behavior completes,move_base will attempt to make a plan. If planning is successful,move_base will continue normal operation. Otherwise, the next recovery behavior in the list will be executed. These plugins must adhere to thenav_core::RecoveryBehavior interface specified in the nav_core package. (1.0 series default: [{name: conservative_reset, type: ClearCostmapRecovery}, {name: rotate_recovery, type: RotateRecovery}, {name: aggressive_reset, type: ClearCostmapRecovery}]).
    Note: For the default parameters, the aggressive_reset behavior will clear out to a distance of 4 *~/local_costmap/circumscribed_radius.
    这个就是局部摆脱困境的一些动作列表,这里呢也可以使用插件来弄,你sonictl的摆脱性能好不好就看这个核心技术了哟!!抓狂
~controller_frequency (double, default: 20.0)
  • The rate in Hz at which to run the control loop and send velocity commands to the base.
    控制器发布速度命令的频率(看看,默认值20!一般设置为3。这里暗示了一个向底盘发送速度指令的频率要求,而不是给个值就不管了~~)
~planner_patience (double, default: 5.0)
  • How long the planner will wait in seconds in an attempt to find a valid plan before space-clearing operations are performed.
    字面意思是:规划器在一个操作执行前等几秒钟就去找合适的路径,那个操作就是 space-clearing 。这个有点confusing
  • 理解看的话,应该是 全局/局部 规划器要在 space-clearing 操作(obstacle就会被清掉)执行几秒之后开始规划路径。而不是之前~~疑问不懂~
    操作器找路5s后,如果还找不到,就space-clearing操作?
~controller_patience (double, default: 15.0)
  • How long the controller will wait in seconds without receiving a valid control before space-clearing operations are performed.
    控制器要等15s没有接到一个合法的控制,然后就要执行space-clearing操作(obstacle就会被清掉)了。
~conservative_reset_dist (double, default: 3.0)
  • The distance away from the robot in meters at which obstacles will be cleared from thecostmap when attempting to clear space in the map. Note, this parameter is only used when the default recovery behaviors are used formove_base.
    距离机器人多远的距离的obstacle就会被从costmap上清掉。注意,只有 default recovery behaviors are used for move_base 时,这个参数才有用。
~recovery_behavior_enabled (bool, default:true)
  • Whether or not to enable the move_base recovery behaviors to attempt to clear out space.
    是否允许 move_base 的恢复动作来clear out space.
  • clear out space 究竟是什么意思?刷新costmap上的obstacle?
~clearing_rotation_allowed (bool, default:true)
  • Determines whether or not the robot will attempt an in-place rotation when attempting to clear out space. Note: This parameter is only used when the default recovery behaviors are in use, meaning the user has not set therecovery_behaviors parameter to anything custom.
    要不要机器人在clear out space时执行一个原地转圈。注意,只有 default recovery behaviors are used for move_base 时,这个参数才有用。这意味着用户sonictl并没有把 recovery_behaviors 这个参数设置为 anything custom(定制的任何值)。
~shutdown_costmaps (bool, default:false)
  • Determines whether or not to shutdown the costmaps of the node whenmove_base is in an inactive state
    当move_base在不活动状态时,是不是要关掉move_base node的 costmap
~oscillation_timeout (double, default: 0.0)
  • How long in seconds to allow for oscillation before executing recovery behaviors. A value of 0.0 corresponds to an infinite timeout.New in navigation 1.3.1
    在执行恢复动作前等多久,来 oscillation (晃荡),如果是 0.0 的话,意味着可以永久晃荡下去.sonictl at CSDN。
~oscillation_distance (double, default: 0.5)
  • How far in meters the robot must move to be considered not to be oscillating. Moving this far resets the timer counting up to the~oscillation_timeoutNew in navigation 1.3.1
    机器人跑多远才不被认为是在晃荡,超过这个值就会重设那个定时器,而定时器的timeout时间是由 ~oscillation_timeout 参数指定的。
~planner_frequency (double, default: 0.0)
  • The rate in Hz at which to run the global planning loop. If the frequency is set to 0.0, the global planner will only run when a new goal is received or the local planner reports that its path is blocked.New in navigation 1.6.0
    频率 - 就是全局规划器循环的频率Hz. 0.0 = 只有当收到一个新的goal时或收到local planner发的path is blocked报告时才进行一次全局规划。sonictl认为这个也很重要

【Component APIs】

The move_base node 包含的这些组件都有它们自己的ROS API, 也许因为这些组件的值而会不同,具体的Links就在下面列出供查询。
The move_base node contains components that have their own ROS APIs. These components may vary based on the values of the~base_global_planner,~base_local_planner, and~recovery_behaviors respectively. Links to the APIs for the default components can be found below:

Class Diagram (partially & not strictly drawn) is available here.


======== 以上就是我sonictl的读书笔记 ======







版权声明:sonictl原创文章,转载注明,否则读者享用不了后续服务,感谢!

相关文章推荐

ROS 教程之 navigation : 用 move_base 控制自己的机器人(1)

前言:     相信大家在用《ROS by example》学习ROS的过程中,基本上都是使用书本中的例程,在终端输入几行别人已经写好的代码,看看仿真效果。可是这样一来,笔者在跟着书本初略过了一遍后,...

ROS Navigation-----rotate_recovery机制简介

rotate_recovery机制简介

ROS探索总结(十六)——HRMRP机器人的设计

HRMRP(Hybrid Real-time Mobile Robot Platform,混合实时移动机器人平台)机器人是我在校期间和实验室的其他小伙伴一起从零开始设计并开发的一款机器人平台,其中大部...

ROS探索总结(十)——语音控制

如今语音识别在PC机和智能手机上炒的火热,ROS走在技术的最前沿当然也不会错过这么帅的技术。ROS中使用了CMU Sphinx和Festival开源项目中的代码,发布了独立的语音识别包,而且可以将识别...

ROS探索总结(十三)——导航与定位框架

导航与定位是机器人研究中的重要部分。         一般机器人在陌生的环境下需要使用激光传感器(或者深度传感器转换成激光数据),先进行地图建模,然后在根据建立的地图进行导航、定位。在ROS中也有很多...

博客迁移通知

为方便博客内容的管理,今后本人的博客内容会在个人网站——古月居(http://www.guyuehome.com)进行更新,CSDN博客不作主要维护,感谢大家的支持。由于网站方面的能力有限,个人网站可...

关于ROS学习的一些反思

距离发布上一篇ROS的博客已经过去两年了,才发现原来自己已经这么久可没有写过关于ROS的文章,想来很是惭愧。这两年时间,自己怀着程序员的梦想,研究过RTOS,探索过Linux,编写过Android应用...

ROS探索总结(一)——ROS简介

一、历史        随着机器人领域的快速发展和复杂化,代码的复用性和模块化的需求原来越强烈,而已有的开源机器人系统又不能很好的适应需求。2010年Willow Garage公司发布了开源机器人操...

ROS探索总结(十七)——构建完整的机器人应用系统

上一篇博客介绍了HRMRP机器人平台的设计,基于该平台,可以完成丰富的机器人应用,以较为典型的机器人导航为例,如何使用HRMRP来完成相应的功能?本篇博客将详细介绍如何将HRMRP应用到实际的应用当中...

ROS探索总结(二)——ROS总体框架

一、  总体结构        根据ROS系统代码的维护者和分布来标示,主要有两大部分:      (1)main:核心部分,主要由Willow Garage公司和一些开发者设计、提供以及维护。它...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)