Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade TrajoptLib and replace InitialGuessPoint with Pose2d #508

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading