From 9c764ac3ba1b2dddff6ff6d0e4ad88acd6ac4629 Mon Sep 17 00:00:00 2001 From: kpbaks Date: Sat, 6 Jul 2024 18:29:50 +0200 Subject: [PATCH] chore: remove unneeded file --- .../Structured Junction Twoway/config.toml | 2 +- config/simulations/Structured/config.toml | 116 --- .../simulations/Structured/environment.yaml | 18 - config/simulations/Structured/formation.yaml | 955 ------------------ scripts/utils.py | 5 +- 5 files changed, 4 insertions(+), 1092 deletions(-) delete mode 100644 config/simulations/Structured/config.toml delete mode 100644 config/simulations/Structured/environment.yaml delete mode 100644 config/simulations/Structured/formation.yaml diff --git a/config/simulations/Structured Junction Twoway/config.toml b/config/simulations/Structured Junction Twoway/config.toml index b968e9a..79ca556 100644 --- a/config/simulations/Structured Junction Twoway/config.toml +++ b/config/simulations/Structured Junction Twoway/config.toml @@ -68,7 +68,7 @@ max = 1.0 [robot.communication] radius = 20.0 -failure-rate = 0.4 +failure-rate = 0.7 [simulation] max-time = 10000.0 diff --git a/config/simulations/Structured/config.toml b/config/simulations/Structured/config.toml deleted file mode 100644 index ebe360c..0000000 --- a/config/simulations/Structured/config.toml +++ /dev/null @@ -1,116 +0,0 @@ -environment_image = "junction_twoway" -environment = "./config/simulations/Intersection/environment.yaml" -formation_group = "./config/simulations/Intersection/formation.ron" - -[visualisation.height] -objects = 0.5 -height-map = 1.0 - -[visualisation.draw] -robots = true -communication-graph = false -predicted-trajectories = true -waypoints = true -uncertainty = false -paths = false -communication-radius = false -obstacle-factors = false -tracking = false -interrobot-factors = false -interrobot-factors-safety-distance = false -generated-map = true -sdf = false -robot-colliders = false -environment-colliders = false -robot-robot-collisions = true -robot-environment-collisions = false - -[visualisation.uncertainty] -max-radius = 2.5 -scale = 30.0 - -[interaction] -ui-focus-cancels-inputs = true -default-cam-distance = 200.0 - -[gbp] -sigma-pose-fixed = 0.0000000000000010000000036274937 -sigma-factor-dynamics = 0.10000000149011612 -sigma-factor-interrobot = 0.009999999776482582 -sigma-factor-obstacle = 0.009999999776482582 -sigma-factor-tracking = 0.15000000596046448 -lookahead-multiple = 3 -variables = 10 - -[gbp.tracking] -switch-padding = 1.0 -attraction-distance = 2.0 - -[gbp.iteration-schedule] -internal = 10 -external = 10 -schedule = "interleave-evenly" - -[gbp.factors-enabled] -dynamic = true -interrobot = true -obstacle = true -tracking = false - -[robot] -planning-horizon = 5.0 -target-speed = 5.0 -inter-robot-safety-distance-multiplier = 2.5 - -[robot.radius] -min = 1.0 -max = 1.0 - -[robot.communication] -radius = 20.0 -failure-rate = 0.0 - -[simulation] -max-time = 10000.0 -time-scale = 1.5 -manual-step-factor = 1 -hz = 10.0 -prng-seed = 2 -pause-on-spawn = false -despawn-robot-when-final-waypoint-reached = true -exit-application-on-scenario-finished = false - -[rrt] -max-iterations = 5000000 -step-size = 5.0 -collision-radius = 3.0 -neighbourhood-radius = 8.0 - -[rrt.smoothing] -enabled = true -max-iterations = 500 -step-size = 0.5 - -[graphviz] -export-location = "./assets/export/" - -[graphviz.interrobot.active] -style = "dashed" -len = 8.0 -color = "red" - -[graphviz.interrobot.inactive] -style = "dashed" -len = 8.0 -color = "gray" - -[manual] -timesteps-per-step = 1 - -[debug.on-variable-clicked] -obstacle = false -dynamic = false -interrobot = false -tracking = false -variable = false -inbox = false diff --git a/config/simulations/Structured/environment.yaml b/config/simulations/Structured/environment.yaml deleted file mode 100644 index 022a433..0000000 --- a/config/simulations/Structured/environment.yaml +++ /dev/null @@ -1,18 +0,0 @@ -tiles: - grid: - - ' ╷ ╷ ' - - ' ┌─┼─┼─┐┌╴' - - '╶┼─┘┌┼┬┼┘ ' - - '╶┴┬─┴┼┘│ ' - - ' ┌┴┐┌┼─┴┬╴' - - ' ├─┴┘├──┘ ' - - ' ╵ ╵ ' - settings: - tile-size: 25.0 - path-width: 0.5 - obstacle-height: 2.25 - sdf: - resolution: 200 - expansion: 0.1 - blur: 0.02 -obstacles: [] diff --git a/config/simulations/Structured/formation.yaml b/config/simulations/Structured/formation.yaml deleted file mode 100644 index ebdabd0..0000000 --- a/config/simulations/Structured/formation.yaml +++ /dev/null @@ -1,955 +0,0 @@ -formations: - # red, turn left -- repeat: - every: - secs: 8 - nanos: 0 - times: !finite 10 - delay: - secs: 0 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.07 - y: 0.515 - - x: 0.07 - y: 0.515 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.54 - y: 0.515 - - x: 0.54 - y: 0.515 - projection-strategy: identity - - shape: !line-segment - - x: 0.54 - y: 0.915 - - x: 0.54 - y: 0.915 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - # red, turn left, right, left, right -- repeat: - every: - secs: 8 - nanos: 0 - times: !finite 10 - delay: - secs: 2 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.07 - y: 0.515 - - x: 0.07 - y: 0.515 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.64 - y: 0.515 - - x: 0.64 - y: 0.515 - projection-strategy: identity - - shape: !line-segment - - x: 0.64 - y: 0.655 - - x: 0.64 - y: 0.655 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.655 - - x: 0.84 - y: 0.655 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.8 - - x: 0.84 - y: 0.8 - projection-strategy: identity - - shape: !line-segment - - x: 0.93 - y: 0.8 - - x: 0.93 - y: 0.8 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - # red, turn right -- repeat: - every: - secs: 8 - nanos: 0 - times: !finite 10 - delay: - secs: 4 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.07 - y: 0.515 - - x: 0.07 - y: 0.515 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.515 - - x: 0.56 - y: 0.515 - projection-strategy: identity - - shape: !line-segment - - x: 0.56 - y: 0.08 - - x: 0.56 - y: 0.08 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - - # red, turn right, left -- repeat: - every: - secs: 8 - nanos: 0 - times: !finite 10 - delay: - secs: 6 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.07 - y: 0.515 - - x: 0.07 - y: 0.515 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.515 - - x: 0.56 - y: 0.515 - projection-strategy: identity - - shape: !line-segment - - x: 0.56 - y: 0.365 - - x: 0.56 - y: 0.365 - projection-strategy: identity - - shape: !line-segment - - x: 0.915 - y: 0.365 - - x: 0.915 - y: 0.365 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - - # yellow, straigt -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 0 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.54 - y: 0.085 - - x: 0.54 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.54 - y: 0.915 - - x: 0.54 - y: 0.915 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - # yellow, left -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 3 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.54 - y: 0.085 - - x: 0.54 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.54 - y: 0.485 - - x: 0.54 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.07 - y: 0.485 - - x: 0.07 - y: 0.485 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - # yellow, right, left, right -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 6 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.54 - y: 0.085 - - x: 0.54 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.54 - y: 0.655 - - x: 0.54 - y: 0.655 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.655 - - x: 0.84 - y: 0.655 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.8 - - x: 0.84 - y: 0.8 - projection-strategy: identity - - shape: !line-segment - - x: 0.93 - y: 0.8 - - x: 0.93 - y: 0.8 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - # distance: robot-radius - # intersects-with: horizon - distance: !meter 10 - intersects-with: !variable 5 - - # blue, up, right, left, left -- repeat: - every: - secs: 12 - nanos: 0 - times: !finite 10 - delay: - secs: 0 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.14 - y: 0.085 - - x: 0.14 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.14 - y: 0.37 - - x: 0.14 - y: 0.37 - projection-strategy: identity - - shape: !line-segment - - x: 0.24 - y: 0.37 - - x: 0.24 - y: 0.37 - projection-strategy: identity - - shape: !line-segment - - x: 0.24 - y: 0.485 - - x: 0.24 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.07 - y: 0.485 - - x: 0.07 - y: 0.485 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - - # blue, up, right, left, right -- repeat: - every: - secs: 12 - nanos: 0 - times: !finite 10 - delay: - secs: 1 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.14 - y: 0.085 - - x: 0.14 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.14 - y: 0.23 - - x: 0.14 - y: 0.23 - projection-strategy: identity - - shape: !line-segment - - x: 0.44 - y: 0.23 - - x: 0.44 - y: 0.23 - projection-strategy: identity - - shape: !line-segment - - x: 0.44 - y: 0.37 - - x: 0.44 - y: 0.37 - projection-strategy: identity - - shape: !line-segment - - x: 0.93 - y: 0.37 - - x: 0.93 - y: 0.37 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - - # blue, up, right, left, left, right, right, left -- repeat: - every: - secs: 12 - nanos: 0 - times: !finite 10 - delay: - secs: 2 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.14 - y: 0.085 - - x: 0.14 - y: 0.085 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.14 - y: 0.37 - - x: 0.14 - y: 0.37 - projection-strategy: identity - - shape: !line-segment - - x: 0.24 - y: 0.37 - - x: 0.24 - y: 0.37 - projection-strategy: identity - - shape: !line-segment - - x: 0.24 - y: 0.485 - - x: 0.24 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.14 - y: 0.485 - - x: 0.14 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.14 - y: 0.66 - - x: 0.14 - y: 0.66 - projection-strategy: identity - - shape: !line-segment - - x: 0.34 - y: 0.66 - - x: 0.34 - y: 0.66 - projection-strategy: identity - - shape: !line-segment - - x: 0.34 - y: 0.915 - - x: 0.34 - y: 0.915 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# dark green, lllr -- repeat: - every: - secs: 10 - nanos: 0 - times: !finite 10 - delay: - secs: 0 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.56 - y: 0.925 - - x: 0.56 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.80 - - x: 0.56 - y: 0.80 - projection-strategy: identity - - shape: !line-segment - - x: 0.76 - y: 0.80 - - x: 0.76 - y: 0.80 - projection-strategy: identity - - shape: !line-segment - - x: 0.76 - y: 0.665 - - x: 0.76 - y: 0.665 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.665 - - x: 0.84 - y: 0.665 - projection-strategy: identity - - shape: !line-segment - - x: 0.84 - y: 0.80 - - x: 0.84 - y: 0.80 - projection-strategy: identity - - shape: !line-segment - - x: 0.95 - y: 0.80 - - x: 0.95 - y: 0.80 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# dark green, rslr -- repeat: - every: - secs: 10 - nanos: 0 - times: !finite 10 - delay: - secs: 2 - nanos: 500000000 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.56 - y: 0.925 - - x: 0.56 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.765 - - x: 0.56 - y: 0.765 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.765 - - x: 0.16 - y: 0.765 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.63 - - x: 0.16 - y: 0.63 - projection-strategy: identity - - shape: !line-segment - - x: 0.05 - y: 0.63 - - x: 0.05 - y: 0.63 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# dark green, rlrs -- repeat: - every: - secs: 10 - nanos: 0 - times: !finite 10 - delay: - secs: 5 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.56 - y: 0.925 - - x: 0.56 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.765 - - x: 0.56 - y: 0.765 - projection-strategy: identity - - shape: !line-segment - - x: 0.36 - y: 0.765 - - x: 0.36 - y: 0.765 - projection-strategy: identity - - shape: !line-segment - - x: 0.36 - y: 0.63 - - x: 0.36 - y: 0.63 - projection-strategy: identity - - shape: !line-segment - - x: 0.05 - y: 0.63 - - x: 0.05 - y: 0.63 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# dark green, sssrlrl -- repeat: - every: - secs: 10 - nanos: 0 - times: !finite 10 - delay: - secs: 7 - nanos: 500000000 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.56 - y: 0.925 - - x: 0.56 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.56 - y: 0.34 - - x: 0.56 - y: 0.34 - projection-strategy: identity - - shape: !line-segment - - x: 0.46 - y: 0.34 - - x: 0.46 - y: 0.34 - projection-strategy: identity - - shape: !line-segment - - x: 0.46 - y: 0.2 - - x: 0.46 - y: 0.2 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.2 - - x: 0.16 - y: 0.2 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.075 - - x: 0.16 - y: 0.075 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# light green, ssslrsl -- repeat: - every: - secs: 9 - nanos: 500000000 - times: !finite 10 - delay: - secs: 4 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.95 - y: 0.34 - - x: 0.95 - y: 0.34 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.46 - y: 0.34 - - x: 0.46 - y: 0.34 - projection-strategy: identity - - shape: !line-segment - - x: 0.46 - y: 0.2 - - x: 0.46 - y: 0.2 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.2 - - x: 0.16 - y: 0.2 - projection-strategy: identity - - shape: !line-segment - - x: 0.16 - y: 0.075 - - x: 0.16 - y: 0.075 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# light green, ssrlsrsrl -- repeat: - every: - secs: 9 - nanos: 500000000 - times: !finite 10 - delay: - secs: 5 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.95 - y: 0.34 - - x: 0.95 - y: 0.34 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.54 - y: 0.34 - - x: 0.54 - y: 0.34 - projection-strategy: identity - - shape: !line-segment - - x: 0.54 - y: 0.485 - - x: 0.54 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.14 - y: 0.485 - - x: 0.14 - y: 0.485 - projection-strategy: identity - - shape: !line-segment - - x: 0.14 - y: 0.795 - - x: 0.14 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.34 - y: 0.795 - - x: 0.34 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.34 - y: 0.925 - - x: 0.34 - y: 0.925 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# purple, srs -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 0 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.36 - y: 0.925 - - x: 0.36 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.36 - y: 0.63 - - x: 0.36 - y: 0.63 - projection-strategy: identity - - shape: !line-segment - - x: 0.05 - y: 0.63 - - x: 0.05 - y: 0.63 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# purple, lrssss -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 3 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.36 - y: 0.925 - - x: 0.36 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.36 - y: 0.795 - - x: 0.36 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.56 - y: 0.795 - - x: 0.56 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.56 - y: 0.075 - - x: 0.56 - y: 0.075 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 - -# purple, lsrsl -- repeat: - every: - secs: 9 - nanos: 0 - times: !finite 10 - delay: - secs: 6 - nanos: 0 - robots: 1 - planning-strategy: only-local - initial-position: - shape: !line-segment - - x: 0.36 - y: 0.925 - - x: 0.36 - y: 0.925 - placement-strategy: !random - attempts: 2000 - waypoints: - - shape: !line-segment - - x: 0.36 - y: 0.795 - - x: 0.36 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.76 - y: 0.795 - - x: 0.76 - y: 0.795 - projection-strategy: identity - - shape: !line-segment - - x: 0.76 - y: 0.365 - - x: 0.76 - y: 0.365 - projection-strategy: identity - - shape: !line-segment - - x: 0.95 - y: 0.365 - - x: 0.95 - y: 0.365 - projection-strategy: identity - waypoint-reached-when-intersects: - distance: robot-radius - intersects-with: horizon - finished-when-intersects: - distance: !meter 10 - intersects-with: !variable 5 diff --git a/scripts/utils.py b/scripts/utils.py index b8105f2..7362897 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -8,7 +8,8 @@ from typing import Iterable, List import numpy as np -from scripts.ldj import ldj +# from scripts.ldj import ldj +from ldj import ldj rgba_to_float = lambda rgba: [x / 255 for x in rgba] @@ -192,4 +193,4 @@ def closest_projection_onto_line_segments(point: np.ndarray, lines: list[LinePoi projections = [projection_onto_line(point, line) for line in valid_lines] closest_projection = min(projections, key=lambda proj: np.linalg.norm(proj - point)) - return closest_projection \ No newline at end of file + return closest_projection