Skip to content
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

Fix collisionMap (all SimulationMaps) #160

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix collisionMap (all SimulationMaps) #160

merged 2 commits into from
Nov 29, 2024

Conversation

mads256h
Copy link
Member

Before it did some strange things with SquareGrid that was really broken as the map did not align to CoarseMap tiles which made many places impossible for the robot to navigate to.

Now it has been fixed by bypassing the squaregrid stuff and just using the Tile[,] map to create the collision map.

Fixes a bug in cave map where the PatrollingMap threw an exception due to Astar being unable to path to the waypoint.

Also when the robot collides with something it switches from using the precomupted astar paths to the robotcontroller path and move to functionality to hopefully navigate around the obstacle.

We now calculate paths both ways from a waypoint to its neighbor and back.
This sometime creates two different paths (of the same length) which helps with robots colliding with each other.

S3JER
S3JER previously requested changes Nov 26, 2024
Copy link

@S3JER S3JER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test dont run

@mads256h mads256h marked this pull request as draft November 26, 2024 09:54
@mads256h
Copy link
Member Author

This breaks everything because everything in this shit codebase depends on everything else to be broken. AStar breaks when doing this, the mineatour algorithm breaks as well :)

@mads256h mads256h marked this pull request as ready for review November 29, 2024 11:39
Before it did some strange things with SquareGrid that was really broken
as the map did not align to CoarseMap tiles which made many places
impossible for the robot to navigate to.

Now it has been fixed by bypassing the squaregrid stuff and just using
the Tile[,] map to create the collision map.

Fixes a bug in cave map where the PatrollingMap threw an exception due
to Astar being unable to path to the waypoint.

Also when the robot collides with something it switches from using the
precomupted astar paths to the robotcontroller path and move to
functionality to hopefully navigate around the obstacle.

We now calculate paths both ways from a waypoint to its neighbor and
back.
This sometime creates two different paths (of the same length) which
helps with robots colliding with each other.

Co-Authored-By: Casper-NS <[email protected]>
The current implementation is broken and paths through walls when they
are 1 tile thick, which happens in our non-broken collisionmap.

Also fix issues with the PatrollingAlgorithm going off in a strange
direction.
@mads256h mads256h enabled auto-merge (rebase) November 29, 2024 13:12
@mads256h mads256h merged commit 3086311 into main Nov 29, 2024
6 checks passed
@mads256h mads256h deleted the fix-collisionmap branch November 29, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants