Skip to content

Commit

Permalink
version bumped, docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
harisankar95 committed Jan 28, 2024
1 parent 306e010 commit b025462
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.6.1

- Fixed a bug in the `ThetaStarFinder` algorithm when used with `World` (connected grid), see issue [#12](https://github.com/harisankar95/pathfinding3D/issues/12)

## 0.6.0

- Theta\* algorithm added
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Version History

## 0.6.1

- Fixed a bug in the `ThetaStarFinder` algorithm when used with `World` (connected grid), see issue [#12](https://github.com/harisankar95/pathfinding3D/issues/12)

## 0.6.0

- Theta\* algorithm added
Expand Down
16 changes: 11 additions & 5 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,13 @@ Sometimes it is helpful to visualize the path to better understand the algorithm

![voxel_grid](https://raw.githubusercontent.com/harisankar95/pathfinding3D/main/examples/resources/open3d.png)

The full code is available [here](https://github.com/harisankar95/pathfinding3D/blob/main/examples/03_view_map.py)
The full code is available here: [03_view_map](https://github.com/harisankar95/pathfinding3D/blob/main/examples/03_view_map.py)

---

## Example with any angle of movement

Often, it is desirable to allow movement in any direction rather than being restricted to the 26 directions in a 3D grid. This can be achieved by using the `ThetaStarFinder` class. The `ThetaStarFinder` class is a subclass of the `AStarFinder` class and can be used in the same way.
Often, it is desirable to allow movement in any direction rather than being restricted to the 26 discrete directions in a 3D grid. This can be achieved by using the `ThetaStarFinder` class. The `ThetaStarFinder` class is a subclass of the `AStarFinder` class and can be used in the same way.

Let's cut to the chase and see how it works:

Expand Down Expand Up @@ -411,7 +411,7 @@ Let's cut to the chase and see how it works:
path: [(0, 0, 0), (9, 8, 8), (9, 9, 9)]
```

You will notice that the path does not have all the waypoints as other algorithms. This is because the `ThetaStarFinder` algorithm will smooth the path by checking whether there is a direct path between two waypoints. If there is a direct path, the intermediate waypoints are removed. This is useful for applications where the path needs to be traversed by a vehicle. The vehicle can move in any direction and does not need to follow a grid. The path can be smoothed to reduce the number of waypoints to be traversed.
You will notice that the path does not have all the waypoints as other algorithms. This is because the `ThetaStarFinder` algorithm will smooth the path by checking whether there is a direct path between two waypoints (**Line of Sight**). If there is a direct path, the intermediate waypoints are removed. This is useful for applications where the path needs to be traversed by a vehicle. The vehicle can move in any direction and does not need to follow a grid. The path can be smoothed to reduce the number of waypoints to be traversed.

5. For a quantitative analysis let's compare the number of waypoints in the path for the `AStarFinder` and `ThetaStarFinder` algorithms:

Expand Down Expand Up @@ -464,7 +464,7 @@ Let's cut to the chase and see how it works:
AStarFinder path cost: 16.27062002292411
```

As you can see, the `ThetaStarFinder` algorithm has a lower cost than the `AStarFinder` algorithm. Thus the `ThetaStarFinder` algorithm can be more efficient for certain applications.
As you can see, the `ThetaStarFinder` algorithm has a lower cost than the `AStarFinder` algorithm. Thus the `ThetaStarFinder` algorithm can be more efficient for applications with any angle of movement.

7. We can visualize the paths using `plotly` this time:

Expand Down Expand Up @@ -541,20 +541,26 @@ Let's cut to the chase and see how it works:
gridcolor="lightgrey",
showbackground=True,
zerolinecolor="white",
range=[0, 10],
dtick=1,
),
yaxis=dict(
title="y - axis",
backgroundcolor="white",
gridcolor="lightgrey",
showbackground=True,
zerolinecolor="white",
range=[0, 10],
dtick=1,
),
zaxis=dict(
title="z - axis",
backgroundcolor="white",
gridcolor="lightgrey",
showbackground=True,
zerolinecolor="white",
range=[0, 10],
dtick=1,
),
),
legend=dict(
Expand Down Expand Up @@ -590,4 +596,4 @@ Let's cut to the chase and see how it works:

You can rotate the figure by clicking and dragging the mouse. You can also zoom in and out using the mouse wheel.

The full code is available [here](https://github.com/harisankar95/pathfinding3D/blob/main/examples/04_theta_star.py)
The full code is available here: [04_theta_star](https://github.com/harisankar95/pathfinding3D/blob/main/examples/04_theta_star.py).
Loading

0 comments on commit b025462

Please sign in to comment.