Skip to content

Commit

Permalink
simplify dependencies and update to nalgebra 0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Aug 5, 2024
1 parent 46f768c commit 2b6c782
Show file tree
Hide file tree
Showing 40 changed files with 149 additions and 152 deletions.
18 changes: 17 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 1 addition & 1 deletion bisection-search/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
8 changes: 4 additions & 4 deletions braid-april-cal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions braid-april-cal/flytrax-apriltags-calibration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion braid-process-video/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
6 changes: 3 additions & 3 deletions braidz-export-rrd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions camcal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 1 addition & 1 deletion fastimage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions flydra-feature-detector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
11 changes: 5 additions & 6 deletions flydra-mvg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion flydra-mvg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl<R: RealField + Copy + Default + serde::Serialize> MultiCamera<R> {

pub fn project_3d_to_distorted_pixel(&self, pt3d: &PointWorldFrame<R>) -> DistortedPixel<R>
where
DefaultAllocator: Allocator<R, U1, U2>,
DefaultAllocator: Allocator<U1, U2>,
{
let undistorted = self.project_3d_to_pixel(pt3d);
let u2: opencv_ros_camera::UndistortedPixels<R, U1, _> = (&undistorted).into();
Expand Down
2 changes: 1 addition & 1 deletion flydra-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
9 changes: 4 additions & 5 deletions flydra2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }
Expand Down
24 changes: 11 additions & 13 deletions flydra2/src/flydra2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -137,13 +136,12 @@ where

impl<R> adskalman::ObservationModel<R, U6, U2> for CameraObservationModel<R>
where
DefaultAllocator: Allocator<R, U6, U6>,
DefaultAllocator: Allocator<R, U6>,
DefaultAllocator: Allocator<R, U2, U6>,
DefaultAllocator: Allocator<R, U6, U2>,
DefaultAllocator: Allocator<R, U2, U2>,
DefaultAllocator: Allocator<R, U2>,
DefaultAllocator: Allocator<(usize, usize), U2>,
DefaultAllocator: Allocator<U6, U6>,
DefaultAllocator: Allocator<U6>,
DefaultAllocator: Allocator<U2, U6>,
DefaultAllocator: Allocator<U6, U2>,
DefaultAllocator: Allocator<U2, U2>,
DefaultAllocator: Allocator<U2>,
U2: DimMin<U2, Output = U2>,
R: RealField + Copy + Default + serde::Serialize,
{
Expand Down
5 changes: 2 additions & 3 deletions flytrax-csv-to-braidz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand Down
15 changes: 6 additions & 9 deletions freemovr-calibration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions freemovr-calibration/freemovr-calibration-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions freemovr-calibration/freemovr-calibration-webapp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
6 changes: 3 additions & 3 deletions freemovr-calibration/ncollide-geom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
6 changes: 3 additions & 3 deletions media-utils/video2rrd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions mvg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 3 additions & 3 deletions mvg/mvg-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["Andrew Straw <[email protected]>"]
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]
Expand Down
4 changes: 2 additions & 2 deletions mvg/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ impl<R: RealField + Copy> Camera<R> {
dist: R,
) -> PointWorldFrame<R>
where
DefaultAllocator: Allocator<R, U1, U2>,
DefaultAllocator: Allocator<R, U1, U3>,
DefaultAllocator: Allocator<U1, U2>,
DefaultAllocator: Allocator<U1, U3>,
{
let ray_cam = self.intrinsics().undistorted_pixel_to_camera(&pt2d.into());
let pt_cam = ray_cam.point_on_ray_at_distance(dist);
Expand Down
2 changes: 1 addition & 1 deletion mvg/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mod tests {
#[test]
fn test_mirror()
where
DefaultAllocator: Allocator<f64, U7, U3>,
DefaultAllocator: Allocator<U7, U3>,
{
use cam_geom::{IntrinsicParameters, Points};
use nalgebra::{OMatrix, U3, U7};
Expand Down
Loading

0 comments on commit 2b6c782

Please sign in to comment.