You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/2d/path_planner/graph_search.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ goal = (45, 25)
8
8
Add the start and goal points to the map. This is to help the visualization of the start and goal points, and to clear obstacles at corresponding points to prevent planning failures.
9
9
10
10
```python
11
-
map_.type_map[start] =TYPES.START
12
-
map_.type_map[goal] =TYPES.GOAL
11
+
map_[start] =TYPES.START
12
+
map_[goal] =TYPES.GOAL
13
13
```
14
14
15
15
Create the path-planner and plan the path. Here, the A\* algorithm is taken as an example. The planning function returns the path in map frame along with detailed planning information, including whether it was successful, the length of the path, the cost of the path, expanded nodes, and so on.
@@ -55,18 +55,18 @@ from python_motion_planning.controller import *
Copy file name to clipboardExpand all lines: tutorials/2d/path_planner/sample_search.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,18 +41,18 @@ from python_motion_planning.controller import *
41
41
map_ = Grid(bounds=[[0, 51], [0, 31]])
42
42
43
43
map_.fill_boundary_with_obstacles()
44
-
map_.type_map[10:21, 15] =TYPES.OBSTACLE
45
-
map_.type_map[20, :15] =TYPES.OBSTACLE
46
-
map_.type_map[30, 15:] =TYPES.OBSTACLE
47
-
map_.type_map[40, :16] =TYPES.OBSTACLE
44
+
map_[10:21, 15] =TYPES.OBSTACLE
45
+
map_[20, :15] =TYPES.OBSTACLE
46
+
map_[30, 15:] =TYPES.OBSTACLE
47
+
map_[40, :16] =TYPES.OBSTACLE
48
48
49
49
map_.inflate_obstacles(radius=3)
50
50
51
51
start = (5, 5)
52
52
goal = (45, 25)
53
53
54
-
map_.type_map[start] =TYPES.START
55
-
map_.type_map[goal] =TYPES.GOAL
54
+
map_[start] =TYPES.START
55
+
map_[goal] =TYPES.GOAL
56
56
57
57
planner = RRT(map_=map_, start=start, goal=goal)
58
58
path, path_info = planner.plan()
@@ -84,10 +84,10 @@ Print results:
84
84
For asymptoticaly optimal sample search planners like **RRT\***, you can pass a callable function to argument `stop_func` to determine when to stop sampling. For example:
For the arguments of `stop_func`, `cur` means the **cur**rent step iteration, `fss` means the **f**irst **s**uccessful **s**tep to find the feasible path, and `mss` means the **m**aximum **s**ampling **s**tep number determined by `max_sample_step` argument. This lambda function means to stop sampling when the number of sampling steps reaches 10 times the number of steps successfully found a feasible path for the first time.
90
+
For the arguments of `stop_func`, `current_step` means the current step iteration, `first_success_step` means the first successful step to find the feasible path, and `max_step` means the maximum sampling step number determined by `max_sample_step` argument. This lambda function means to stop sampling when the number of sampling steps reaches 10 times the number of steps successfully found a feasible path for the first time.
Copy file name to clipboardExpand all lines: tutorials/3d/path_planner/graph_search.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ goal = (5, 25, 25)
7
7
8
8
Add the start and goal points to the map. This is to help the visualization of the start and goal points, and to clear obstacles at corresponding points to prevent planning failures.
9
9
```python
10
-
map_.type_map[start] =TYPES.START
11
-
map_.type_map[goal] =TYPES.GOAL
10
+
map_[start] =TYPES.START
11
+
map_[goal] =TYPES.GOAL
12
12
```
13
13
14
14
Create the path-planner and plan the path. Here, the A\* algorithm is taken as an example. The planning function returns the path in map frame along with detailed planning information, including whether it was successful, the length of the path, the cost of the path, expanded nodes, and so on.
@@ -54,14 +54,14 @@ from python_motion_planning.controller import *
0 commit comments