Skip to content

Commit

Permalink
Upgrade TrajoptLib and replace InitialGuessPoint with Pose2d (Sleipni…
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Jun 27, 2024
1 parent 46b256b commit 67a636b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 3 additions & 5 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -293,11 +291,11 @@ async fn generate_trajectory(
let mut wpt_cnt: usize = 0;
let mut rm: Vec<usize> = Vec::new();
let mut control_interval_counts: Vec<usize> = Vec::new();
let mut guess_points_after_waypoint: Vec<InitialGuessPoint> = Vec::new();
let mut guess_points_after_waypoint: Vec<Pose2d> = 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,
Expand Down

0 comments on commit 67a636b

Please sign in to comment.