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

Waypoint too close to cellbox boundary crashes smoothing #302

Open
hjabbot opened this issue Oct 8, 2024 · 0 comments
Open

Waypoint too close to cellbox boundary crashes smoothing #302

hjabbot opened this issue Oct 8, 2024 · 0 comments

Comments

@hjabbot
Copy link
Collaborator

hjabbot commented Oct 8, 2024

Describe the bug
Smoothing crashes when there's a waypoint very close to a cellbox boundary. It does not crash when the waypoint is on the boundary though.

To Reproduce
Set a waypoint very close to a cellbox edge. Specifically, I put a waypoint with longitude -52.499999 with a mesh that had a cellbox border at -52.5

Screenshots & Files

[08-10-24 15:18:23 :INFO    ] - optimise_routes 1.0.0
[08-10-24 15:18:23 :INFO    ] - Initialising Route Planner
[08-10-24 15:18:23 :INFO    ] - Calculating Dijkstra routes
[08-10-24 15:18:23 :INFO    ] - ============= Dijkstra Route Creation ============
[08-10-24 15:18:23 :INFO    ] -  - Objective = traveltime
[08-10-24 15:18:23 :INFO    ] - --- Processing Source Waypoint = WP_A
[08-10-24 15:18:23 :INFO    ] - Destination waypoint: WP_B
[08-10-24 15:18:24 :INFO    ] - Dijkstra routing complete...
[08-10-24 15:18:24 :INFO    ] - Timed call to compute_routes took 0.575328 seconds
[08-10-24 15:18:24 :INFO    ] - 	Outputting dijkstra path to ow_nu_sd5_nsf_escf.route_dijkstra.json
[08-10-24 15:18:24 :INFO    ] - Calculating smoothed routes
[08-10-24 15:18:24 :INFO    ] - ========= Determining Smoothed Routes ===========
[08-10-24 15:18:24 :INFO    ] - --- Smoothing Route - WP_A to WP_B
Traceback (most recent call last):
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/venv_dev/bin/optimise_routes", line 8, in <module>
    sys.exit(optimise_routes_cli())
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/utils.py", line 238, in wrapper
    res = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/cli.py", line 202, in optimise_routes_cli
    smoothed_routes = rp.compute_smoothed_routes()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/utils.py", line 238, in wrapper
    res = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/route_planner/route_planner.py", line 700, in compute_smoothed_routes
    sf.forward()
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/route_planner/crossing_smoothing.py", line 1301, in forward
    self.remove(ii) #Removing app
    ^^^^^^^^^^^^^^^
  File "/home/habbot/Documents/Work/BAS/repos/sdadt/PolarRoute/polar_route/route_planner/crossing_smoothing.py", line 687, in remove
    self.aps.pop(index)

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

No branches or pull requests

1 participant