全覆盖规划算法学习笔记-------

ROS全覆盖规划算法

通过对比提供的ROS全覆盖规划算法:确定Boustrophedon Planner和Grid-based Local Energy Minimization Planner具备过程应用价值,这里选择后者进行重点研究。

参考:
官网 ipa_room_exploration - ROS Wiki

Indoor Coverage Path Planning: Survey, Implementation, Analysis

Grid-based Local Energy Minimization Planner源码学习与仿真。

算法说明与翻译:

// Function that plans a coverage path trough the given map, using the method proposed in
//
//	Bormann Richard, Joshua Hampp, and Martin Hägele. "New brooms sweep clean-an autonomous robotic cleaning assistant for
//	professional office cleaning." Robotics and Automation (ICRA), 2015 IEEE International Conference on. IEEE, 2015.
//
// This method discretizes the free space, that should be covered, into several nodes. Each of the node has to be covered, in order
// to cover the whole area. The path starts at the node that is closest to the given starting position and chooses the next node as
// the one that minimizes the energy functional, provided in the paper above. To do this here the following steps are done.
//	I.	The free area gets discretized into several nodes, using the given cell_size parameter, starting at the upper left white pixel of
//		the room. Whenever the overlaid grid then hits a white pixel, this point is added as a node. Then after all nodes have been found
//		the direct 8 neighbors for each node are found, which will be used later in the energy functional.
//	II.	After all nodes have been found, the coverage path is computed.
//			i.	The start node gets chosen as the one that is closest to the given starting position and is an edge of the given room, i.e
//				a node that has less than 4 neighbors.
//			ii.	The next node is then iteratively chosen from the directly neighboring ones, by finding the node that minimizes the given
//				energy functional and wasn't visited before.
//			iii.If in the neighborhood no accessible point could be found, search for the next node in the whole grid to continue the path.
//			iv.	This procedure is repeated, until all created nodes have been covered.
// III.	If wanted use the given vector from the robot middlepoint to the fov middlepoint to map the fov poses to the
//		robot footprint poses. To do so simply a vector transformation is applied. If the computed robot pose is not in the
//		free space, another accessible point is generated by finding it on the radius around the fov middlepoint s.t.
//		the distance to the last robot position is minimized. If this is not wanted one has to set the corresponding
//		Boolean to false (shows that the path planning should be done for the robot footprint).
//

使用Bormann-Richard、Joshua Hampp和Martin Hägele提出的方法,通过给定的地图规划覆盖路径的函数。“新型扫帚清扫专业办公室清洁的自动机器人清洁助手。”机器人与自动化(ICRA),2015年IEEE国际会议。IEEE,2015。
该方法将应该覆盖的自由空间离散为几个节点。为了覆盖整个区域,每个节点都必须被覆盖。路径从最接近给定起始位置的节点开始,并选择下一个节点作为使能量函数最小化的节点,如上文所述。为此,请执行以下步骤。
I.使用给定的cell_size参数,从房间的左上角白色像素开始,将空闲区域离散为几个节点。每当覆盖的网格碰到一个白色像素时,就会将该点添加为节点。然后,在找到所有节点后,找到每个节点的直接8个邻居,这将在稍后的能量函数中使用。
II、 在找到所有节点之后,计算覆盖路径。
i.起始节点被选择为最接近给定起始位置并且是给定房间的边缘的节点,即具有少于4个邻居的节点。
ii.然后通过找到使给定能量函数最小化并且以前没有访问过的节点,从直接相邻的节点中迭代地选择下一个节点。
iii.如果在邻域中找不到可访问点,则在整个网格中搜索下一个节点以继续该路径。
iv.重复此过程,直到所有创建的节点都被覆盖为止。
III、 如果需要,使用从机器人中点到中心凹中点的给定矢量将中心凹姿态映射到机器人足迹姿态。要做到这一点,只需应用矢量变换。如果计算的机器人姿势不在自由空间中,则通过在中心凹中点s.t周围的半径上找到另一个可访问点来生成另一个点。到最后一个机器人位置的距离最小化。如果不需要,则必须将相应的布尔值设置为false(表明应该为机器人足迹进行路径规划)。

环境搭建

源码

ROS全覆盖规划算法逻辑整理笔记

Grid-based Local Energy Minimization Planner

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ipa_coverage_planning 是一种覆盖算法,用于规划无人机的航线,以实现对一个区域的覆盖。下面对其代码进行详解。 首先,算法需要一个网格来表示待覆盖的区域。算法中定义了一个 Grid 类来表示网格,并在其构造函数中初始化了网格的大小和分辨率。网格中的每个单元格都用一个数字表示其状态,0 表示未覆盖的区域,1 表示已覆盖的区域。 算法的入口函数是 coverage_planning 函数。在这个函数中,首先创建一个无人机对象,通过传递网格和无人机的相关参数进行初始化。然后进入循环,直到整个区域被完覆盖为止。 循环中的每一步都遵循以下步骤: 1. 首先,从当前无人机位置开始,计算未覆盖区域中离无人机最近的点,作为下一个目标点。 2. 然后,使用某种路径规划算法(例如 A* 算法)计算从当前位置到目标点的最短路径。 3. 接下来,通过无人机以固定速度沿着路径移动到目标点,并在移动过程中更新每个单元格的覆盖状态。 4. 当无人机到达目标点后,它将停留一段时间,以达到完覆盖该点的效果。 5. 最后,重新计算下一个目标点,并重复以上步骤。 在算法的实现中,还需要考虑以下几个方面: 1. 无人机的速度和停留时间的设定,以确保完覆盖每个点的要求。 2. 路径规划算法的选择和实现,以确保无人机能够找到最短路径。 3. 网格的边界条件处理,防止无人机越界。 通过以上详细的代码解释,我们可以更好地理解并实现 ipa_coverage_planning 算法,以实现覆盖航线的规划

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值