Commit Graph

163 Commits

Author SHA1 Message Date
Atsushi Sakai
af0442d358 build(deps): update cvxpy version from 1.5.3 to 1.6.5 in requirements (#1203)
* build(deps): update cvxpy version from 1.5.3 to 1.6.5 in requirements

* Add ECOS solver and improve solver handling for stability

Added ECOS to requirements and enhanced compatibility with cvxpy solvers by specifying 'order' for matrix reshaping. Updated solver configurations in rocket landing and pendulum control for consistency and reliability. Improved test behavior by enforcing stricter warning handling in pytest.
2025-05-01 13:08:29 +09:00
Jonathan Schwartz
aa61a6ea57 Safe Interval Path Planner (#1184)
* it works and is WAY faster than a*

* some bug fixes from testing different scenarios

* add some docs & address todos

* add sipp test

* spiff up comments

revert changes in speed-up

* explain what the removal is doing

* linting

* fix docs build

* docs formatting

* revert change to file (maybe linter did it?)

* point at gifs in gifs repo

* use raw githubusercontent gif links

* change formatting on planner results

* format output differently

* proper formatting final

* missing underline

* revert unintended change

* grammar + add descriptions for gifs

* missing ::

* add title to gifs section

* dont use sections for sub-sections

* constent a* spelling

* Update PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/test_safe_interval_path_planner.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/modules/5_path_planning/time_based_grid_search/time_based_grid_search_main.rst

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>

* Update PathPlanning/TimeBasedPathPlanning/SafeInterval.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* addressing comments

* revert np.full change

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
2025-03-17 22:01:07 +09:00
Jonathan Schwartz
1308e76424 Add expanded node set to SpaceTime AStar (#1183)
* speed up spacetime astar

* forgot to include hash impl on Position

* add condition to test on node expansions

* remove heuristic from Node __hash__ impl

* update rst with note about optimization
2025-03-13 23:24:53 +09:00
Aglargil
fc160179c0 feat: add behavior tree (#1177)
* feat: add behavior tree

* feat: add behavior tree test

* feat: add behavior tree doc

* feat: add behavior tree update
2025-03-08 19:26:23 +09:00
Aglargil
67a3ca7138 add state machine (#1172)
* add state machine

state_machine test

state_machine_update

* add state machine test/doc

* state machine update

* state machine generate_plantuml() can show diagram by using https://www.plantuml.com/plantuml/
2025-02-28 20:30:24 +09:00
Jonathan Schwartz
0c8ff11645 Space-Time AStar (#1170)
* wip - sketch out obstacles

* move to correct path

* better animation

* clean up

* use np to sample points

* implemented time-based A*

* cleaning up Grid + adding new obstacle arrangement

* added unit test

* formatting p1

* format STA* file

* remove newlines by docstrings

* linter

* working on typehints

* fix linter errors

* lint some more

* appease AppVeyor

* dataclasses are 🔥

* back to @total_ordering

* trailing whitespace

* add docs page on SpaceTimeA*

* docs lint

* remove trailing newlines in doc

* address comments

* Update docs/modules/5_path_planning/time_based_grid_search/time_based_grid_search_main.rst

---------

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
2025-02-25 20:53:36 +09:00
Atsushi Sakai
64779298ff refactor: rename files and update references for inverted pendulum an… (#1171)
* refactor: rename files and update references for inverted pendulum and path tracking modules

* refactor: rename inverted pendulum control files and update type check references

* refactor: update import statements to use consistent casing for InvertedPendulum module
2025-02-21 21:40:21 +09:00
Aglargil
f343573a7b Update move_to_pose for cases where alpha > pi/2 or alpha < -pi/2 (#1168)
* Update move_to_pose for cases where alpha > pi/2 or alpha < -pi/2

* Update move_to_pose

* Add move_to_pose test

* Update move_to_pose
2025-02-20 19:09:30 +09:00
Aglargil
c92aaf36d8 feat: add ElasticBands (#1156)
* feat: add ElasticBands

* feat: Elastic Bands update

* feat: ElasticBands update

* feat: ElasticBands add test

* feat: ElasticBands reduce occupation

* fix: ElasticBands test

* feat: ElasticBands remove tangential component

* feat: Elastic Bands update

* feat: Elastic Bands doc

* feat: Elastic Bands update

* feat: ElasticBands update
2025-02-17 19:47:04 +09:00
Aglargil
322fead45a feat: add DistanceMap (#1142)
* feat: add DistanceMap

* feat: add DistanceMap test

* feat: add DistanceMap doc

* feat: DistanceMap doc update

* feat: DistanceMap update
2025-02-05 21:56:13 +09:00
Aglargil
5a66105ff5 Extend frenet_optimal_trajectory to support more scenarios (#1114)
* feat: Add third derivative and curvature rate calculations to CubicSpline classes

* feat: Extend frenet_optimal_trajectory to support more scenarios

* fix: frenet optimal trajectory type check

* fix: cubic spline planner code style check

* fix: frenet optimal trajectory review

* feat: frenet_optimal_trajectory update doc

* fix: frenet optimal trajectory review

* fix: frenet optimal trajectory

* fix: frenet optimal trajectory
2025-01-22 18:57:12 +09:00
Surabhi Gupta
af456c70b0 Implement Catmull-Rom Spline with test and documentation (#1085) 2024-12-20 22:12:31 +09:00
Atsushi Sakai
1e101d1f8a improve LQT steering and speed control document (#1047)
* improve LQT steering and speed control

* improve LQT steering and speed control

* improve LQT steering and speed control doc

* improve LQT steering and speed control doc

* improve LQT steering and speed control doc

* improve LQT steering and speed control doc
2024-07-16 23:02:31 +09:00
Videh Patel
d7060f6028 Reopen: Added missing path types (#949)
* added missing RS path types

* modified assert condition in test3

* removed linting errors

* added sign check to avoid non RS paths

* Mathematical description of RS curves

* Undid debugging changes

* Added large step_size consideration

* renamed test3 to test_too_big_step_size

---------

Co-authored-by: Videh Patel <videh.patel@fluxauto.xyz>
2024-01-08 21:36:49 +09:00
Atsushi Sakai
0fc769421f Adding NDT mapping script and doc (#867)
* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc

* Adding ndt mapping script and doc
2023-07-06 23:12:43 +09:00
Atsushi Sakai
4d71470631 upgrade numpy to 1.25.0 and fix bugs (#861) 2023-07-01 15:30:32 +09:00
RyderCRD
80124f20e8 Fix the rewire() of rrt* path planning (#550) (#812)
* Update rrt_star_reeds_shepp.py to fix #550

Add step_size attribute to RRTStarReedsShepp, and a method set_random_seed() to set the random seed, with two test cases.

* Update rewire() of rrt_star.py

Update rewire() of rrt_star.py to fix #550.  Since the old version didn't assign path_yaw of edge_node to near_node, the old rewire() doesn't fit rrt_star_reeds_shepp.py

* Update reeds_shepp_path_planning.py

Limit the range of phi for the sake of planning speed, and simplify the the calculation process in straight_left_straight().

* Update reeds_shepp_path_planning.py

* Remove unnecessary cost calculation

Cost of edge_node is calculated in line 221, and self.node_list[i] is replaced to edge_node, so no need to update.

* Update reeds_shepp_path_planning.py
2023-04-27 23:04:39 +09:00
Atsushi Sakai
cb08c39a93 Add Normal vector estimation (#781)
* add normal vector calculation routine.

* add normal vector calculation routine.

* add normal vector estimation

* fix unittests in not matplotlib frontend

* fix lint ci

* add ransac based normal distribution estimation

* add normal_vector_estimation_main.rst

* normal_vector_estimation_main.rst を更新

* update normal_vector_estimation_main.rst

* update normal_vector_estimation_main.rst

* normal_vector_estimation_main.rst

* normal_vector_estimation_main.rst を更新

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst

* add normal_vector_estimation_main.rst
2023-03-11 17:54:18 +09:00
Atsushi Sakai
15a9190060 using ruff instead of flake8 (#787)
* using ruff instead of flake8

* using ruff instead of flake8

* using ruff instead of flake8
2023-01-30 21:33:49 +09:00
Atsushi Sakai
3dc96997da Adding point cloud sampling examples (#770) 2023-01-03 22:27:55 +09:00
Andrey Bozhko
2916273e62 Update loop conditions to be more idiomatic; fix missing imports (#768)
* missing import

* use while true
2023-01-01 20:44:34 +09:00
Atsushi Sakai
e40b4d9dec Enhance bspline code and doc clean up (#720)
* Start bspline code and doc cluean up

* code clean up

* code clean up

* code clean up

* code clean up

* improve doc

* improve doc

* improve doc

* improve doc

* improve doc

* improve doc

* improve doc

* improve doc

* improve codes.

* improve codes.

* improve codes.
2022-09-27 21:49:53 +09:00
Atsushi Sakai
76b0d04a3c using pathlib based local module import (#722)
* using pathlib based local module import

* remove unused import
2022-09-11 07:21:37 +09:00
jsbyysheng
f40b750cca fix bugs in check a position inside the polygon (#701)
* fix bugs in check a position inside the polygon

It is possible that the position `(iox, ioy)` to be checked with `iox == min_x`. This will cause a incorrect inside check.

* add a boundary condition for gridmap
2022-08-07 14:19:47 +09:00
Atsushi Sakai
31178c8e37 Enhance dubins path docs (#679)
* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs

* Enhance dubins path docs
2022-05-17 21:57:07 +09:00
jsbyysheng
a3fd04f68f fix error: 'numpy.ndarray' object has no attribute 'append' (#662)
* Update grid_map_lib.py

fix error: 'numpy.ndarray' object has no attribute 'append'

* Update test_grid_map_lib.py

* Update test_grid_map_lib.py

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
2022-05-07 18:15:01 +09:00
Atsushi Sakai
32b545fe7c Enhance dubins path docs (#664)
* Engance dubins path docs

* Update dubins_path.rst

* fix doc artifact link in CI

* wip

* wip

* wip

* Update dubins_path.rst

* wip

* wip

* wip

* wip

* wip
2022-05-07 13:19:30 +09:00
Chris Mower
b53fdf75f6 Add optional robot radius to RRT/RRTStar path planners (#655)
* Add optional robot radius to RRT/RRTStar path planners.
* update __init__ and check_collision to include radius
* during animation, if a robot radius is given then it is drawn

* Add test for robot radius

* Correct import error

* Correct missing robot_radius errors

* Address "expected 2 blank lines, found 1" error

* Address "line too long" errors

* Add missing argument description.

* Remove collision_check_with_xy and replace with check_collision

* Fix "missing whitespace after ','" error

* Update PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
2022-04-19 12:53:24 +09:00
Atsushi Sakai
38261ec67e clean up clothoidal_paths.py (#638)
* clean up clothoidal_paths.py

* add unit tests for clothoid_paths

* add unit tests for clothoid_paths

* add unit tests for clothoid_paths

* code clean up

* code clean up

* code clean up

* code clean up

* code clean up

* code clean up

* code clean up

* code clean up
2022-04-10 19:30:31 +09:00
Trung Kien
040e12dbcb Add inverted_pendulum_lqr_control (#635)
* Add inverted_pendulum_lqr_control

* reorganize document of inverted pendulum control module

* Refactor inverted_pendulum_lqr_control.py

* Add doccument for inverted pendulum control

* Corrected inverted pedulum LQR control doccument

* Refactor inverted pendulum control by mpc and lqr

* Add unit test for inverted_pendulum_lqr_control.py
2022-01-29 16:16:34 +09:00
Atsushi Sakai
058addd2ba add requirements dir (#630)
* add requirements dir

* add requirements dir

* add requirements dir
2022-01-22 22:18:22 +09:00
Atsushi Sakai
82d97cef94 add mypy unit test (#621)
* add mypy unit test

* add mypy unit test

* add mypy unit test
2022-01-09 00:01:29 +09:00
Atsushi Sakai
a13ef29dc4 enable MPC test (#620)
* enable_mpc_test

* enable_mpc_test

* enable_mpc_test

* enable_mpc_test

* enable_mpc_test

* enable_mpc_test

* enable_mpc_test

* enable_mpc_test
2022-01-08 17:06:29 +09:00
Trung Kien
c05a4fdada Fix ModuleNotFoundError when executing test in the tests folder and little improve MPC controller (#619)
* Fix ModuleNotFoundError when executing test in the tests folder

Signed-off-by: Trung Kien <letrungkien.k53.hut@gmail.com>

* Improve model_predictive_speed_and_steer_control

- Fix typo
- Using @ for matrix multiplication instead of * with have been deprecated in CVXPY1.1
- Fix missing conftest module in test file

Signed-off-by: Trung Kien <letrungkien.k53.hut@gmail.com>
2022-01-08 08:44:42 +09:00
Atsushi Sakai
0dfa274be3 add diff style check test (#617)
* add diff style check test

* add diff style check test

* add diff style check test

* add diff style check test

* add license

* add license
2022-01-06 20:26:24 +09:00
Atsushi Sakai
7034d5ff9e Add rng provide function for PRM planner (#607)
* Add rng provide function

* fix CI error

* remove unused import
2021-12-25 23:06:37 +09:00
Muhammad-Yazdian
680ecdafb2 Add a Robot class for Move to Pose Algorithm (#596)
* Added speed limitation of the robot

* Removed leading underscores for global vars

* Added unit test for robot speed limitation

* Modified x/abs(x) to np.sign(x); fixed code style

* Removed 'random' from test func header comment

* Added Robot class for move to pose

* Revert

* Added Robot class for move to pose

* Added a type annotation for Robot class

* Fixed the annotaion comment

* Moved instance varaible outside of the Robot class

* Fixed code style Python 3.9 CI

* Removed whitespaces from the last line

* Applied PR #596 change requests

* Fixed typos

* Update Control/move_to_pose/move_to_pose_robot_class.py

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>

* Moved PathFinderController class to move_to_pose

* Fixed issue #600

* Added update_command() to PathFinderController

* Removed trailing whitespaces

* Updated move to pose doc

* Added code and doc comments

* Updated unit test

* Removed trailing whitespaces

* Removed more trailing whitespaces

Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
2021-12-25 21:42:32 +09:00
Muhammad-Yazdian
bf4e68245f Add speed limitation of the robot (#595)
* Added speed limitation of the robot

* Removed leading underscores for global vars

* Added unit test for robot speed limitation

* Modified x/abs(x) to np.sign(x); fixed code style

* Removed 'random' from test func header comment
2021-12-12 21:32:59 +09:00
Atsushi Sakai
d183a00a1c Adding all gifs to the doc (#586)
* update docs

* update docs

* update docs

* update docs
2021-11-29 00:01:06 +09:00
Atsushi Sakai
c99716d692 Adding all gifs to the doc 2 (#585)
* update docs

* update docs

* update docs
2021-11-28 16:00:02 +09:00
Jonathan Schwartz
0df55e943e Dynamic Movement Primitives Implementation (#526)
* Without equals sign, sometimes get points that are in the wrong direction - relative to the points before and after it- when change in x or change in y along path is 0

* Created test script for dubins path generator

* Made len == 0 it's own case, also changed 'l' to 'len' to appease travisCI

* More variable renaming to appease CI

* Broke == 0 into its own case in dubins planner, also Renaming files to appease CI

* Reverting some naming changes

* Turns out theres already a test for dubins.. not sure how I missed that

* Note to self: run the test cases on your own before throwing them at CI

* Added handling of length=0 case in generate_local_course()

* Missed reverting 'mode' back to 'm' in one spot

* Addressing style issues (line length)

* Mostly works, now just need to setup linear regression to solve for weights

* Re-arranged class

* Wrote DMP program and added tests file

* Styling fixes

* More styling

* Missed one indent

* Multi-dimension path learning (e.g. in x and y instead of just x)

* Added potential field obstacle avoidance

* Potential field working much better but has issues with reaching goal state

* Path ending to short not a result of obstacles, should be fix-able

* Mostly working! end won't go to goal

* split DMP and path following

* pretty close

* Okay this is working pretty well

* looks.. okay. was using the wrong vector before

* a plan to fix this mess

* Okay seriously going to pivot to the dubins approach im done with potential field lol

* Finished obstacle circle handling (and merging circles that are closer than their radii)

* Finished circle event finder function

* Some progress in preparing for dubins curves

* Finished angle finding algo, need to test

* Okay getting back to this, going to ignore the navigation and just focus on path generation since that's what DMP is for

* Moved DMP files to path planning

* changed folder name

* Made demo path cooler

* All working and added visualization tools (will remove

* Fixed unit test and handled TODOs

* not gonna handle this one

* demo now scales with data

* CI errors

* CI errors

* Fixing code style issues

* more styling

* fixing CI errors

* formatting

* Removed dead code

* removed unused imports

* removed uneccesary initialization

* Applying PR feedback

* fixing CI errors

* added description to header and removed unused variable
2021-11-12 19:28:16 +09:00
Atsushi Sakai
2c3896879b Fix reeds shepp path issue (#529)
* code clean up

* code clean up

* code clean up

* code clean up

* fix length handling issues
2021-07-17 18:28:26 +09:00
Atsushi Sakai
6f06b535b9 fix dubins path length bug and clean up codes. (#527)
* fix dubins path length bug and clean up codes.

* fix line length CI error

* fix line length CI error

* fix line length CI error

* fix line length CI error

* fix line length CI error

* fix line length CI error

* fix line length CI error

* fix line length CI error
2021-07-10 07:15:10 +09:00
vss2sn
2ac1d9c815 Add D* Lite. (#511)
* Add D* Lite.

* Add test. Minor changes

* Modified based on LGTM report

* Fix linter errors

* Fixes and lint.

* Update README.md
Made requested changes
Add transform between world and grid coordinates to allow negative wold coordinates
Modify to allow diagonal motion

* Added display of previous and new computed path
2021-06-07 20:28:23 +09:00
nirnayroy
2cf4f6f001 Added D* Search to path planning folder (#490)
* changes

* updated docs and readme

* Update a_star.py

* Update a_star.py

* Create test_dstar.py

* trailing loc

* Update dstar.py

* Update dstar.py

* Update dstar.py

* Update dstar.py

* Update dstar.py

* newline

* corrected changes requested

* 13, five, 21

* corrected changes

* latest

* linted

* lint

* removed diff
2021-05-15 15:01:29 +09:00
Shamil
bf2d9df83d Add ICP support for 3d point clouds (#465)
* Add 3d support ICP

* icp_matching function returns R,T corresponding to 2D or 3D set of points
* update_homogeneuous_matrix - general operations for translation and rotation matrixes

* Add test for 3d point cloud (with 2d visualization)

* Separate test for 3d points to main_3d_points

* Add test for ICP 3d

* Correct style

* Add space

* Style correction

* Add more spaces

* Add 3d visualizing for ICP

* Style corrections

* Delete spaces

* Style correction

* remove space

* Separate plot drawing

* plot drawing in a separate function for both 2D and 3D versions
* figure creating before while loop

* Style correction

* Comment 3d plot drawing

Co-authored-by: Shamil GEMUEV <https://github.maf-roda.com/>
2021-04-02 20:49:16 +09:00
FXCarl
c025299dcf Update greedy_best_first_search - calc_final_path method (#477)
* Update greedy_best_first_search.py

parent_index should be pind. other wise it cann't work

* add breadth first search test

* Add greedy best first search test
2021-02-21 15:23:13 +09:00
Atsushi Sakai
98f9b22465 add main script for missing tests (#461)
* add main script for missing tests

* Fix CodeQL warning
2021-01-16 16:07:28 +09:00
Atsushi Sakai
2731cdba00 Use pytest_xdist for unit-test speed up in CI (#459)
* Remove unnecessary plot

* Remove unnecessary plot

* update appveyor.yml
2021-01-16 14:28:24 +09:00
Atsushi Sakai
67d7d5c610 Test code clean up (#456)
* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up

* Test code clean up
2021-01-12 22:13:46 +09:00