alanross / AlvaAR

World tracking for WebAR. A Javascript library for Augmented Reality to run SLAM in the browser.
GNU General Public License v3.0
349 stars 73 forks source link

build error #10

Open yuancaimaiyi opened 1 year ago

yuancaimaiyi commented 1 year ago

@alanross
When I compile AlvaAR with In the examples, I encountered the following error (my libs and slam were compiled successfully), can you give me help, or give me the dockerfile of this project? image

alanross commented 1 year ago

@yuancaimaiyi, Thank you for highlighting this issue. The package.json lacked the fs module, but it should be resolved now.

yuancaimaiyi commented 1 year ago

@alanross
Thank you very much for your answer. But I reported another error in npm start, as follows: image Therefore, my suggestion can provide a dockerfile? so that anyone who builds this project will not have to worry about the environment. In addition, I noticed that the slam algorithm of this project is not robust enough, as follows:

  1. The frame rate is not high
  2. Lack of imu constraints If I run through the project, I plan to use snake-slam (https://github.com/darglein/Snake-SLAM) --- a very well-engineered vio slam with some very good features in it Can be integrated into AlvaAR
alanross commented 1 year ago

It seems you might be using an outdated version of Node. Try upgrading it, it might resolve the issue. You can check your current version by typing node --version into your terminal.

There are many excellent SLAM libraries available. However, most of these, including Snake-SLAM, rely on multithreading and on a large vocabulary file for their Bag-of-Words models(> 60MB). Unfortunately, both of these requirements aren't suitable for the web. Additionally, the IMU-integrated solutions that I've encountered work with data update rates higher than 120 Hz (EuRoC datasets have 200Hz). Yet, mobile devices appear to deliver IMU data at around 60Hz, which diminishes the effectiveness of this data.

luoxz-ai commented 1 year ago

image image image image

luoxz-ai commented 1 year ago

image

Compilation fails, can you give a detailed configuration environment?

luoxz-ai commented 1 year ago

Compilation fails, can you give a detailed configuration environment?

alanross commented 1 year ago

Thanks for detailed info @luoxz-ai. Unfortunately I can't reproduce your issue as I've only built the project on OSX. All the configuration that occurs is in the respective CMakeLists.txt files and build.sh.

Have you tried compiling OpenCV individually on your machine? This might provide some hints how to resolve the issue.

luoxz-ai commented 1 year ago

Hello, thank you very much for your reply, I have compiled each dependent module separately, and found that only OpenCV and SOPHUS can be compiled, and other dependent library modules cannot be compiled

image

luoxz-ai commented 1 year ago

Which version of Emscripten SDK are you using? It may be a problem with this version. I use the latest version. I tested it on MacOS, but it failed to compile. The result is the same as ubuntu. Can you tell me the versions of all your environments and dependent packages?

luoxz-ai commented 1 year ago

emcmake cmake build failed, It may be related to emsdk version, or project dependencies

alanross commented 1 year ago

I think so too @luoxz-ai. The emsdk version is the likely cause of the issue. I encountered the same problem after updating to the latest version (3.1.41). Try downgrading to 3.0.0 and let me know if that works for you.

$: emsdk install 3.0.0
$: emsdk activate 3.0.0
luoxz-ai commented 1 year ago

image image

It still fails, it may be because of the version of emsdk that the project file cannot be generated

luoxz-ai commented 1 year ago

image

Maybe it has something to do with the cmake version?

create-li commented 1 year ago

image image

It still fails, it may be because of the version of emsdk that the project file cannot be generated

I also encountered the same problem, as eigen and ceres cannot compile On ubuntu20.0 ,Emsdk=3.0.0 node=16.0 Have you solved it?