CARL -- an initialism of Classical Action Recognition Library -- is a C++ library for generalized action recognition, primarily intended to enable power "gesture recognition" in XR applications.
CARL uses CMake for build system generation and Git submodules to provide dependencies. Substituting other build systems and dependency approaches, such as Buck, is fairly straightforward but is not discussed in this document.
- Clone the repo:
git clone https://github.com/facebookexperimental/CARL.git
- Navigate into the repo:
cd CARL
- Install dependencies:
git submodule update --init --recursive
- Create and navigate to the build directory:
cd .. mkdir CARL_build cd CARL_build
- Invoke CMake to generate your preferred build system. For example, on
Windows with VS2019 installed, default arguments will generate a Visual
Studio Solution called
carl.sln
.cmake ../CARL
These instructions are known to work on Linux. Note that this only works on a full real Linux install; the NDK CMake integration does not currently seem to work well on Windows Subsystem for Linux, unfortunately.
- Download and unzip the NDK.
- Set up a CARL repository as described above, omitting the build system creation.
- Invoke CMake using
CMake's built-in Android integration.
If you need to choose Android platform settings other than the
defaults, they should likely be specified in this step.
Note: use of the the
cmake ../CARL -D CMAKE_SYSTEM_NAME=Android -D CMAKE_BUILD_TYPE=Release -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" -D CMAKE_ANDROID_NDK=[NDK root directory]
CMAKE_BUILD_TYPE
andCMAKE_ANDROID_ARCH_ABI
variables as shown above is recommended when building CARL for use as a Unity plugin on the Meta Quest 3; in particular, neglecting to specify an ABI matching that of your app can cause Unity to fail to load the library at runtime, which can be tricky to diagnose. Strictly speaking, however, specifying these variables is not required and they can be omitted in situations where their default values are appropriate. - Build the
carl_shared_library
target to produce a.so
which can be used in Android applications.make carl_shared_library
- Set up Emscripten using the recommended emsdk instructions. On Windows, it is highly recommended to do this using the Windows Subsystem for Linux to set up the build in a Unix-like environment.
- Set up a CARL repository as described above, omitting the build system creation.
- Invoke CMake using the Emscripten toolchain to generate a WebAssembly
build system.
cmake ../CARL -D CMAKE_TOOLCHAIN_FILE=[TODO: Insert directory path here]/Emscripten.cmake
- Build the
carl_static_library
target to produce the WebAssembly artifacts. Depending on your Shell's permissions, you may need to addsudo
as follows:emmake sudo make carl_static_library
TODO: Information coming soon.
CARL itself is licensed under the MIT license. CARL has three source dependencies:
- arcana.cpp: Arcana is a lightweight C++ utility library published and maintained by Microsoft. It is made available under the MIT License.
- GSL: The Guidelines Support Library is another lightweight C++ utility library published and maintained by Microsoft. It is also available under the MIT License.
- Eigen: Eigen is an advanced mathematics library providing various linear algebra and 3D arithmetic features. It is available under several licenses, but CARL specifically depends on the MPL2 subset and so uses Eigen under the Mozilla Public License 2.0.
Development of CARL happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving CARL.