Skip to content

Commit

Permalink
updated Lively version
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJSchoen committed Mar 2, 2023
1 parent 547bc1e commit fb3e8f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.1.1", features = [] }
tauri-build = { version = "1.2.1", features = [] }

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.1.1", features = ["api-all"] }
tauri = { version = "1.2.4", features = ["api-all"] }
thiserror = "1.0"
lively = {git = "https://github.com/Wisc-HCI/lively", tag="1.0.0-rc.2"}
game-loop = "0.9.1"
urdf-rs = "0.6.4"
urdf-rs = "0.6"
nalgebra = { version = "0.31", features = ["serde-serialize-no-std"] }

[patch.crates-io]
k = {git = "https://github.com/AndrewJSchoen/k"}

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct LivelyHandler {
pub weights: HashMap<String,f64>,
pub target_weights: HashMap<String,f64>,
pub robot_info: Option<RobotInfo>,
pub root_bounds: Option<Vec<(f64, f64)>>,
pub root_bounds: Option<Vec<ScalarRange>>,
pub shapes: Vec<Shape>,
pub initial_time: Instant,
pub shape_updates: Vec<ShapeUpdate>,
Expand Down Expand Up @@ -145,7 +145,7 @@ impl LivelyHandler {
self.last_solved_state = None;
match root_bounds {
Some(bounds)=>{
self.root_bounds = Some(bounds);
self.root_bounds = Some(bounds.iter().map(|pair| ScalarRange::new(pair.0,pair.1)).collect());
},
None => {}
}
Expand Down Expand Up @@ -196,7 +196,7 @@ impl LivelyHandler {
}

pub fn update_root_bounds(&mut self, root_bounds: Vec<(f64, f64)>) {
self.root_bounds = Some(root_bounds);
self.root_bounds = Some(root_bounds.iter().map(|pair| ScalarRange::new(pair.0,pair.1)).collect());
// println!("Updating root bounds");
self.update_solver();
return;
Expand Down

0 comments on commit fb3e8f9

Please sign in to comment.