-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/fastpathplanning #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
0ee5652
the dwa is cooked
Jawad12256 bc68db2
Merge branch 'main' into dwa-new
wowthecoder 322a8ed
Fast Path PLanning
417e097
fixing
6931968
cleaning up
0f4327b
Merge branch 'main' into dwa-new
wowthecoder ad2bd95
test: write simple straight line test
wowthecoder 855fb39
test: uncomment straight line test with obstacles
wowthecoder 7be09fa
test: moving robots obstacle course, also added separate motion contr…
wowthecoder c2a697a
test: implement unit test of 12 robots dashing straight at each other
wowthecoder c75f02a
test: implement test with 6 robots moving randomly in a half court
wowthecoder 52c55a5
fixing a bug
7637f5c
increased safety
valentinbruehl 37eeb8e
revert dwa config and planner
wowthecoder d0b3a6d
rename test file
wowthecoder 7a47ec2
Merge branch 'main' into motion-planning-tests
wowthecoder 388c433
fixing slowing down at sugoals + linting
valentinbruehl b0a337f
recursion error fix
valentinbruehl 459052e
fix: index out of order bug
valentinbruehl d1b45b9
updates to fastpathplanning
495c617
updates
c9efe28
updating
71e0ceb
to add new tests
77baab1
To test new cases
ee0784b
adding test
0432c4d
random movement test succeeds with fpp (5 robots)
valentinbruehl e1138f2
diagonal robot movement test pass with fpp
valentinbruehl a38b2c7
make number of robots in random_movement_test adjustable
valentinbruehl 9ae1421
use fpp in all tests
valentinbruehl 3912c34
reduce to 3 robots in random_movement_test
valentinbruehl 02329eb
compute distance between two line segments
valentinbruehl bea2948
g
826285f
Lined Based obstacles and Config Files Updates
1311537
Merge branch 'main' into feature/fastpathplanning
valentinbruehl 101110e
fixed issues concerning new functions in math_utils
valentinbruehl e4c7eaf
updating
286544e
Removing extra libraries
8d8041e
Update utama_core/motion_planning/src/fastpathplanning/planner.py
Vortex4627 ec19004
Adding snake eye convention and removing unwanted code
ef8bad9
Removed target from collide function
95785ff
Updating checksegment function
fb7d793
Including Joel's suggestions
9121ef7
snake_case and parameter error fix
valentinbruehl ba83a96
Update utama_core/motion_planning/src/controllers/fastpathplanning.py
Vortex4627 1da5084
Fix/goalkeeping (#92)
maimaicircle 4ce37fa
chore(release): bump version to v1.5.20
utama-release-manager[bot] 95a3176
Real/extend kick transmission (#93)
energy-in-joles bde48e7
chore(release): bump version to v1.5.21
utama-release-manager[bot] e2551f4
Add DeepWiki badge to README
fred-huang122 ca24507
Feature/rsim noise (#89)
szeyoong-low cf8cd3b
chore(release): bump version to v1.6.0
utama-release-manager[bot] 7c9a91b
Fix/defence parameter (#103)
NingchuanIC 0431a0c
Feature/kalman (#101)
szeyoong-low 7a84ae8
chore(release): bump version to v1.7.0
utama-release-manager[bot] d789692
FIR filters (#81)
szeyoong-low 1225fee
chore(release): bump version to v1.8.0
utama-release-manager[bot] 0f6bbf8
reverting mistake
valentinbruehl df5fc67
planner.py naming convention fixes
valentinbruehl 7aa1fd9
addressed pull request comments
valentinbruehl 25680e3
Updating
8a158d9
Updating
baf96f4
Updating
4685fe9
Updating
851d748
Updating
9bd40b9
Added Field Bounds to FastPathPlannig
5dbf0b7
Added field bounds as an obstacle
286cfac
Added boundaries are as obstacle, updated how the point of closesnt o…
16d33f5
Added a project feature, to increase the speed
c784b27
ignore DS_Store
energy-in-joles 39d9341
Merge branch 'main' into feature/fastpathplanning
energy-in-joles c644cc3
optimise fastpathplanner
energy-in-joles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file not shown.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -215,3 +215,6 @@ outputs/ | |
| wandb/ | ||
| mappo_*/ | ||
| *.gif | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
This file contains hidden or 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
Binary file not shown.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| from utama_core.motion_planning.src.controllers.dwa_controller import DWAController | ||
| from utama_core.motion_planning.src.controllers.fastpathplanning import ( | ||
| FastPathPlanningController, | ||
| ) | ||
| from utama_core.motion_planning.src.controllers.pid_controller import PIDController |
44 changes: 44 additions & 0 deletions
44
utama_core/motion_planning/src/controllers/fastpathplanning.py
This file contains hidden or 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,44 @@ | ||
| from abc import ABC, abstractmethod | ||
|
|
||
| import numpy as np | ||
|
|
||
| from utama_core.config.enums import Mode | ||
| from utama_core.config.physical_constants import ROBOT_RADIUS | ||
| from utama_core.entities.data.vector import Vector2D | ||
| from utama_core.entities.game import Game | ||
| from utama_core.entities.game.field import Field | ||
| from utama_core.motion_planning.src.common.motion_controller import MotionController | ||
| from utama_core.motion_planning.src.fastpathplanning.planner import FastPathPlanner | ||
| from utama_core.motion_planning.src.pid.pid import get_pids | ||
| from utama_core.rsoccer_simulator.src.ssl.envs import SSLStandardEnv | ||
|
|
||
|
|
||
| class FastPathPlanningController(MotionController): | ||
| def __init__(self, mode: Mode, rsim_env: SSLStandardEnv | None = None): | ||
| self.mode = mode | ||
| self.rsim_env: SSLStandardEnv | None = rsim_env | ||
| self.pid_oren, self.pid_trans = get_pids(mode) | ||
| self.fpp = FastPathPlanner(env=self.rsim_env) | ||
|
Comment on lines
+17
to
+21
|
||
|
|
||
| def calculate( | ||
| self, | ||
| game: Game, | ||
| robot_id: int, | ||
| target_pos: Vector2D, | ||
| target_oren: float, | ||
| ) -> tuple[Vector2D, float]: | ||
| field = game.field | ||
|
|
||
| field_bounds = field.field_bounds | ||
| robot = game.friendly_robots[robot_id] | ||
|
|
||
| oren = self.pid_oren.calculate(target_oren, robot.orientation, robot_id) | ||
|
|
||
| pos = self.fpp._path_to(game, robot_id, target_pos, field_bounds) | ||
| vel = self.pid_trans.calculate(pos, robot.p, robot_id) | ||
|
|
||
| return vel, oren | ||
|
|
||
| def reset(self, robot_id): | ||
| self.pid_oren.reset(robot_id) | ||
|
Vortex4627 marked this conversation as resolved.
|
||
| self.pid_trans.reset(robot_id) | ||
This file contains hidden or 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,18 @@ | ||
| from utama_core.config.physical_constants import ROBOT_RADIUS | ||
|
|
||
|
|
||
| class fastpathplanningconfig: | ||
|
valentinbruehl marked this conversation as resolved.
valentinbruehl marked this conversation as resolved.
|
||
| ROBOT_DIAMETER = 2 * ROBOT_RADIUS | ||
|
|
||
| # how fat is the danger zone around obstacles, in multiples of robot diameter | ||
| CLEARANCE_MULTIPLIER = 1.5 | ||
| OBSTACLE_CLEARANCE = ROBOT_DIAMETER * CLEARANCE_MULTIPLIER | ||
|
|
||
| # How far outside the danger zone shold the waypoint be | ||
| SUBGOAL_MULTIPLIER = 1.2 | ||
| SUBGOAL_DISTANCE = OBSTACLE_CLEARANCE * SUBGOAL_MULTIPLIER | ||
|
|
||
| LOOK_AHEAD_RANGE = 3 | ||
| MAXRECURSION_LENGTH = 3 | ||
| PROJECTEDFRAMES = 20 | ||
| PROJECTION_DISTANCE = 1 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.