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

Compilation error due to ncollide2d and ncollide3d #7

Closed
calebescobedo opened this issue May 31, 2022 · 4 comments
Closed

Compilation error due to ncollide2d and ncollide3d #7

calebescobedo opened this issue May 31, 2022 · 4 comments

Comments

@calebescobedo
Copy link

I'm trying to get the example simulation of CollisionIK working with the sawyer, but I can't get passed an error when compiling the core with cargo build in step 5.ii of the README.

The first error I get with ncollide2d is:

 error[E0310]: the parameter type `T` may not live long enough

   |
19 | impl<N: RealField, T> BroadPhasePairFilters<N, T> {
   |                    - help: consider adding an explicit lifetime bound...: `T: 'static`
...
68 |             .all(|&(_, ref f)| f.is_pair_valid(b1, b2))
   |                                  ^^^^^^^^^^^^^ ...so that the type `dyn BroadPhasePairFilter<N, T>` will meet its required lifetime bounds...
   |
note: ...that is required by this bound

This comes from ncollide2d-0.19.2/src/pipeline/broad_phase/broad_phase_pair_filter.rs:68:34

I'm using Ubuntu 18.04 LTS, cmake 3.23.2, and cargo 1.61.0

I also tried this on Ubuntu 20.04 and got the same error while trying to get my simulation set up. I updated my cmake version as noted in #1 and setup the git submodule with the info from #2.

Please let me know if you have any ideas of how to deal with this error.

@yepw
Copy link
Collaborator

yepw commented Jun 12, 2022

I was having the same error. Rolling cargo back to version 1.58.1 solved the problem.

@calebescobedo
Copy link
Author

Thanks @yepw that work for me.

I followed this pose for anyone looking to change their cargo version: https://stackoverflow.com/questions/69234898/downgrade-version-of-cargo

@dashuaip
Copy link

dashuaip commented Jun 5, 2024

It is not useful now.

@youssifashraf
Copy link

youssifashraf commented Jan 3, 2025

I resolved the issue by downgrading Cargo to version 1.59.0. Additionally, I updated the Cargo.toml file to align with the required dependencies and ensure compatibility. Below is the current Cargo.toml configuration:

[package]
name = "relaxed_ik_core"
version = "0.1.0"
authors = ["djrakita <[email protected]>"]
edition = "2018"

[dependencies]
nalgebra = "0.19"
yaml-rust = "0.4"
optimization_engine = "0.6.0"
ndarray = "0.13.0"
num = "0.2.0"
nlopt = "0.5.1"
time = "0.1"
kdtree = "0.6.0"
vpsearch = "1.3.5"
ndarray-rand = "0.11.0"
rand = "0.7.2"
ncollide2d = "0.19"
ncollide3d = "0.21.0"
path-slash = "0.1.2"
lazy_static = "1.4.0"
ppv-lite86 = "=0.2.16"
libm = "=0.2.8"      # Compatible with Rust 1.59.0
cc = "=1.0.72"       # Compatible with Rust 1.59.0
libc = "=0.2.108"    # Compatible with Rust 1.59.0
byteorder = "=1.4.3" # Compatible with Rust 1.59.0

[profile.dev]
opt-level = 3

[profile.release]
opt-level = 3

[lib]
name = "relaxed_ik_lib"
path = "src/lib.rs"
crate-type = ["rlib", "dylib"]

[[bin]]
name = "relaxed_ik_bin"
path = "src/bin/relaxed_ik_bin.rs"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants