7.2 Levels of Motion Control(运动控制级别)

可以在多个级别上控制移动机器人,这些级别中的绝大多数,ROS已经提供了相应的方法。 这些级别代表不同程度的抽象,从对电动机的直接控制开始,一直进行到路径规划和SLAM(同时定位和映射)。
Controlling a mobile robot can be done at a number of levels and ROS provides methods for most of them. These levels represent different degrees of abstraction, beginning with direct control of the motors and proceeding upward to path planning and SLAM (Simultaneous Localization and Mapping).

7.2.1 Motors, Wheels, and Encoders (电动机、车轮和编码器)

大多数运行ROS的差动驱动机器人都在驱动马达或车轮上使用编码器。相应的车轮每转一圈编码器就会记录一定数量的刻度(通常是几百个甚至数千个)。如果知道了车轮的直径及车轮之间的距离,那么编码器刻度可以转换为以米为单位的行进距离或以弧度为单位的旋转角度。 为了计算速度,只需将这些值除以两次测量之间的时间间隔即可。
Most differential drive robots running ROS use encoders on the drive motors or wheels. An encoder registers a certain number of ticks (usually hundreds or even thousands) per revolution of the corresponding wheel. Knowing the diameter of the wheels and the distance between them, encoder ticks can be converted to the distance traveled in meters or the angle rotated in radians. To compute speed, these values are simply divided by the time interval between measurements.

这种内部运动数据统称为里程计,在以后的日子里,我们将会看到,ROS会频繁的使用它。 如果您的机器人具有准确可靠的编码器,并且可以使用其他来源来增加车轮数据,那么它将大有帮助。 例如,因为iRobot Create的编码器在旋转过程中明显不准确,所以原始的TurtleBot使用单轴陀螺仪来提供机器人旋转运动的额外测量,
This internal motion data is collectively known as odometry and ROS makes heavy use of it as we shall see. It helps if your robot has accurate and reliable encoders but wheel data can be augmented using other sources. For example, the original TurtleBot uses a single-axis gyro to provide an additional measure of the robot’s rotational motion since the iRobot Create’s encoders are notably inaccurate during rotations.

重要的是要记住,无论使用了多少里程表数据源,世界上机器人的实际位置和速度都可能(可能会)与里程表报告的值不同。 差异程度将取决于环境条件和里程表来源的可靠性。
It is important to keep in mind that no matter how many sources of odometry data are used, the actual position and speed of the robot in the world can (and probably will) differ from the values reported by the odometry. The degree of discrepancy will vary depending on the environmental conditions and the reliability of the odometry sources.

7.2.2 Motor Controllers and Drivers (电机控制器和驱动器)

在最低运动控制级别,我们需要一个用于机器人电机控制器的驱动程序,该驱动程序可以使驱动轮按照期待的速度旋转,通常使用内部单位,例如每秒的编码器刻度或最大速度的百分比。 除了Willow Garage PR2和TurtleBot之外,核心ROS软件包不包括用于特定电机控制器的驱动程序。 但是,许多第三方ROS开发人员已经发布了一些更流行的控制器和/或机器人的驱动程序,例如Arduino,ArbotiX,Serializer,Element,LEGO®NXT和Rovio。 ( 如果想要获取更完整的支持列表,参阅Robots Using ROS. )
At the lowest level of motion control we need a driver for the robot’s motor controller that can turn the drive wheels at a desired speed, usually using internal units such as encoder ticks per second or a percentage of max speed. With the exception of the Willow Garage PR2 and TurtleBot, the core ROS packages do not include drivers for specific motor controllers. However, a number of third-party ROS developers have published drivers for some of the more popular controllers and/or robots such as the Arduino, ArbotiX, Serializer, Element, LEGO® NXT and Rovio. (For a more complete
list of supported platforms, see Robots Using ROS.)

7.2.3 The ROS Base Controller (ROS基本控制器)

在下一个抽象级别,以实际单位(例如米和弧度/秒)指定机器人的期望速度。 采用某种形式的PID控制也是很常见的。 PID代表“比例积分微分”,之所以这样命名,是因为PID控制算法校正车轮速度不仅根据实际速度和所需速度之间的差异(比例)误差,而且还根据随时间的微分和积分。 您可以在Wikipedia上了解有关PID控制的更多信息。 出于我们的目的,我们只需要知道控制器将尽力按照我们要求的方式移动机器人。
At the next level of abstraction, the desired speed of the robot is specified in real-world units such as meters and radians per second. It is also common to employ some form of PID control. PID stands for “Proportional Integral Derivative” and is so-named because the control algorithm corrects the wheel velocities based not only on the difference (proportional) error between the actual and desired velocity, but also on the derivative and integral over time. You can learn more about PID control on Wikipedia. For our purposes, we simply need to know that the controller will do its best to move the robot in the way we have requested.

驱动程序和PID控制器通常组合在一个称为基本控制器的单个ROS节点内。 基本控制器必须直接在连接到电机控制器的计算机上运行,并且通常是启动机器人时启动的第一个节点之一。 Gazebo中还可以模拟许多基本控制器,包括TurtleBot,PR2和Erratic。
The driver and PID controller are usually combined inside a single ROS node called the base controller. The base controller must always run on a computer attached directly to the motor controller and is typically one of the first nodes launched when bringing up the robot. A number of base controllers can also be simulated in Gazebo including the TurtleBot, PR2 and Erratic.

基本控制器节点通常在 /odom 话题上发布里程计数据,并在 /cmd_vel 话题上监听运动命令。 同时,控制器节点通常(但并非总是)发布从 /odom 框架到基本框架(/ base_link或/ base_footprint)的转换。 我们之所以说“不总是”,是因为某些机器人(例如TurtleBot)使用robot_pose_ekf程序包来组合车轮里程表和陀螺仪数据,以获得对机器人位置和方向的更准确估算。 在这种情况下,是robot_pose_ekf节点发布了从/ odom到/ base_footprint的转换。 (robot_pose_ekf软件包实现了扩展卡尔曼过滤器,您可以在上面链接到的Wiki页面上了解到。)
The base controller node typically publishes odometry data on the /odom topic and listens for motion commands on the /cmd_vel topic. At the same time, the controller node typically (but not always) publishes a transform from the /odom frame to the base frame—either /base_link or /base_footprint . We say “not always” because some robots like the TurtleBot, uses the robot_pose_ekf package to combine wheel odometry and gyro data to get a more accurate estimate of the robot’s position and orientation. In this case, it is the robot_pose_ekf node that publishes the transform from /odom to /base_footprint . (The robot_pose_ekf package implements an Extended Kalman Filter as you can read about on the Wiki page linked to above.)

一旦我们的机器人有了基本控制器,ROS便提供了我们需要的工具,这些工具可以从命令行或其他基于更高级别计划的ROS节点来发布运动命令。 在此级别上,基本控制器与硬件之间的关系就消失了:我们的编程可以完全专注于使用现实世界的单位来设定期望的线速度和角速度,并且我们编写的任何代码都可以在具有ROS接口的任何基本控制器上工作 。
Once we have a base controller for our robot, ROS provides the tools we need to issue motion commands either from the command line or by using other ROS nodes to publish these commands based on a higher level plan. At this level, it does not matter what hardware we are using for our base controller: our programming can focus purely on the desired linear and angular velocities in real-world units and any code we write should work on any base controller with a ROS interface.

7.2.4 Frame-Base Motion using the move_base ROS Package (使用move_base ROS软件包进行基于帧的运动)

在下一个抽象层次上,ROS提供了move_base程序包,该程序包使我们可以指定机器人相对于某个参考系的目标位置和方向。 然后move_base将尝试将机器人移至目标,同时避开障碍物。 move_base软件包是一个非常复杂的路径规划器,在为机器人选择要遵循的路径时,将里程计数据与本地和全局花费图结合在一起。 它还根据我们在配置文件中设置的最小值和最大值自动控制线速度和角速度以及加速度。
At the next level of abstraction, ROS provides the move_base package that allows us to specify a target position and orientation of the robot with respect to some frame of reference; move_base will then attempt to move the robot to the goal while avoiding obstacles. The move_base package is a very sophisticated path planner and combines odometry data with both local and global cost maps when selecting a path for the robot to follow. It also controls the linear and angular velocities and accelerations automatically based on the minimum and maximum values we set in the configuration files.

