vcg-uvic / viper

Open-source code for VIPER -- Volume Invariant Position-based Elastic Rods
Apache License 2.0
903 stars 105 forks source link

strange result of simulation #18

Open ElonKou opened 1 year ago

ElonKou commented 1 year ago

Thanks for your great work, I found that the project use some old version of dependencies, that I can't compile succed on my machine:

OS : Ubuntu 20.04 g++ : 10.3.0 Driver Version: 510.108.03
CUDA Version: 11.6 GPU: RTX 3060 ti

after I check the error information of compile, I add these options and compile succed.

set(CUDA_NVCC_FLAGS "-std=c++14 -extended-lambda")
set(CMAKE_BUILD_TYPE "Release")
add_compile_options(-std=c++14)
...
include_directories(
    ...
    /usr/include/eigen3
}

find_package(CGAL REQUIRED COMPONENTS Core)
target_link_libraries(ViperLib_static ${COMMON_LIBS} CGAL::CGAL CGAL::CGAL_Core Boost::thread gmp mpfr)
...

I also add header files.

// Viper/CudaUtils.cuh
#include <thrust/host_vector.h>

But when I run the ./demo at build folder, the simulated result looks like strange(as picture shows), It seems the octoswarm doesn't has the length constraint at two nodes, how could I solve this queation? I also tryd the nvidia-docker to compile the code , but my GPU is RTX 3060 ti, it only support CUDA 11.X, would you please provide a new version of code that runs well on RTX GPU cards or other advices to fixed this problem? thank you!

Screenshot from 2023-04-10 21-01-00