diff --git a/Cargo.toml b/Cargo.toml index e514fb6f6..e2aaa615b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,6 +129,22 @@ exclude = ["led-box-firmware", "led-box-firmware-pico"] [profile.release] debug = true +[workspace.dependencies] +num-traits = "0.2" +simba = "0.9" +nalgebra = "0.33" +nalgebra-mvn = "0.15" +adskalman = "0.16" +cam-geom = "0.15" +opencv-ros-camera = "0.15" +dlt = "0.13" +lstsq = "0.6.0" +parry2d-f64 = "0.17" +parry3d-f64 = "0.17" +delaunator = "0.2.0" +ncollide2d = { package = "ncollide2d-updated", version = "0.36.3" } +ncollide3d = { package = "ncollide3d-updated", version = "0.36.3" } + [replace] # "tokio-threadpool:0.1.6" = {git="https://bare-git.strawlab.org/tokio.git", rev="472e64c1ea67f3976191cb1b291061faf2082735"} -"mp4:0.14.0" = {git="https://github.com/strawlab/mp4-rust", rev="f5744a39e22adfd749ddd61f1a59d0bb60c87349"} +"mp4:0.14.0" = { git = "https://github.com/strawlab/mp4-rust", rev = "f5744a39e22adfd749ddd61f1a59d0bb60c87349" } diff --git a/bisection-search/Cargo.toml b/bisection-search/Cargo.toml index 78c4b6a32..f54ab1b53 100644 --- a/bisection-search/Cargo.toml +++ b/bisection-search/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" rust-version = "1.76" [dependencies] -simba = { version = "0.8", default-features = false, features = ["libm"] } +simba = { workspace = true, default-features = false, features = ["libm"] } diff --git a/braid-april-cal/Cargo.toml b/braid-april-cal/Cargo.toml index 224ad6ec3..753a2f2fb 100644 --- a/braid-april-cal/Cargo.toml +++ b/braid-april-cal/Cargo.toml @@ -9,16 +9,16 @@ serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = "1.0" serde_yaml = "0.9" itertools = "0.10.5" -nalgebra = "0.32" -cam-geom = "0.14" -opencv-ros-camera = { version = "0.14", features = ["serde-serialize"] } +nalgebra = { workspace = true } +cam-geom = { workspace = true } +opencv-ros-camera = { workspace = true, features = ["serde-serialize"] } chrono = { version = "0.4.23", default-features = false, features = [ "serde", "clock", "std", "wasmbind", ] } -dlt = { version = "0.12", features = ["serde-serialize"] } +dlt = { workspace = true, features = ["default", "serde-serialize"] } argmin = { version = "0.8.1", features = [ "wasm-bindgen", ], default-features = false } diff --git a/braid-april-cal/flytrax-apriltags-calibration/Cargo.toml b/braid-april-cal/flytrax-apriltags-calibration/Cargo.toml index d68602834..50f0f651d 100644 --- a/braid-april-cal/flytrax-apriltags-calibration/Cargo.toml +++ b/braid-april-cal/flytrax-apriltags-calibration/Cargo.toml @@ -13,7 +13,7 @@ image = { version = "0.24.2", default-features = false, features = [ "jpeg", ] } machine-vision-formats = "0.1" -nalgebra = "0.32" +nalgebra = { workspace = true } resvg = "0.19" serde_yaml = "0.9.21" tagger = "4.0" @@ -28,7 +28,7 @@ convert-image = { path = "../../convert-image" } flydra-types = { path = "../../flydra-types" } flytrax-io = { path = "../../strand-cam/flytrax-io" } mvg = { path = "../../mvg" } -opencv-ros-camera = { version = "0.14", features = ["serde-serialize"] } +opencv-ros-camera = { workspace = true, features = ["serde-serialize"] } env_logger = "0.10.0" [dev-dependencies] diff --git a/braid-process-video/Cargo.toml b/braid-process-video/Cargo.toml index 54baf267d..d5a794c87 100644 --- a/braid-process-video/Cargo.toml +++ b/braid-process-video/Cargo.toml @@ -32,7 +32,7 @@ regex = "1" futures = "0.3" csv = "1.1" tracing-panic = "0.1.1" -nalgebra = "0.32" +nalgebra = { workspace = true } indicatif = "0.17" channellib = { path = "../channellib" } diff --git a/braidz-export-rrd/Cargo.toml b/braidz-export-rrd/Cargo.toml index 1f0ae130b..046fedc99 100644 --- a/braidz-export-rrd/Cargo.toml +++ b/braidz-export-rrd/Cargo.toml @@ -13,9 +13,9 @@ color-eyre = "0.6.2" tracing = "0.1.40" rerun = "0.17.0" -opencv-ros-camera = "0.14.1" -cam-geom = "0.14.1" -nalgebra = "0.32.4" +opencv-ros-camera = { workspace = true } +cam-geom = { workspace = true } +nalgebra = { workspace = true } regex = "1.10.3" ndarray = "0.15.6" machine-vision-formats = "0.1.1" diff --git a/camcal/Cargo.toml b/camcal/Cargo.toml index 860bc1272..378c97fbc 100644 --- a/camcal/Cargo.toml +++ b/camcal/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" rust-version = "1.76" [dependencies] -nalgebra = "0.32" -opencv-ros-camera = "0.14" +nalgebra = { workspace = true } +opencv-ros-camera = { workspace = true } serde = { version = "1.0", features = ["derive"] } opencv-calibrate = { path = "../opencv-calibrate" } diff --git a/fastimage/Cargo.toml b/fastimage/Cargo.toml index e47ba1527..2ad4f6f42 100644 --- a/fastimage/Cargo.toml +++ b/fastimage/Cargo.toml @@ -8,7 +8,7 @@ rust-version = "1.76" [dependencies] ipp-sys = "0.4.4" thiserror = "1.0" -num-traits = "0.2" +num-traits = { workspace = true } [dev-dependencies] itertools = "0.8" diff --git a/flydra-feature-detector/Cargo.toml b/flydra-feature-detector/Cargo.toml index 1b06b57ec..4c74912b9 100644 --- a/flydra-feature-detector/Cargo.toml +++ b/flydra-feature-detector/Cargo.toml @@ -12,15 +12,15 @@ thiserror = "1.0.33" machine-vision-formats = "0.1" timestamped-frame = { path = "../timestamped-frame" } basic-frame = { path = "../basic-frame" } -num-traits = "0.2" +num-traits = { workspace = true } thread-control = "0.1" cast = "0.2.2" serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" tokio = { version = "1.0.1", default-features = false, features = ["rt"] } stream-cancel = "0.8" -nalgebra = "0.32" -parry2d-f64 = "0.13.5" +nalgebra = { workspace = true } +parry2d-f64 = { workspace = true, features = ["default"] } ipp-sys = { version = "0.4.4", optional = true } fastimage = { path = "../fastimage", optional = true } diff --git a/flydra-mvg/Cargo.toml b/flydra-mvg/Cargo.toml index 15969014c..ab7e3b987 100644 --- a/flydra-mvg/Cargo.toml +++ b/flydra-mvg/Cargo.toml @@ -7,14 +7,13 @@ rust-version = "1.76" [dependencies] log = "0.4" -num-traits = "0.2" -nalgebra = { version = "0.32", features = ["serde-serialize"] } -parry3d-f64 = "0.13.5" -alga = "0.9" +num-traits = { workspace = true } +nalgebra = { workspace = true, features = ["serde-serialize"] } +parry3d-f64 = { workspace = true, features = ["default"] } serde = { version = "1.0", features = ["derive"] } serde-xml-rs = "0.5" # TODO: switch to https://crates.io/crates/quick-xml -cam-geom = { version = "0.14", features = ["serde-serialize"] } -opencv-ros-camera = { version = "0.14", features = ["serde-serialize"] } +cam-geom = { workspace = true, features = ["serde-serialize"] } +opencv-ros-camera = { workspace = true, features = ["serde-serialize"] } mvg = { path = "../mvg" } refraction = { path = "../refraction" } diff --git a/flydra-mvg/src/lib.rs b/flydra-mvg/src/lib.rs index f1eb59c1f..2c561b442 100644 --- a/flydra-mvg/src/lib.rs +++ b/flydra-mvg/src/lib.rs @@ -332,7 +332,7 @@ impl MultiCamera { pub fn project_3d_to_distorted_pixel(&self, pt3d: &PointWorldFrame) -> DistortedPixel where - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { let undistorted = self.project_3d_to_pixel(pt3d); let u2: opencv_ros_camera::UndistortedPixels = (&undistorted).into(); diff --git a/flydra-types/Cargo.toml b/flydra-types/Cargo.toml index 2c9ff9467..6fd251e69 100644 --- a/flydra-types/Cargo.toml +++ b/flydra-types/Cargo.toml @@ -23,7 +23,7 @@ bytes = { version = "1.0", optional = true } bitflags = "1.0" ordered-float = { version = "3.0.0", features = ["serde"] } static_assertions = "1.1.0" -nalgebra = { version = "0.32", features = ["serde-serialize"] } +nalgebra = { workspace = true, features = ["serde-serialize"] } num-integer = "0.1" http = "1" if-addrs = { version = "0.11.0", optional = true } diff --git a/flydra2/Cargo.toml b/flydra2/Cargo.toml index 8a2b182a2..0c1593e19 100644 --- a/flydra2/Cargo.toml +++ b/flydra2/Cargo.toml @@ -30,9 +30,8 @@ serde_json = "1.0.29" serde_yaml = "0.9" toml = "0.5" dyn-clone = "1.0.11" -nalgebra = { version = "0.32", features = ["serde-serialize"] } -parry3d-f64 = "0.13.5" -alga = "0.9" +nalgebra = { workspace = true, features = ["serde-serialize"] } +parry3d-f64 = { workspace = true, features = ["default"] } configure = "0.1.1" itertools = "0.8" axum = "0.7.4" @@ -60,9 +59,9 @@ hyper-util = { version = "0.1.1", features = [ http-body-util = "0.1.0" bytes = "1.5.0" http-body = "1.0.0" -adskalman = "0.15" +adskalman = { workspace = true } pretty-print-nalgebra = "0.1.0" -nalgebra-mvn = "0.14" +nalgebra-mvn = { workspace = true } iana-time-zone = "0.1" tower-http = { version = "0.5.0", features = ["fs"], optional = true } tower-serve-static = { version = "0.1", optional = true } diff --git a/flydra2/src/flydra2.rs b/flydra2/src/flydra2.rs index af8f63586..e1c144e46 100644 --- a/flydra2/src/flydra2.rs +++ b/flydra2/src/flydra2.rs @@ -20,12 +20,11 @@ use hdrhistogram::{ use libflate::finish::AutoFinishUnchecked; use libflate::gzip::Encoder; -use nalgebra::core::dimension::{U1, U2, U3, U6}; -use nalgebra::{OMatrix, OVector, Point3, Vector6}; - -use nalgebra::allocator::Allocator; -use nalgebra::core::dimension::DimMin; -use nalgebra::{DefaultAllocator, RealField}; +use nalgebra::{ + allocator::Allocator, + dimension::{DimMin, U1, U2, U3, U6}, + DefaultAllocator, OMatrix, OVector, Point3, RealField, Vector6, +}; #[allow(unused_imports)] use mvg::{DistortedPixel, PointWorldFrame, PointWorldFrameWithSumReprojError}; @@ -137,13 +136,12 @@ where impl adskalman::ObservationModel for CameraObservationModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator<(usize, usize), U2>, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, U2: DimMin, R: RealField + Copy + Default + serde::Serialize, { diff --git a/flytrax-csv-to-braidz/Cargo.toml b/flytrax-csv-to-braidz/Cargo.toml index d74ccfa40..98ca76331 100644 --- a/flytrax-csv-to-braidz/Cargo.toml +++ b/flytrax-csv-to-braidz/Cargo.toml @@ -20,8 +20,7 @@ serde_derive = "1.0.79" serde_json = "1.0.29" serde_yaml = "0.9" toml = "0.5" -nalgebra = { version = "0.32", features = ["serde-serialize"] } -alga = "0.9" +nalgebra = { workspace = true, features = ["serde-serialize"] } configure = "0.1.1" itertools = "0.8" lazy_static = "1.4.0" @@ -33,7 +32,7 @@ image = { version = "0.24.2", default-features = false, features = [ "jpeg", "png", ] } -opencv-ros-camera = { version = "0.14", features = ["serde-serialize"] } +opencv-ros-camera = { workspace = true, features = ["serde-serialize"] } datetime-conversion = { path = "../datetime-conversion" } env-tracing-logger = { path = "../env-tracing-logger" } diff --git a/freemovr-calibration/Cargo.toml b/freemovr-calibration/Cargo.toml index 0024f2e33..5e65776a6 100644 --- a/freemovr-calibration/Cargo.toml +++ b/freemovr-calibration/Cargo.toml @@ -13,14 +13,11 @@ serde = "1.0" serde_derive = "1.0" serde_yaml = "0.9" serde_json = "1.0" -alga = "0.9" -nalgebra = "0.32" -ncollide2d = { package = "ncollide2d-updated", version = "0.35.0" } -ncollide3d = { package = "ncollide3d-updated", version = "0.35.0", features = [ - "serde-serialize", -] } -cam-geom = "0.14" -opencv-ros-camera = "0.14" +nalgebra = { workspace = true } +ncollide2d = { workspace = true, features = ["default"] } +ncollide3d = { workspace = true, features = ["default", "serde-serialize"] } +cam-geom = { workspace = true } +opencv-ros-camera = { workspace = true } genmesh = "0.6" obj = { version = "0.10", features = ["genmesh"] } byteorder = "1.2.2" @@ -33,7 +30,7 @@ chrono = { version = "0.4.23", default-features = false, features = [ "wasmbind", ] } -dlt = "0.12" +dlt = { workspace = true, features = ["default"] } mvg = { path = "../mvg", features = ["serde-serialize"] } camcal = { path = "../camcal", optional = true } opencv-calibrate = { path = "../opencv-calibrate", optional = true } diff --git a/freemovr-calibration/freemovr-calibration-cli/Cargo.toml b/freemovr-calibration/freemovr-calibration-cli/Cargo.toml index 5922ad5d8..6c2c34622 100644 --- a/freemovr-calibration/freemovr-calibration-cli/Cargo.toml +++ b/freemovr-calibration/freemovr-calibration-cli/Cargo.toml @@ -15,10 +15,10 @@ anyhow = "1" log = "0.4" env_logger = "0.10" clap = { version = "4.3.4", features = ["derive"] } -nalgebra = "0.32" -ncollide2d = { package = "ncollide2d-updated", version = "0.35.0" } -cam-geom = "0.14" -opencv-ros-camera = "0.14" +nalgebra = { workspace = true } +ncollide2d = { workspace = true, features = ["default"] } +cam-geom = { workspace = true } +opencv-ros-camera = { workspace = true } chrono = { version = "0.4.23", default-features = false, features = [ "clock", "std", diff --git a/freemovr-calibration/freemovr-calibration-webapp/Cargo.toml b/freemovr-calibration/freemovr-calibration-webapp/Cargo.toml index 9e0f39174..5e461fa19 100644 --- a/freemovr-calibration/freemovr-calibration-webapp/Cargo.toml +++ b/freemovr-calibration/freemovr-calibration-webapp/Cargo.toml @@ -31,9 +31,7 @@ chrono = { version = "0.4.23", default-features = false, features = [ "std", "wasmbind", ] } -ncollide3d = { package = "ncollide3d-updated", version = "0.35.0", features = [ - "serde-serialize", -] } +ncollide3d = { workspace = true, features = ["default", "serde-serialize"] } mvg = { path = "../../mvg", features = ["serde-serialize"] } enum-iter = { path = "../../enum-iter" } diff --git a/freemovr-calibration/ncollide-geom/Cargo.toml b/freemovr-calibration/ncollide-geom/Cargo.toml index d68d0f02a..890c90867 100644 --- a/freemovr-calibration/ncollide-geom/Cargo.toml +++ b/freemovr-calibration/ncollide-geom/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" rust-version = "1.76" [dependencies] -ncollide2d = { package = "ncollide2d-updated", version = "0.35.0" } -delaunator = "0.2.0" -nalgebra = "0.32" +ncollide2d = { workspace = true, features = ["default"]} +delaunator = { workspace = true } +nalgebra = { workspace = true } diff --git a/media-utils/video2rrd/Cargo.toml b/media-utils/video2rrd/Cargo.toml index 9a95884e4..e137ad354 100644 --- a/media-utils/video2rrd/Cargo.toml +++ b/media-utils/video2rrd/Cargo.toml @@ -11,9 +11,9 @@ color-eyre = "0.6.2" tracing = "0.1.40" rerun = "0.17.0" -opencv-ros-camera = "0.14.1" -cam-geom = "0.14.1" -nalgebra = "0.32.4" +opencv-ros-camera = { workspace = true } +cam-geom = { workspace = true } +nalgebra = { workspace = true } regex = "1.10.3" ndarray = "0.15.6" machine-vision-formats = "0.1.1" diff --git a/mvg/Cargo.toml b/mvg/Cargo.toml index b11f9817a..ce4fc7d01 100644 --- a/mvg/Cargo.toml +++ b/mvg/Cargo.toml @@ -6,26 +6,26 @@ edition = "2021" rust-version = "1.76" [dependencies] -nalgebra = { version = "0.32", features = ["serde-serialize"] } -num-traits = "0.2" +nalgebra = { workspace = true, features = ["serde-serialize"] } +simba = { workspace = true, optional = true } +num-traits = { workspace = true } serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" serde_json = "1.0" thiserror = "1.0.33" -alga = "0.9" -cam-geom = { version = "0.14", features = ["serde-serialize"] } -opencv-ros-camera = { version = "0.14", features = ["serde-serialize"] } +cam-geom = { workspace = true, features = ["serde-serialize"] } +opencv-ros-camera = { workspace = true, features = ["serde-serialize"] } rerun = { version = "0.17", optional = true } glam = { version = "0.22", optional = true } [dev-dependencies] num-iter = "0.1" approx = "0.5" -dlt = "0.12" +dlt = { workspace = true } color-eyre = "0.6.2" [features] serde-serialize = [] backtrace = [] -rerun-io = ["rerun", "glam"] +rerun-io = ["rerun", "glam", "simba"] diff --git a/mvg/mvg-util/Cargo.toml b/mvg/mvg-util/Cargo.toml index 34d88803a..560fa14db 100644 --- a/mvg/mvg-util/Cargo.toml +++ b/mvg/mvg-util/Cargo.toml @@ -5,10 +5,10 @@ authors = ["Andrew Straw "] edition = "2021" [dependencies] -mvg = {path=".."} -flydra-mvg = {path="../../flydra-mvg"} +mvg = { path = ".." } +flydra-mvg = { path = "../../flydra-mvg" } clap = { version = "4.3.4", features = ["derive"] } -nalgebra = "0.32" +nalgebra = { workspace = true } pretty-print-nalgebra = "0.1.0" [features] diff --git a/mvg/src/camera.rs b/mvg/src/camera.rs index 08acae734..7c60230dc 100644 --- a/mvg/src/camera.rs +++ b/mvg/src/camera.rs @@ -426,8 +426,8 @@ impl Camera { dist: R, ) -> PointWorldFrame where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { let ray_cam = self.intrinsics().undistorted_pixel_to_camera(&pt2d.into()); let pt_cam = ray_cam.point_on_ray_at_distance(dist); diff --git a/mvg/src/intrinsics.rs b/mvg/src/intrinsics.rs index dc32a7e3a..437a51e2b 100644 --- a/mvg/src/intrinsics.rs +++ b/mvg/src/intrinsics.rs @@ -55,7 +55,7 @@ mod tests { #[test] fn test_mirror() where - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { use cam_geom::{IntrinsicParameters, Points}; use nalgebra::{OMatrix, U3, U7}; diff --git a/mvg/src/lib.rs b/mvg/src/lib.rs index 8d364b3aa..b8ddb1a25 100644 --- a/mvg/src/lib.rs +++ b/mvg/src/lib.rs @@ -148,7 +148,7 @@ where impl From<&DistortedPixel> for cam_geom::Pixels> where R: RealField + Copy, - na::DefaultAllocator: na::allocator::Allocator, + na::DefaultAllocator: na::allocator::Allocator, { fn from(orig: &DistortedPixel) -> Self { Self { @@ -201,7 +201,7 @@ impl From<&UndistortedPixel> for opencv_ros_camera::UndistortedPixels> where R: RealField + Copy, - na::DefaultAllocator: na::allocator::Allocator, + na::DefaultAllocator: na::allocator::Allocator, { fn from(orig: &UndistortedPixel) -> Self { Self { @@ -249,7 +249,7 @@ impl From<&PointCameraFrame> > where R: RealField + Copy, - na::DefaultAllocator: na::allocator::Allocator, + na::DefaultAllocator: na::allocator::Allocator, { fn from(orig: &PointCameraFrame) -> Self { Self::new(na::OMatrix::::new( @@ -299,7 +299,7 @@ impl From<&PointWorldFrame> > where R: RealField + Copy, - na::DefaultAllocator: na::allocator::Allocator, + na::DefaultAllocator: na::allocator::Allocator, { fn from(orig: &PointWorldFrame) -> Self { Self::new(na::OMatrix::::new( diff --git a/mvg/src/pymvg_support.rs b/mvg/src/pymvg_support.rs index d4b44b144..0014aea78 100644 --- a/mvg/src/pymvg_support.rs +++ b/mvg/src/pymvg_support.rs @@ -50,7 +50,7 @@ pub mod array_of_arrays { where R: RealField, S: Serializer, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, ROWS: DimName, COLS: DimName, { @@ -77,7 +77,7 @@ pub mod array_of_arrays { ) -> Result, D::Error> where D: Deserializer<'de>, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, ROWS: DimName, COLS: DimName, { diff --git a/mvg/src/rerun_io.rs b/mvg/src/rerun_io.rs index c2dcf9bd5..7587d94b4 100644 --- a/mvg/src/rerun_io.rs +++ b/mvg/src/rerun_io.rs @@ -15,7 +15,7 @@ where { #[inline] fn f32(&self) -> f32 { - self.to_subset().unwrap() as f32 + >::to_subset(self).unwrap() } } diff --git a/mvg/tests/pmat-regress.rs b/mvg/tests/pmat-regress.rs index a6ffae18c..7df71cce3 100644 --- a/mvg/tests/pmat-regress.rs +++ b/mvg/tests/pmat-regress.rs @@ -1,4 +1,3 @@ -extern crate alga; extern crate approx; extern crate nalgebra as na; extern crate num_iter; diff --git a/parry-geom/Cargo.toml b/parry-geom/Cargo.toml index 1974fd503..575a1a1c4 100644 --- a/parry-geom/Cargo.toml +++ b/parry-geom/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" rust-version = "1.76" [dependencies] -parry2d-f64 = "0.13.5" -delaunator = "0.2.0" -nalgebra = "0.32" +parry2d-f64 = { workspace = true, features = ["default"] } +delaunator = { workspace = true } +nalgebra = { workspace = true } diff --git a/refraction/Cargo.toml b/refraction/Cargo.toml index 228e393bb..643bcff27 100644 --- a/refraction/Cargo.toml +++ b/refraction/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" rust-version = "1.76" [dependencies] -simba = { version = "0.8", default-features = false, features = ["libm"] } +simba = { workspace = true, default-features = false, features = ["libm"] } bisection-search = { path = "../bisection-search" } diff --git a/simple-obj-parse/Cargo.toml b/simple-obj-parse/Cargo.toml index db298e5d7..b4a6638dd 100644 --- a/simple-obj-parse/Cargo.toml +++ b/simple-obj-parse/Cargo.toml @@ -6,10 +6,8 @@ edition = "2021" rust-version = "1.76" [dependencies] -nalgebra = "0.32" -ncollide3d = { package = "ncollide3d-updated", version = "0.35.0", features = [ - "serde-serialize", -] } +nalgebra = { workspace = true } +ncollide3d = { workspace = true, features = ["default", "serde-serialize"] } textured-tri-mesh = { path = "../textured-tri-mesh" } genmesh = "0.6" obj = { version = "0.10", features = ["genmesh"] } diff --git a/strand-cam-pseudo-cal/Cargo.toml b/strand-cam-pseudo-cal/Cargo.toml index b0e26ac61..3e170181a 100644 --- a/strand-cam-pseudo-cal/Cargo.toml +++ b/strand-cam-pseudo-cal/Cargo.toml @@ -7,9 +7,9 @@ rust-version = "1.76" [dependencies] serde_json = "1.0.29" -nalgebra = "0.32" -opencv-ros-camera = "0.14" -cam-geom = "0.14" +nalgebra = { workspace = true } +opencv-ros-camera = { workspace = true } +cam-geom = { workspace = true } mvg = { path = "../mvg" } flydra-mvg = { path = "../flydra-mvg" } diff --git a/strand-cam/Cargo.toml b/strand-cam/Cargo.toml index 0bb313ea7..1f154b2b6 100644 --- a/strand-cam/Cargo.toml +++ b/strand-cam/Cargo.toml @@ -86,10 +86,9 @@ mvg = { path = "../mvg", optional = true } flydra-mvg = { path = "../flydra-mvg", optional = true } tokio-serial = { version = "5.4.3" } bytes = "1.0" -nalgebra = "0.32.1" -lstsq = "0.5.0" -opencv-ros-camera = "0.14" -alga = { version = "0.9", optional = true } +nalgebra = { workspace = true } +lstsq = { workspace = true } +opencv-ros-camera = { workspace = true } approx = { version = "0.5", optional = true } byteorder = "1.4" target = "2.0.0" @@ -169,7 +168,6 @@ flydratrax = [ "strand-cam-pseudo-cal", "flydra-mvg", "approx", - "alga", "flydra2", "flydra_feat_detect", ] diff --git a/strand-cam/strand-cam-offline-checkerboards/Cargo.toml b/strand-cam/strand-cam-offline-checkerboards/Cargo.toml index 5efe4b9c0..16ab67ce1 100644 --- a/strand-cam/strand-cam-offline-checkerboards/Cargo.toml +++ b/strand-cam/strand-cam-offline-checkerboards/Cargo.toml @@ -10,10 +10,10 @@ env_logger = "0.10.0" glob = "0.3.1" log = "0.4.17" image = { version = "0.24.5", default-features = false, features = ["png"] } -opencv-ros-camera = "0.14.0" +opencv-ros-camera = { workspace = true } serde_yaml = "0.9.19" -chrono = {version="0.4.23", default-features=false} +chrono = { version = "0.4.23", default-features = false } -strand-cam-storetype = {path = "../../strand-cam-storetype"} -opencv-calibrate = {path="../../opencv-calibrate"} -camcal = {path="../../camcal"} +strand-cam-storetype = { path = "../../strand-cam-storetype" } +opencv-calibrate = { path = "../../opencv-calibrate" } +camcal = { path = "../../camcal" } diff --git a/tracking/Cargo.toml b/tracking/Cargo.toml index 68e418788..e6f376378 100644 --- a/tracking/Cargo.toml +++ b/tracking/Cargo.toml @@ -6,9 +6,9 @@ edition = "2021" rust-version = "1.76" [dependencies] -adskalman = "0.15" -nalgebra = "0.32" -num-traits = "0.2" +adskalman = { workspace = true } +nalgebra = { workspace = true } +num-traits = { workspace = true } [dev-dependencies] approx = "0.5" diff --git a/tracking/src/flat_motion_model_3d.rs b/tracking/src/flat_motion_model_3d.rs index 7d8496e6a..8a3a1c03d 100644 --- a/tracking/src/flat_motion_model_3d.rs +++ b/tracking/src/flat_motion_model_3d.rs @@ -1,7 +1,7 @@ use num_traits::{One, Zero}; use nalgebra::allocator::Allocator; -use nalgebra::core::dimension::U6; +use nalgebra::dimension::U6; use nalgebra::{DefaultAllocator, OMatrix, RealField}; use crate::motion_model_3d_fixed_dt::MotionModel3D; @@ -16,16 +16,16 @@ use crate::motion_model_3d_fixed_dt::MotionModel3DFixedDt; #[derive(Debug, Clone)] pub struct FlatZZero3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { motion_noise_scale: R, } impl FlatZZero3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { pub fn new(motion_noise_scale: R) -> Self { Self { motion_noise_scale } @@ -34,8 +34,8 @@ where impl MotionModel3D for FlatZZero3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { fn calc_for_dt(&self, dt: R) -> MotionModel3DFixedDt { let zero: R = Zero::zero(); diff --git a/tracking/src/motion_model_3d.rs b/tracking/src/motion_model_3d.rs index 60c97b59b..e928024b0 100644 --- a/tracking/src/motion_model_3d.rs +++ b/tracking/src/motion_model_3d.rs @@ -1,8 +1,6 @@ use num_traits::{One, Zero}; -use nalgebra::allocator::Allocator; -use nalgebra::core::dimension::U6; -use nalgebra::{DefaultAllocator, OMatrix, RealField}; +use nalgebra::{allocator::Allocator, dimension::U6, DefaultAllocator, OMatrix, RealField}; use crate::motion_model_3d_fixed_dt::MotionModel3D; use crate::motion_model_3d_fixed_dt::MotionModel3DFixedDt; @@ -16,16 +14,16 @@ use crate::motion_model_3d_fixed_dt::MotionModel3DFixedDt; #[derive(Debug, Clone)] pub struct ConstantVelocity3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { motion_noise_scale: R, } impl ConstantVelocity3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { pub fn new(motion_noise_scale: R) -> Self { Self { motion_noise_scale } @@ -34,8 +32,8 @@ where impl MotionModel3D for ConstantVelocity3DModel where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { fn calc_for_dt(&self, dt: R) -> MotionModel3DFixedDt { let zero: R = Zero::zero(); diff --git a/tracking/src/motion_model_3d_fixed_dt.rs b/tracking/src/motion_model_3d_fixed_dt.rs index 0f62efff8..4212b2a27 100644 --- a/tracking/src/motion_model_3d_fixed_dt.rs +++ b/tracking/src/motion_model_3d_fixed_dt.rs @@ -1,7 +1,5 @@ use nalgebra as na; -use nalgebra::allocator::Allocator; -use nalgebra::core::dimension::U6; -use nalgebra::{DefaultAllocator, OMatrix, RealField}; +use nalgebra::{allocator::Allocator, dimension::U6, DefaultAllocator, OMatrix, RealField}; use adskalman::TransitionModelLinearNoControl; @@ -11,8 +9,8 @@ use adskalman::TransitionModelLinearNoControl; #[derive(Debug, Clone)] pub struct MotionModel3DFixedDt where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { pub transition_model: OMatrix, pub transition_model_transpose: OMatrix, @@ -21,8 +19,8 @@ where impl TransitionModelLinearNoControl for MotionModel3DFixedDt where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, { fn F(&self) -> &OMatrix { &self.transition_model diff --git a/tracking/src/observation_model_2d.rs b/tracking/src/observation_model_2d.rs index b9f431674..16dbf669e 100644 --- a/tracking/src/observation_model_2d.rs +++ b/tracking/src/observation_model_2d.rs @@ -1,20 +1,21 @@ use num_traits::{One, Zero}; -use nalgebra::allocator::Allocator; -use nalgebra::core::dimension::DimMin; -use nalgebra::core::dimension::{U2, U4}; -use nalgebra::{DefaultAllocator, OMatrix, OVector, RealField}; +use nalgebra::{ + allocator::Allocator, + dimension::{DimMin, U2, U4}, + DefaultAllocator, OMatrix, OVector, RealField, +}; use adskalman::ObservationModel; #[derive(Debug)] -pub struct ObservationModel2D { +pub struct ObservationModel2D { observation_matrix: OMatrix, observation_matrix_transpose: OMatrix, observation_noise_covariance: OMatrix, } -impl ObservationModel2D { +impl ObservationModel2D { pub fn new(observation_noise_covariance: OMatrix) -> Self { let zero: R = Zero::zero(); let one: R = One::one(); @@ -32,15 +33,14 @@ impl ObservationModel2D { } } -impl ObservationModel for ObservationModel2D +impl ObservationModel for ObservationModel2D where - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator, - DefaultAllocator: Allocator<(usize, usize), U2>, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, + DefaultAllocator: Allocator, U2: DimMin, { fn H(&self) -> &OMatrix { diff --git a/tracking/tests/tests.rs b/tracking/tests/tests.rs index 50143e741..f64116c3c 100644 --- a/tracking/tests/tests.rs +++ b/tracking/tests/tests.rs @@ -1,7 +1,7 @@ extern crate nalgebra as na; use approx::assert_relative_eq; -use nalgebra::core::{Matrix6, Vector6}; +use nalgebra::{Matrix6, Vector6}; use adskalman::{StateAndCovariance, TransitionModelLinearNoControl};