7.2.5 SLAM using the gmapping and amcl ROS Packages (使用gmapping和amcl ROS软件包的SLAM)

在更高的层次上,ROS使我们的机器人可以使用SLAM gmapping软件包创建其环境的地图。 使用激光扫描仪可以最好地完成映射过程,但也可以使用Kinect或Asus Xtion深度相机完成模拟激光扫描。 如果您拥有TurtleBot,则TurtleBot 的meta-package包含执行SLAM所需的所有工具。
At an even higher level, ROS enables our robot to create a map of its environment using the SLAM gmapping package. The mapping process works best using a laser scanner but can also be done using a Kinect or Asus Xtion depth camera to provide a simulated laser scan. If you own a TurtleBot, the TurtleBot meta-package includes all the tools you need to do SLAM.

一旦获得了环境图,ROS就会提供amcl软件包(自适应蒙特卡洛定位),用于根据机器人的当前扫描和里程计数据自动定位机器人。 这使操作员可以指向并单击地图上的任何位置,而机器人将在避免障碍的同时找到自己的出路。 (要获得关于SLAM的数学基础的出色介绍,请查看Sebastian Thrun关于Udacity的在线人工智能课程。)
Once a map of the environment is available, ROS provides the amcl package (adaptive Monte Carlo localization) for automatically localizing the robot based on its current scan and odometry data. This allows the operator to point and click on any location on a map and the robot will find its way there while avoiding obstacles. (For a superb introduction to the mathematics underlying SLAM, check out Sebastian Thrun’s online Artificial Intelligence course on Udacity.)

7.2.6 Semantic Goals (语义目标)

最后,在最高抽象层次上,在语义上指定运动目标,例如“去厨房为我带来啤酒”,或者简单地为“为我带来啤酒”。 在这种情况下,必须分析语义目标并将其转换为一系列动作。 对于需要机器人移动到特定位置的动作,可以将每个位置传递到本地化和路径规划级别以进行实施。 尽管超出了本卷的范围,但还有许多ROS软件包可用于完成此任务,包括smach,behavior trees,executive_teer 和 Knowrob。 (smach 和 behavior trees都在ROS By Example系列的第2卷中进行了介绍。)
Finally, at the highest level of abstraction, motion goals are specified semantically such as “go to the kitchen and bring me a beer”, or simply, “bring me a beer”. In this case, the semantic goal must be parsed and translated into a series of actions. For actions requiring the robot to move to a particular location, each location can be passed to the localization and path planning levels for implementation. While beyond the scope of this volume, a number of ROS packages are available to help with this task including smach , behavior trees , executive_teer , and knowrob . (Both smach and behavior trees are covered in Volume 2 of the ROS By Example series.)

7.2.7 Summary (总结)

总而言之,我们的运动控制层次结构如下所示:
In summary, our motion control hierarchy looks something like this:

在本章和下一章中,我们将学习如何使用这些级别的运动控制。 但是,在我们了解move_base,gmapping和amcl提供的更强大的功能之前,我们需要从基础开始。
In this chapter and the next, we will learn how to use these levels of motion control. But before we can understand the more powerful features provided by move_base , gmapping and amcl , we need to start with the basics.

