diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 34fda75070..7eb5d01e1a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3212,7 +3212,7 @@ dependencies = [ [[package]] name = "trajoptlib" version = "0.1.0" -source = "git+https://github.com/SleipnirGroup/TrajoptLib.git?rev=86603543a263aac6d5f7e86cd53384a6d3c6bea2#86603543a263aac6d5f7e86cd53384a6d3c6bea2" +source = "git+https://github.com/SleipnirGroup/TrajoptLib.git?rev=674240dd0016c9190998cd2e2cd846a4c34756d3#674240dd0016c9190998cd2e2cd846a4c34756d3" dependencies = [ "cmake", "cxx", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2aa160c57f..a84585931f 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,7 +18,7 @@ tauri-build = { version = "1.5.2", features = [] } tauri = { version = "1.6.6", features = [ "os-all", "window-close", "window-set-title", "path-all", "dialog", "dialog-confirm", "dialog-save", "dialog-open", "dialog-ask", "fs-all", "shell-open", "devtools"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -trajoptlib = { git = "https://github.com/SleipnirGroup/TrajoptLib.git", rev = "86603543a263aac6d5f7e86cd53384a6d3c6bea2" } +trajoptlib = { git = "https://github.com/SleipnirGroup/TrajoptLib.git", rev = "674240dd0016c9190998cd2e2cd846a4c34756d3" } open = "3" lazy_static = "1.4.0" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 8306832556..d7bf2c5302 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -11,9 +11,7 @@ use tauri::{ api::{dialog::blocking::FileDialogBuilder, file}, Manager, }; -use trajoptlib::{ - HolonomicTrajectory, InitialGuessPoint, SwerveDrivetrain, SwerveModule, SwervePathBuilder, -}; +use trajoptlib::{HolonomicTrajectory, Pose2d, SwerveDrivetrain, SwerveModule, SwervePathBuilder}; #[derive(Clone, serde::Serialize, Debug)] struct OpenFileEventPayload<'a> { @@ -293,11 +291,11 @@ async fn generate_trajectory( let mut wpt_cnt: usize = 0; let mut rm: Vec = Vec::new(); let mut control_interval_counts: Vec = Vec::new(); - let mut guess_points_after_waypoint: Vec = Vec::new(); + let mut guess_points_after_waypoint: Vec = Vec::new(); for i in 0..path.len() { let wpt: &ChoreoWaypoint = &path[i]; if wpt.isInitialGuess { - let guess_point: InitialGuessPoint = InitialGuessPoint { + let guess_point = Pose2d { x: wpt.x, y: wpt.y, heading: wpt.heading,