COPS-IITBHU / COPS-IITBHU/MultiAgent_Grid
Bad path check
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/COPS-IITBHU/MultiAgent_GNN/blob/5637f23cd6a85504856fea752931a6225b33a791/gym_grid/envs/grid_2d.py#L172-L186
I see you have calculated ray cast using first seeing if a ray hits any object between every consecutive points, so if there is any fixture between them then the callback is updated and what you are checking the shape is not necessary to check is not needed as its obviously hitting but lets say the path has a fixture in the length of 1.1r that's not being checked because it wont be in the direction of the path it could be in a deviated ray not the ray you have casted which is along the path not on any other direction
Solution: rather than casting rays in 360 degree and finding out if their is ray that is less than 1.1r distance (just like a lidar) which would be very high in timecomplexitiy ( try out `python -m Box2D.examples.raycast` ) . Rather just make a border on the normal fixture

just how we have extra buffer around each wall ( which can be a dummy fixture which is only taken in to account for ray casting [example](https://gamedev.stackexchange.com/questions/22540/how-to-ignore-physics-collision-of-some-objects-in-box2d/22542) ) and use this fixtures for ray casting
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.