-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wangzheng
committed
Oct 10, 2024
1 parent
e3a4069
commit c55fe21
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 基于搜索的路径规划 | ||
|
||
## 1. 图搜索基础 | ||
|
||
### 1.1 配置空间 | ||
|
||
一个n维空间,其中每一个点代表一个机器人的位姿 | ||
|
||
>在配置空间中规划 | ||
![在配置空间中规划](https://picgo-1257309505.cos.ap-guangzhou.myqcloud.com/20241010110244.png) | ||
|
||
### 1.2 图搜索 | ||
|
||
1. 构建graph | ||
- 栅格地图: 天然就是一个graph | ||
- PRM: 随机采样点,然后连接成图 | ||
|
||
2. 图搜索主循环 | ||
- 维护一个容器存储所有待访问的节点 | ||
- 容器初始节点为start | ||
- 循环 | ||
- pop | ||
- expansion | ||
- push | ||
- 结束循环 | ||
|
||
### 1.3 启发式搜索 | ||
|
||
存储节点,根据启发式函数排序 | ||
|
||
- 贪心搜索: $f(n) = h(n)$ | ||
- A*搜索: $f(n) = g(n) + h(n)$ | ||
- Dijkstra: $f(n) = g(n)$ | ||
|
||
启发式函数:$h(n)$ 估计从n到goal的代价 | ||
- 曼哈顿距离 | ||
- 欧几里得距离 | ||
- 切比雪夫距离 | ||
|
||
|
||
## 2. Dijkstra和A*算法 | ||
|
||
### 2.1 Dijkstra算法 | ||
|
||
$g(n)$: 从start到n的最少代价 | ||
|
||
![](https://picgo-1257309505.cos.ap-guangzhou.myqcloud.com/20241010112711.png) | ||
|
||
### 2.2 A*算法 | ||
|
||
![](https://picgo-1257309505.cos.ap-guangzhou.myqcloud.com/20241010113458.png) | ||
|
||
!!! note Admissible启发式函数:$h(n) \leq h^*(n)$ |