diff --git a/.github/workflows/test-and-publish-release.yml b/.github/workflows/test-and-publish-release.yml index 22ccdf3..f1db878 100644 --- a/.github/workflows/test-and-publish-release.yml +++ b/.github/workflows/test-and-publish-release.yml @@ -47,6 +47,7 @@ jobs: run: | pip install sphinx sphinx_rtd_theme recommonmark sphinx-autodoc-typehints sphinx-copybutton sphinx-prompt sphinx-notfound-page sphinx-autodoc-annotation sphinx-build -b html docs/ ./public + cp -r docs/additional_resources/* ./public/ - name: Deploy docs uses: peaceiris/actions-gh-pages@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index fcac261..08a3c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.6.0 -- Theta* algorithm added +- Theta\* algorithm added - Line of sight algorithm added - Minor improvements in code quality diff --git a/Makefile b/Makefile index e37aa77..50cc6b5 100644 --- a/Makefile +++ b/Makefile @@ -2,3 +2,4 @@ docs-html: sphinx-apidoc -M -o docs/ pathfinding3d/ sphinx-build -b html docs docs/_build + cp -r docs/additional_resources/* docs/_build/ \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 60d0c86..29dd5f0 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.6.0 -- Theta* algorithm added +- Theta\* algorithm added - Line of sight algorithm added - Minor improvements in code quality diff --git a/docs/USAGE.md b/docs/USAGE.md index b22cde3..8589d4f 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -250,7 +250,7 @@ Sometimes it is helpful to visualize the path to better understand the algorithm matrix = np.load("sample_map.npy") ``` - `sample_map.npy` is a numpy array of shape (42, 42, 42), where each element indicates an obstacle or free space. This file can be downloaded from the provided [GitHub link](https://github.com/harisankar95/pathfinding3D/blob/main/examples/sample_map.npy). + `sample_map.npy` is a numpy array of shape (42, 42, 42), where each element indicates an obstacle or free space. This file can be downloaded from the provided [Github link](https://github.com/harisankar95/pathfinding3D/blob/main/examples/sample_map.npy). 3. Create the Grid and define the start and end nodes: @@ -348,13 +348,13 @@ Sometimes it is helpful to visualize the path to better understand the algorithm - The output should look like this: - ![voxel_grid](https://github.com/harisankar95/pathfinding3D/blob/main/examples/resources/open3d.png) + ![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) --- -### Example with any angle of movement +## 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. @@ -568,14 +568,25 @@ Let's cut to the chase and see how it works: scene_camera=camera, ) - # Save the figure as a html file - fig.write_html("theta_star.html") # Show the figure in a new tab fig.show() ``` This will open a new tab in your browser with the following visualization: - + + You can rotate the figure by clicking and dragging the mouse. You can also zoom in and out using the mouse wheel. diff --git a/docs/additional_resources/theta_star.html b/docs/additional_resources/theta_star.html new file mode 100644 index 0000000..31703bd --- /dev/null +++ b/docs/additional_resources/theta_star.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/docs/theta_star.html b/docs/theta_star.html deleted file mode 100644 index 908e431..0000000 --- a/docs/theta_star.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -
-
- - \ No newline at end of file diff --git a/examples/04_theta_star.py b/examples/04_theta_star.py index 92956ca..a679612 100644 --- a/examples/04_theta_star.py +++ b/examples/04_theta_star.py @@ -158,6 +158,6 @@ def calculate_path_cost(path): ) # Save the figure as a html file -fig.write_html("theta_star.html") +# fig.write_html("theta_star.html", full_html=False, include_plotlyjs="cdn") # Show the figure in a new tab fig.show()