【 rbx1翻译 第七章、控制移动基座】第二节、运动控制级别相关推荐

  1. 【 rbx1翻译 第七章、控制移动基座】第三节、用ROS扭转

    7.3 Twisting and Turning with ROS (用ROS扭转) ROS使用"Twist"消息类型(请参见下面的详细信息)来发布要由基本控制器使用的运动命令. ...

  2. 【 rbx1翻译 第七章、控制移动基座】第九节、使用里程计走正方形

    7.9 Navigating a Square using Odometry (使用里程计走正方形) 就像我们使用基于里程表的往返脚本一样,我们将使用 /odom和 /base_link(或 /bas ...

  3. 【 rbx1翻译 第七章、控制移动基座】第八节、使用里程计进行往返运动

    7.8 Out and Back Using Odometry (使用里程计进行往返运动) 现在,我们了解了里程表信息是如何在ROS中表示的,我们可以更精确地在往返过程中移动机器人. 下一个脚本将监视 ...

  4. Vulkan编程指南翻译 第七章 图形管线 第2节 Renderpasses(未完成)

    7.2  renderpass Vulkan图形管线和计算管线的区别之一是,你使用图形管线来渲染出像素,组成图像以供处理或显示给用户.在复杂的图形应用程序中,图片经过很多遍构建,每一遍都生成场景的一部 ...

  5. 《java学习之路》第一章:初识java第二节:helloworld

    嗨大家好,我是埪动白,前一段时间由于一些原因,java学习之路停更了,我向大家道歉.今天我们来学习下一节 第一章:初识java 第二节:hello world 如果哪位同学没有看第一节,建议先看一下, ...

  6. 第六章—身份认证、第七章—控制访问

    第六章 身份认证 身份认证概述:证实主体的真实身份与其所声称的身份是否相符的过程,是用户对资源访问的第一道关卡,是访问控制和审计的前提. 身份认证 (1)认证系统组成:认证服务器.认证系统用户端软件. ...

  7. Gradle2.0用户指南翻译——第七章. Java 快速入门

    翻译项目请关注Github上的地址: https://github.com/msdx/gradledoc 本文翻译所在分支: https://github.com/msdx/gradledoc/tre ...

  8. Kotlin学习笔记 第二章 类与对象 第二节属性

    参考链接 Kotlin官方文档 https://kotlinlang.org/docs/home.html 中文网站 https://www.kotlincn.net/docs/reference/p ...

  9. 信息技术选购计算机教案,信息技术七年级西交大版 第二节 选择图像教案.docx...

    学习必备欢迎下载 第二节?选择图像 [教学目标]: 1.知识与技能 (1)了解创建选区的方法. (2)掌握选择工具的使用方法. 2.过程与方法 (1)引导学生自主探究,了解创建选区的方法. (2)以任 ...

最新文章

  1. 动态规划(DP)通俗讲解
  2. 人工智能vs人类智能小传
  3. 通过KNN算法,确定球星的风格(很水)
  4. 十二省联考题解 - JLOI2019 题解
  5. 【LeetCode笔记】64. 最小路径和(Java、动态规划)
  6. C语言 指针声明和定义 - C语言零基础入门教程
  7. scrapy获取a标签的连接_Python爬虫 scrapy框架初探及实战!
  8. 白鹭本地数据存储操作代码实例
  9. 面试官:说一下JVM常用垃圾回收器的特点、优劣势、使用场景和参数设置
  10. AOP 拦截器 JDK动态代理机制 struts2 mybatis spring-aop
  11. SVN服务更换小记(由subversion更换为VisualSVN)
  12. 导航上显示某个地点已关闭什么意思_大众MIB(275)教程之导航使用
  13. 使用Bochs模拟器和IDA调试MBR
  14. JAVA购物商城系统毕业设计 开题报告
  15. 闵行区电动自行车上牌地址
  16. BZOJ2791 Rendezvous
  17. 5G学习之路——认识基站、扇区、小区
  18. S型加减速程序,C++,PLC,AGV
  19. 4计算机硬件由,计算机硬件系统由(4)大部分组成,其中存储器是硬件系统中的记忆设备,(5)。A.运算器、控制器、存储器、...
  20. 电子膨胀阀的原理、使用和特点,及其与热力膨胀阀的性能比较

热门文章

  1. java中base64编码加密和android中base64编码加密不一样?base64编码解析错误?
  2. adcclk最大_DSP28335 ADC程序 中文说明 -
  3. Squitd代理服务器安装
  4. python 战舰_419. 甲板上的战舰(Python)
  5. 刚刚!华为突然传来这一消息,我想辞职回家养猪了!
  6. python opencv gpu加速_让Python下的OpenCV也能GPU加速!part.1
  7. 学python之leetcode1863题 python3转python2
  8. [ linux ] vim 编辑器的三种模式介绍
  9. 腾讯云神笔低代码平台的申请没通过,只能等公测了
  10. 华为p8刷linux系统,普通安卓手机如何刷鸿蒙系统?