Skip to content

Commit

Permalink
feat(rrtstar): feat/rrtstar -> main
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-hj committed May 7, 2024
2 parents c6af793 + 1960f44 commit 4b1dea8
Show file tree
Hide file tree
Showing 20 changed files with 697 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
perf*
dhat-heap.json
flamegraphs/*

*.json
!results/*.json
65 changes: 63 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ members = [
"crates/as_variant",
"crates/interleave_evenly",
"crates/gbp_schedule",
"crates/env_to_png",
"crates/gbp_environment",
"crates/gbp_geometry",
]

[workspace.package]
Expand Down
7 changes: 4 additions & 3 deletions config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000
step-size = 2.0
collision-radius = 10.0
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/Circle/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/CircleExperiment/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/ClearCircle/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/Complex/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 5000000
step-size = 5.0
collision-radius = 3.0
neighbourhood-radius = 8.0

[rrt.smoothing]
max-iterations = 500
Expand Down
2 changes: 1 addition & 1 deletion config/simulations/Complex/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ tiles:
- ' '
settings:
tile-size: 25.0
path-width: 0.4
path-width: 0.6
obstacle-height: 1.0
obstacles: []
7 changes: 4 additions & 3 deletions config/simulations/Custom/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ start-paused = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/Intersection/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ pause-on-spawn = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/Simple/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ start-paused = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
7 changes: 4 additions & 3 deletions config/simulations/VeryCluttered/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ start-paused = false
despawn-robot-when-final-waypoint-reached = false

[rrt]
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
max-iterations = 1000000
step-size = 0.5
collision-radius = 0.1
neighbourhood-radius = 10.0

[rrt.smoothing]
max-iterations = 500
Expand Down
14 changes: 2 additions & 12 deletions crates/env_to_png/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,23 +484,13 @@ mod tests {
assert_eq!(tile_dimensions.y, 5.6);
}

#[test]
fn test_tile_to_image_coords() {
let tile_coords = TileCoords { x: 2, y: 5 };
let resolution = PixelsPerTile::new(100);
let tile_size = 10.0;
let pixel_coords = tile_to_image_coords(tile_coords, resolution, tile_size);
assert_eq!(pixel_coords.x, 20);
assert_eq!(pixel_coords.y, 50);
}

#[test]
fn test_tile_units_to_percentage() {
let tile_dimensions = TileDimensions { x: 2.3, y: 5.6 };
let tile_size = 10.0;
let percentage = tile_units_to_percentage(tile_dimensions, tile_size);
assert_eq!(percentage.x.0, 0.3);
assert_eq!(percentage.y.0, 0.6);
assert_eq!(percentage.x().0, 0.3);
assert_eq!(percentage.y().0, 0.6);
}

#[test]
Expand Down
11 changes: 6 additions & 5 deletions crates/gbpplanner-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ paste = "1.0.14"
egui_plot = "0.26"
egui_graphs = "0.19.0"
serde_yaml.workspace = true
rrt = "0.7.0"
rrt = { git = "https://github.com/AU-Master-Thesis/rrt", branch = "main" }
colored = "2.1.0"
directories = "5.0.1"
chrono = "0.4.37"
# parry3d = "0.13.7"
colored = "2.1.0"
directories = "5.0.1"
chrono = "0.4.37"


# font-kit = { version = "0.13.0", features = ["freetype"] }
Expand All @@ -152,7 +152,8 @@ bat = "0.24.0"
dhat = { version = "0.3.3", optional = true }
indexmap = "2.2.6"
colored-diff = "0.2.3"
serde_json = "1.0.116"
serde_json = "1.0.116"
colorgrad = "0.6.2"


# TODO: change to not wasm
Expand Down
Loading

0 comments on commit 4b1dea8

Please sign in to comment.