Git Product home page Git Product logo

mpc-rs's Introduction

mpc-rs's People

Contributors

qhdwight avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

mpc-rs's Issues

Trait `Interpolate<f64>` not implemented for `Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>`

Cloning and compiling under Ubuntu with rustc 1.78.0 (9b00956e5 2024-04-29) leads to a trait bound violation:

   Compiling mpc-rs v0.1.0 (/home/timtro/rustl/mpc-rs)
error[E0277]: the trait bound `Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>: Interpolate<f64>` is not satisfied
   --> src/controller.rs:159:34
    |
159 | ...        .map(|i| self.spline.clamped_sample(t + i as f64 * self.dt).expect("Failed to sa...
    |                                 ^^^^^^^^^^^^^^ the trait `Interpolate<f64>` is not implemented for `Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>`
    |
    = help: the following other types implement trait `Interpolate<T>`:
              <f32 as Interpolate<f32>>
              <f64 as Interpolate<f32>>
              <f64 as Interpolate<f64>>
              <nalgebra::base::matrix::Matrix<f32, nalgebra::base::dimension::Const<1>, nalgebra::base::dimension::Const<1>, nalgebra::base::array_storage::ArrayStorage<f32, 1, 1>> as Interpolate<f32>>
              <nalgebra::base::matrix::Matrix<f32, nalgebra::base::dimension::Const<2>, nalgebra::base::dimension::Const<1>, nalgebra::base::array_storage::ArrayStorage<f32, 2, 1>> as Interpolate<f32>>
              <nalgebra::base::matrix::Matrix<f32, nalgebra::base::dimension::Const<3>, nalgebra::base::dimension::Const<1>, nalgebra::base::array_storage::ArrayStorage<f32, 3, 1>> as Interpolate<f32>>
              <nalgebra::base::matrix::Matrix<f32, nalgebra::base::dimension::Const<4>, nalgebra::base::dimension::Const<1>, nalgebra::base::array_storage::ArrayStorage<f32, 4, 1>> as Interpolate<f32>>
              <nalgebra::base::matrix::Matrix<f32, nalgebra::base::dimension::Const<5>, nalgebra::base::dimension::Const<1>, nalgebra::base::array_storage::ArrayStorage<f32, 5, 1>> as Interpolate<f32>>
            and 9 others
note: required by a bound in `Spline::<T, V>::clamped_sample`
   --> /home/timtro/.cargo/registry/src/index.crates.io-6f17d22bba15001f/splines-4.3.1/src/spline.rs:248:8
    |
245 |   pub fn clamped_sample(&self, t: T) -> Option<V>
    |          -------------- required by a bound in this associated function
...
248 |     V: Interpolate<T>,
    |        ^^^^^^^^^^^^^^ required by this bound in `Spline::<T, V>::clamped_sample`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `mpc-rs` (lib) due to 1 previous error

I'm just learning Rust, so I haven't put together a fix/PR yet.

I see that in Cargo.toml you have selected the 'naglebra' feature of the splines crate, so I'm not sure what's going wrong. But happy to help, given some direction.

I'll keep chipping away until I can be useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.