diff --git a/mapf-rse/Cargo.toml b/mapf-rse/Cargo.toml index 2b24835..d347ecb 100644 --- a/mapf-rse/Cargo.toml +++ b/mapf-rse/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] mapf = { path="../mapf" } -rmf_site_format = { path = "../../rmf_site/rmf_site_format" } -rmf_site_editor = { path = "../../rmf_site/rmf_site_editor" } +rmf_site_format = { git = "https://github.com/reuben-thomas/rmf_site.git", branch = "scenarios", package = "rmf_site_format" } +rmf_site_editor = { git = "https://github.com/reuben-thomas/rmf_site.git", branch = "scenarios", package = "rmf_site_editor" } bevy = { version = "0.12", features = ["pnm", "jpeg", "tga"] } bevy_egui = "0.23.0" diff --git a/mapf-rse/src/lib.rs b/mapf-rse/src/lib.rs index 7e10b63..61298ae 100644 --- a/mapf-rse/src/lib.rs +++ b/mapf-rse/src/lib.rs @@ -19,8 +19,8 @@ pub mod simulation; pub use simulation::*; pub mod negotiation; -use librmf_site_editor::widgets::PropertiesTilePlugin; pub use negotiation::*; +use rmf_site_editor::widgets::PropertiesTilePlugin; use bevy::prelude::*; diff --git a/mapf-rse/src/main.rs b/mapf-rse/src/main.rs index a5c00b4..a4dd2ec 100644 --- a/mapf-rse/src/main.rs +++ b/mapf-rse/src/main.rs @@ -16,15 +16,12 @@ */ use bevy::prelude::*; -use librmf_site_editor::*; use mapf_rse::MapfRsePlugin; +use rmf_site_editor::*; fn main() { let mut app = App::new(); - app.add_plugins(( - SiteEditor::default(), - MapfRsePlugin::default(), - )); + app.add_plugins((SiteEditor::default(), MapfRsePlugin::default())); app.run(); } diff --git a/mapf-rse/src/negotiation/control_tile.rs b/mapf-rse/src/negotiation/control_tile.rs index 346fb8e..e87c12e 100644 --- a/mapf-rse/src/negotiation/control_tile.rs +++ b/mapf-rse/src/negotiation/control_tile.rs @@ -21,7 +21,7 @@ use bevy_egui::egui::{ Align, CollapsingHeader, Color32, ComboBox, DragValue, Frame, Layout, ScrollArea, Slider, Stroke, Ui, }; -use librmf_site_editor::{ +use rmf_site_editor::{ interaction::{Select, Selection}, site::{ location, mobile_robot, Category, Change, ChangeCurrentScenario, CurrentScenario, Delete, diff --git a/mapf-rse/src/negotiation/mod.rs b/mapf-rse/src/negotiation/mod.rs index 7620aae..3383dd8 100644 --- a/mapf-rse/src/negotiation/mod.rs +++ b/mapf-rse/src/negotiation/mod.rs @@ -27,7 +27,7 @@ use std::{ time::Duration, }; -use librmf_site_editor::{ +use rmf_site_editor::{ interaction::{Select, Selection}, occupancy::{Cell, Grid}, site::{ @@ -142,11 +142,7 @@ pub fn generate_plan( }; let agent = Agent { - start: to_cell( - robot_pose.trans[0], - robot_pose.trans[1], - cell_size, - ), + start: to_cell(robot_pose.trans[0], robot_pose.trans[1], cell_size), yaw: f64::from(robot_pose.rot.yaw().radians()), goal: to_cell( goal_transform.translation.x, @@ -185,8 +181,9 @@ pub fn generate_plan( elapsed_time }); let task_entity = commands.spawn_empty().id(); - commands.entity(task_entity).insert(ComputeNegotiateTask(task)); - + commands + .entity(task_entity) + .insert(ComputeNegotiateTask(task)); } pub fn to_cell(x: f32, y: f32, cell_size: f32) -> [i64; 2] { diff --git a/mapf-rse/src/simulation.rs b/mapf-rse/src/simulation.rs index b1d8af3..683f763 100644 --- a/mapf-rse/src/simulation.rs +++ b/mapf-rse/src/simulation.rs @@ -19,7 +19,7 @@ use bevy::{ecs::system::SystemParam, prelude::*}; use bevy_egui::egui::{ Button, CollapsingHeader, Color32, ComboBox, DragValue, Frame, ScrollArea, Slider, Stroke, Ui, }; -use librmf_site_editor::{ +use rmf_site_editor::{ interaction::{Select, Selection}, site::{ Category, Change, ChangeCurrentScenario, CurrentScenario, Delete, Group, MobileRobotMarker, diff --git a/mapf/src/motion/se2/timed_position.rs b/mapf/src/motion/se2/timed_position.rs index 2d3ca8f..81ee1ab 100644 --- a/mapf/src/motion/se2/timed_position.rs +++ b/mapf/src/motion/se2/timed_position.rs @@ -246,7 +246,11 @@ mod tests { let p = motion.compute_position(&t).ok().unwrap(); assert_relative_eq!(p.translation.vector[0], 1f64, max_relative = 0.001); assert_relative_eq!(p.translation.vector[1], 7.5f64, max_relative = 0.001); - assert_relative_eq!(p.rotation.angle(), -(5f64).to_radians(), max_relative = 0.001); + assert_relative_eq!( + p.rotation.angle(), + -(5f64).to_radians(), + max_relative = 0.001 + ); let v = motion.compute_velocity(&t).ok().unwrap(); assert_relative_eq!(v.translational[0], 0f64, max_relative = 0.001);