### Quick Example: Import and List Geometry Module Source: https://github.com/facebookresearch/momentum/blob/main/README.md Installs pymomentum via conda and then imports and lists the contents of the geometry module. ```bash # Install and run conda install -c conda-forge pymomentum python -c "import pymomentum.geometry as geom; print(dir(geom))" ``` -------------------------------- ### Warning for Install Examples Without Building Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Checks if MOMENTUM_INSTALL_EXAMPLES is ON while MOMENTUM_BUILD_EXAMPLES is OFF. If so, it issues a warning indicating that no examples will be built or installed. ```cmake if(MOMENTUM_INSTALL_EXAMPLES AND NOT MOMENTUM_BUILD_EXAMPLES) message(WARNING "MOMENTUM_INSTALL_EXAMPLES is ON, but MOMENTUM_BUILD_EXAMPLES is OFF. No examples will be built or installed.") endif() ``` -------------------------------- ### Run Other Examples Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md View help for running other examples, such as the glb_viewer. Refer to the Examples page for a full list. ```bash pixi run glb_viewer --help ``` -------------------------------- ### Run Hello World Example Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Execute the 'hello_world' example using Pixi. Alternatively, you can run the executable directly from the build directory. ```bash pixi run hello_world ``` ```bash # Linux and macOS ./build/hello_world # Windows ./build/Release/hello_world.exe ``` -------------------------------- ### Start Local Development Server Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/README.md Starts a local development server. Changes are reflected live without a server restart. ```bash $ yarn start ``` -------------------------------- ### Clone and Setup Repository Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Clone the repository and set up the upstream remote for fetching changes. ```bash git clone https://github.com/YOUR_USERNAME/momentum.git cd momentum git remote add upstream https://github.com/facebookresearch/momentum.git ``` -------------------------------- ### Setting up Environment with Pixi Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/04_conda_publishing.md Command to install project dependencies using the pixi package manager. ```bash pixi install ``` -------------------------------- ### Install Rerun SDK Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Install the Rerun SDK using pixi. Ensure the version matches the one used by Momentum. ```bash pixi global install rerun-sdk== ``` -------------------------------- ### Install PyMomentum with uv or pip Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Install PyMomentum from PyPI using uv (recommended) or pip. Explicitly choose CPU or GPU versions. ```bash # Using uv (preferred over pip) uv add pymomentum-cpu # CPU version uv add pymomentum-gpu # GPU version (requires CUDA) # Alternative: Using pip pip install pymomentum-cpu pip install pymomentum-gpu ``` -------------------------------- ### Install Momentum with Conda/Pixi Source: https://github.com/facebookresearch/momentum/blob/main/README.md Recommended installation methods using Conda or Pixi for Python and C++. ```bash pixi add pymomentum # Auto-detects GPU/CPU conda install -c conda-forge pymomentum ``` ```bash # C++ (Conda/Pixi) pixi add momentum-cpp conda install -c conda-forge momentum-cpp ``` -------------------------------- ### Install Momentum Headers Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Installs the header files for the Momentum library. It excludes example, test, and website-related directories to keep the installation clean. ```cmake install( DIRECTORY momentum DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT headers FILES_MATCHING PATTERN "*.h" PATTERN "*/examples/*" EXCLUDE PATTERN "*/test/*" EXCLUDE PATTERN "*/website/*" EXCLUDE ) ``` -------------------------------- ### Install Momentum with PyPI (Experimental) Source: https://github.com/facebookresearch/momentum/blob/main/README.md Experimental installation using pip for CPU or GPU versions. Use Conda or Pixi for a more stable experience. ```bash pip install pymomentum-cpu # CPU version ``` ```bash pip install pymomentum-gpu # GPU version with CUDA ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/README.md Run this command to install project dependencies using Yarn. ```bash $ yarn ``` -------------------------------- ### Install Momentum Targets (Libraries) Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Installs the Momentum libraries, exporting them with the 'momentumTargets' target and setting up runtime, archive, and library destinations. It also installs the export set. ```cmake install( TARGETS ${targets} EXPORT momentumTargets RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) install( EXPORT momentumTargets NAMESPACE momentum:: DESTINATION ${MOMENTUM_CONFIG_INSTALL_DIR} ) ``` -------------------------------- ### Tests, Tutorials, and Examples Header Inclusion Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/04_developer_guide/02_style_guide.md Use angle brackets for header inclusion in tests, tutorials, and example code. This mirrors the external user experience and demonstrates correct header usage for installed libraries. ```cpp // In test files, tutorials, and examples #include #include ``` -------------------------------- ### Build Momentum from Source Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Build the Momentum C++ project. The first run may take a few minutes to install dependencies. ```bash pixi run build ``` -------------------------------- ### Install Momentum Executables Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Installs the built Momentum executables to the runtime destination directory. ```cmake install( TARGETS ${executables} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) ``` -------------------------------- ### Build Momentum from Source Source: https://github.com/facebookresearch/momentum/blob/main/README.md Clones the repository, navigates into the directory, and uses Pixi to build the C++ library and Python bindings, run tests, or execute an example. ```bash git clone https://github.com/facebookresearch/momentum cd momentum pixi run build # Builds C++ library and Python bindings pixi run test # Runs tests pixi run hello_world # Runs example ``` -------------------------------- ### Install Momentum Libraries and Executables Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Installs the Momentum libraries and executables based on the 'targets' and 'executables' properties. It also provides status messages for the installation process. ```cmake get_property(targets GLOBAL PROPERTY MOMENTUM_TARGETS) get_property(executables GLOBAL PROPERTY MOMENTUM_EXECUTABLES) if(targets) message(STATUS "[Installing libraries]") foreach(target ${targets}) message(STATUS " - ${target}") endforeach() else() message(STATUS "No libraries to install.") endif() if(executables) message(STATUS "[Installing executables]") foreach(executable ${executables}) message(STATUS " - ${executable}") endforeach() else() message(STATUS "No executables to install.") endif() ``` -------------------------------- ### Enable Testing and Setup Google Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Enables the testing framework and sets up Google Test. This should be done before defining any tests. ```cmake if(MOMENTUM_BUILD_TESTING) find_package(Boost CONFIG REQUIRED) enable_testing() mt_setup_gtest() mt_library( NAME test_helpers HEADERS_VARS test_helpers_public_headers SOURCES_VARS test_helpers_sources PUBLIC_LINK_LIBRARIES common GTest::gtest PRIVATE_LINK_LIBRARIES Boost::boost NO_INSTALL ) mt_library( NAME character_test_helpers_gtest HEADERS_VARS character_test_helpers_gtest_public_headers SOURCES_VARS character_test_helpers_gtest_sources PUBLIC_LINK_LIBRARIES character PRIVATE_LINK_LIBRARIES GTest::gmock GTest::gtest NO_INSTALL ) mt_library( NAME solver_test_helper HEADERS_VARS solver_test_helper_public_headers PUBLIC_LINK_LIBRARIES solver NO_INSTALL ) mt_library( NAME error_function_helper HEADERS_VARS error_function_helper_public_headers SOURCES_VARS error_function_helper_sources PUBLIC_LINK_LIBRARIES character character_solver PRIVATE_LINK_LIBRARIES GTest::gmock GTest::gtest NO_INSTALL ) set(io_test_helper_libs ) if(APPLE) set(io_test_helper_sources io_test_helper_sources_macos) list(APPEND io_test_helper_libs "-framework Foundation") elseif(UNIX) set(io_test_helper_sources io_test_helper_sources_linux) elseif(WIN32) set(io_test_helper_sources io_test_helper_sources_windows) else() message(FATAL_ERROR "Unsupported platform") endif() mt_library( NAME io_test_helper HEADERS_VARS io_test_helper_public_headers SOURCES_VARS ${io_test_helper_sources} PUBLIC_LINK_LIBRARIES test_helpers Microsoft.GSL::GSL PRIVATE_LINK_LIBRARIES ${io_test_helper_libs} NO_INSTALL ) mt_test( NAME common_test SOURCES_VARS common_test_sources LINK_LIBRARIES common ) mt_test( NAME progress_bar_test SOURCES_VARS progress_bar_test_sources LINK_LIBRARIES progress_bar ) mt_test( NAME simd_test SOURCES_VARS simd_test_sources LINK_LIBRARIES simd ) mt_test( NAME online_qr_test SOURCES_VARS online_qr_test_sources LINK_LIBRARIES online_qr ) mt_test( NAME math_test SOURCES_VARS math_test_sources LINK_LIBRARIES math ) mt_test( NAME coordinate_system_test SOURCES_VARS coordinate_system_test_sources LINK_LIBRARIES coordinate_system ) mt_test( NAME simd_generalized_loss_test SOURCES_VARS simd_generalized_loss_test_sources LINK_LIBRARIES simd_generalized_loss ) # TODO: Add solver_test mt_test( NAME character_test SOURCES_VARS character_test_sources LINK_LIBRARIES character character_test_helpers test_helpers ) mt_test( NAME character_solver_test SOURCES_VARS character_solver_test_sources LINK_LIBRARIES character_solver character_test_helpers error_function_helper solver_test_helper ) if(NOT APPLE) # TODO: Fix mt_test( NAME character_solver_simd_test SOURCES_VARS character_solver_simd_test_sources LINK_LIBRARIES character_solver character_solver_simd character_test_helpers error_function_helper ) endif() mt_test( NAME character_sequence_solver_test SOURCES_VARS character_sequence_solver_test_sources LINK_LIBRARIES character_sequence_solver character_test_helpers solver_test_helper ) # TODO: Fix test failures on macOS if(NOT APPLE) mt_test( NAME diff_ik_test HEADERS_VARS diff_ik_test_headers SOURCES_VARS diff_ik_test_sources LINK_LIBRARIES character_test_helpers diff_ik io_gltf io_skeleton ) endif() mt_test( NAME io_common_test LINK_LIBRARIES io_common SOURCES_VARS io_common_test_sources ) # TODO: Add io_gltf_test mt_test( NAME io_marker_test SOURCES_VARS io_marker_test_sources LINK_LIBRARIES io_marker io_test_helper ENV "TEST_RESOURCES_PATH=${CMAKE_SOURCE_DIR}/momentum/test/resources" ) mt_test( NAME io_shape_test SOURCES_VARS io_shape_test_sources LINK_LIBRARIES character character_test_helpers io_shape io_test_helper ) mt_test( NAME io_skeleton_test SOURCES_VARS io_skeleton_test_sources LINK_LIBRARIES character_test_helpers io_skeleton io_test_helper character_test_helpers_gtest ) mt_test( NAME io_bvh_test SOURCES_VARS io_bvh_test_sources LINK_LIBRARIES io_bvh io_test_helper ENV "TEST_RESOURCES_PATH=${CMAKE_SOURCE_DIR}/momentum/test/resources" ) mt_test( NAME io_motion_test SOURCES_VARS io_motion_test_sources LINK_LIBRARIES character character_test_helpers io_motion io_test_helper ) mt_test( NAME io_legacy_json_test ``` -------------------------------- ### Install Specific PyMomentum Version with CUDA Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Install a specific version of PyMomentum, including constraints for CUDA compatibility. This example installs version 0.1.74 with CUDA 12.9 support. ```bash # Example: Install version 0.1.74 with CUDA 12.9 conda install -c conda-forge pymomentum=0.1.74="cuda129*" ``` -------------------------------- ### Install PyMomentum with Pixi Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Use Pixi to add PyMomentum to your environment. It auto-detects GPU/CPU or allows explicit selection. ```bash pixi add pymomentum pixi add pymomentum-cpu # CPU-only pixi add pymomentum-gpu # GPU (CUDA) support ``` -------------------------------- ### Convert Model with FBX SDK on Windows (Powershell) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Example of converting a model to FBX format using Momentum on Windows with FBX SDK support enabled. This command requires the FBX SDK to be installed. ```powershell $env:MOMENTUM_BUILD_WITH_FBXSDK = "ON"; pixi run convert_model -d -o ``` -------------------------------- ### Build and Install PyMomentum Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Build and install PyMomentum using pip within your activated conda environment. This method respects the dependencies already installed in your environment. ```bash pip install . ``` -------------------------------- ### Install PyMomentum Package Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Installs the PyMomentum package using the 'mt_install_pymomentum()' command. This is typically the final step in the build process for deployment. ```cmake mt_install_pymomentum() ``` -------------------------------- ### Build Momentum with FBX SDK on Windows (cmd) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Build Momentum from source with FBX SDK support enabled on Windows using cmd. The SDK is automatically installed on Linux. ```cmd set MOMENTUM_BUILD_WITH_FBXSDK=ON && pixi run ``` -------------------------------- ### Build export_objs with buck Source: https://github.com/facebookresearch/momentum/blob/main/momentum/examples/export_objs/README.md Build the export_objs utility using buck2. This command compiles the necessary components for the example. ```bash buck2 build path/to/momentum/examples:export_objs ``` -------------------------------- ### Install Momentum with Pixi Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Use Pixi to add the Momentum C++ package to your environment. ```bash pixi add momentum-cpp ``` -------------------------------- ### Installing Specific Conda Package Versions Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/04_conda_publishing.md Instructions for installing exact versions of a conda package, including version and build constraints. ```bash conda install -c conda-forge pymomentum=0.1.77 ``` ```bash conda install -c conda-forge "pymomentum=0.1.77=cuda129*" ``` ```bash conda install -c conda-forge "pymomentum=0.1.77=*py312*" ``` -------------------------------- ### Define 'hello_world' Executable Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Defines the 'hello_world' executable, specifying its source files and linked libraries. This is a basic example executable. ```cmake if(MOMENTUM_BUILD_EXAMPLES) mt_executable( NAME hello_world SOURCES_VARS hello_world_sources LINK_LIBRARIES math ) mt_executable( NAME convert_model SOURCES_VARS convert_model_sources LINK_LIBRARIES io_character io_marker CLI11::CLI11 ) if(MOMENTUM_BUILD_RERUN) mt_executable( NAME glb_viewer SOURCES_VARS glb_viewer_sources LINK_LIBRARIES io_gltf rerun CLI11::CLI11 rerun_sdk ) mt_executable( NAME fbx_viewer SOURCES_VARS fbx_viewer_sources LINK_LIBRARIES io_fbx rerun CLI11::CLI11 rerun_sdk ) mt_executable( NAME c3d_viewer SOURCES_VARS c3d_viewer_sources LINK_LIBRARIES io_marker rerun CLI11::CLI11 rerun_sdk ) mt_executable( NAME urdf_viewer SOURCES_VARS urdf_viewer_sources LINK_LIBRARIES io_urdf rerun CLI11::CLI11 rerun_sdk ) mt_executable( NAME bvh_viewer SOURCES_VARS bvh_viewer_sources LINK_LIBRARIES io_bvh rerun CLI11::CLI11 rerun_sdk ) endif() mt_executable( NAME animate_shapes SOURCES_VARS animate_shapes_sources LINK_LIBRARIES io_character io_shape CLI11::CLI11 ) mt_executable( NAME process_markers_app SOURCES_VARS process_markers_app_sources LINK_LIBRARIES app_utils common process_markers ) mt_executable( NAME refine_motion SOURCES_VARS refine_motion_sources LINK_LIBRARIES app_utils io_gltf io_marker io_skeleton marker_tracker ) mt_executable( NAME export_objs SOURCES_VARS export_objs_sources LINK_LIBRARIES character io_fbx io_gltf CLI11::CLI11 ) if(MOMENTUM_BUILD_IO_USD AND MOMENTUM_BUILD_RERUN) mt_executable( NAME usd_viewer SOURCES_VARS usd_viewer_sources LINK_LIBRARIES io_usd rerun CLI11::CLI11 rerun_sdk ) endif() endif() ``` -------------------------------- ### Install Momentum with Conda Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Use Conda to install the Momentum C++ package from the conda-forge channel. ```bash conda install -c conda-forge momentum-cpp ``` -------------------------------- ### Check PyTorch Installation Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Verifies if PyTorch is installed at the determined base path. If not found, it raises a fatal error. ```cmake if(NOT EXISTS "${libtorch_base_path}") message(FATAL_ERROR "PyTorch not found in the expected location: ${libtorch_base_path}.\n" "Please ensure PyTorch is installed in your Conda/Pixi environment." ) endif() ``` -------------------------------- ### Install Momentum Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Installs Momentum and its dependencies within a Pixi virtual environment. This command builds Momentum in Release mode and sets up environment variables for CMake. ```bash pixi run install ``` -------------------------------- ### Install PyMomentum with Conda Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Use Conda to install PyMomentum from the conda-forge channel. It supports auto-detection or explicit CPU/GPU backend selection. ```bash conda install -c conda-forge pymomentum conda install -c conda-forge pymomentum-cpu # CPU-only conda install -c conda-forge pymomentum-gpu # GPU (CUDA) support ``` -------------------------------- ### Build Momentum with FBX SDK on Windows (Powershell) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Build Momentum from source with FBX SDK support enabled on Windows using Powershell. The SDK is automatically installed on Linux. ```powershell $env:MOMENTUM_BUILD_WITH_FBXSDK = "ON"; pixi run ``` -------------------------------- ### Install Core Dependencies with Conda Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Install essential dependencies such as PyTorch, Eigen, and Ceres Solver using conda. Adjust versions as needed. ```bash # Install core dependencies (adjust versions as needed) conda install -c conda-forge pytorch eigen ceres-solver ``` -------------------------------- ### Ground Plane Shadow Generation Setup Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/02_examples/02_visualization_pymomentum_rasterizer.md Sets up lights and a separate z-buffer for generating ground plane shadows using a two-step rasterization process. This technique projects the mesh onto the ground plane to create shadow effects. ```python # Two lights, the first is above the person and casts shadows while the other # is co-located with the camera to ensure good fill. lights = [ pym_renderer.Light.create_point_light( np.asarray([-20, 200, 30]), color=np.asarray([0.7, 0.7, 0.7]) ), pym_renderer.Light.create_point_light( camera.center_of_projection, np.asarray([0.3, 0.3, 0.3]), ), ] # Create a separate z buffer for the shadows. shadow_buffer = pym_renderer.create_z_buffer(camera) # Rasterize the body mesh onto the shadow Z buffer using a projection matrix ``` -------------------------------- ### Enable Testing and Setup Google Test Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Enables testing for the project and sets up Google Test if the MOMENTUM_BUILD_TESTING flag is enabled. This is a prerequisite for running any tests. ```cmake if(MOMENTUM_BUILD_TESTING) enable_testing() mt_setup_gtest() endif() ``` -------------------------------- ### Build Momentum with FBX SDK on macOS Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Build Momentum from source with FBX SDK support enabled on macOS. The SDK is automatically installed on Linux. ```bash MOMENTUM_BUILD_WITH_FBXSDK=ON pixi run ``` -------------------------------- ### Configure and Install CMake Package Config File Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Generates and installs the 'momentum-config.cmake' file, which is essential for CMake to find and use the Momentum package. It uses CMake's package configuration helpers. ```cmake include(CMakePackageConfigHelpers) set(MOMENTUM_CONFIG_INPUT cmake/momentum-config.cmake.in) set(MOMENTUM_CONFIG_OUTPUT ${CMAKE_BINARY_DIR}/cmake/momentum-config.cmake) set(MOMENTUM_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) configure_package_config_file( ${MOMENTUM_CONFIG_INPUT} ${MOMENTUM_CONFIG_OUTPUT} INSTALL_DESTINATION ${MOMENTUM_CONFIG_INSTALL_DIR} ) install( FILES ${MOMENTUM_CONFIG_OUTPUT} DESTINATION ${MOMENTUM_CONFIG_INSTALL_DIR} ) ``` -------------------------------- ### Fetch pybind11 using FetchContent Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Includes pybind11 as a dependency using FetchContent if not using a system-wide installation. It specifies the Git repository and tag. ```cmake include(FetchContent) FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11.git GIT_TAG v2.13.6 ) set(PYBIND11_TEST OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(pybind11) ``` -------------------------------- ### Displaying Conda Package Information Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/04_conda_publishing.md Commands to inspect details and installed files of a specific conda package. ```bash conda info pymomentum ``` ```bash conda list pymomentum --show-channel-urls ``` -------------------------------- ### Local Conda Package Building Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/04_conda_publishing.md Steps to build a conda package locally using conda-build. Ensure conda-build is installed first. ```bash conda install conda-build conda build recipe/ ``` -------------------------------- ### Run Application (Windows) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Executes the built application on Windows. Assumes the executable is located at 'momentum/examples/hello_world/build/Release/hello_world.exe'. ```bash # Windows momentum/examples/hello_world/build/Release/hello_world.exe ``` -------------------------------- ### Install CMake Modules Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Installs specific CMake modules ('Findre2.cmake', 'FindFbxSdk.cmake') to the designated installation directory. These modules help CMake find external dependencies. ```cmake install( FILES cmake/Findre2.cmake cmake/FindFbxSdk.cmake DESTINATION ${MOMENTUM_CONFIG_INSTALL_DIR} ) ``` -------------------------------- ### Run Application (Linux/macOS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Executes the built application on Linux or macOS. Assumes the executable is located at './momentum/examples/hello_world/build/hello_world'. ```bash # Linux and macOS ./momentum/examples/hello_world/build/hello_world ``` -------------------------------- ### Build Application (Windows) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Builds the application using CMake on Windows after configuration. Assumes the build directory is 'momentum/examples/hello_world/build' and Release configuration. ```bash # Windows pixi run cmake --build momentum/examples/hello_world/build --config Release ``` -------------------------------- ### Build and Test PyMomentum from Source Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Build the project using the pixi run build command and then run the Python tests with pixi run test_py. ```bash pixi run build pixi run test_py ``` -------------------------------- ### Build and Test Project Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Commands to build the C++ library and Python bindings, and run associated tests. ```bash pixi run build # C++ library pixi run build_py # Python bindings ``` ```bash pixi run test # C++ tests pixi run test_py # Python tests ``` -------------------------------- ### Run USD Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the USD viewer with an input file. ```bash pixi run usd_viewer --input ``` -------------------------------- ### Configure Camera Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the camera test, linking the camera library. ```cmake mt_test( NAME camera_test SOURCES_VARS camera_test_sources LINK_LIBRARIES camera ) ``` -------------------------------- ### CMakeLists.txt for Library Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Demonstrates how to configure CMake to build either a shared or static library that depends on Momentum. Links the library against momentum::math. ```cmake add_library(my_lib SHARED my_lib.hpp my_lib.cpp) # shared add_library(my_lib STATIC my_lib.hpp my_lib.cpp) # static target_link_libraries(my_lib PUBLIC momentum::math) ``` -------------------------------- ### Build Application (Linux/macOS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Builds the application using CMake on Linux or macOS after configuration. Assumes the build directory is 'momentum/examples/hello_world/build'. ```bash # Linux and macOS pixi run cmake --build momentum/examples/hello_world/build ``` -------------------------------- ### Run GLB Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the GLB viewer with an input file. ```bash pixi run glb_viewer --input ``` -------------------------------- ### Configure USD I/O Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the test for USD I/O, including Python 3 linkage and resource path environment variable. ```cmake mt_test( NAME io_usd_test SOURCES_VARS io_usd_test_sources LINK_LIBRARIES character_test_helpers io_usd io_test_helper Python3::Python ENV "TEST_RESOURCES_PATH=${CMAKE_SOURCE_DIR}/momentum/test/resources" ) ``` -------------------------------- ### Activate Conda Environment Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/01_user_guide/01_getting_started.md Activate your target conda environment before proceeding with the installation. ```bash conda activate your_environment_name ``` -------------------------------- ### Generate and Inspect PyPI Configurations Locally Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/03_pypi_publishing.md Execute local commands to generate PyPI configuration files and inspect the generated CPU and GPU constraints. ```bash pixi run generate_pyproject cat pyproject-pypi-cpu.toml # Check CPU constraints cat pyproject-pypi-gpu.toml # Check GPU constraints ``` -------------------------------- ### Run Process Markers with Calibration Config Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/02_process_markers.md Use this command to calibrate the skeleton and marker layout, then track motion data. Requires a configuration file. ```bash pixi run process_markers -c process_markers_calib.config ``` ```bash buck run @arvr/mode/win/opt process_markers_app -- -c process_markers_calib.config ``` -------------------------------- ### Run Process Markers with Tracking Config Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/02_process_markers.md Use this command to track motion data using a pre-calibrated model. Requires a configuration file. ```bash pixi run process_markers -c process_markers_tracking.config ``` ```bash buck run @arvr/mode/win/opt process_markers_app -- -c process_markers_tracking.config ``` -------------------------------- ### Run FBX Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the FBX viewer with an input file. ```bash pixi run fbx_viewer --input ``` -------------------------------- ### Run FBX Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the FBX viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt fbx_viewer -- --input ``` -------------------------------- ### Troubleshoot Test Failures Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Use verbose test output to get detailed information for debugging failing tests. ```bash pixi run test_verbose ``` -------------------------------- ### Run USD Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the USD viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt usd_viewer -- --input ``` -------------------------------- ### Run refine_motion with Config (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/04_refine_motion.md Execute the refine_motion tool using pixi and a specified configuration file. This is the standard way to run the tool in an open-source environment. ```bash pixi run refine_motion -c refine_motion.config ``` -------------------------------- ### Build Static Website Content Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/README.md Generates static website content into the 'build' directory, ready for hosting. ```bash $ yarn build ``` -------------------------------- ### Run GLB Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the GLB viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt glb_viewer -- --input ``` -------------------------------- ### Run C3D Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the C3D viewer with an input file. ```bash pixi run c3d_viewer --input ``` -------------------------------- ### Find PyTorch Packages Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Locates the ATen and Torch CMake configuration packages. It searches in standard locations for both conda and PyPI installations. ```cmake # Try both locations for CMake files (conda and PyPI have different structures) find_package(ATen CONFIG REQUIRED HINTS ${libtorch_base_path}/share/cmake/ATen ${libtorch_base_path} ) find_package(Torch CONFIG REQUIRED HINTS ${libtorch_base_path}/share/cmake/Torch ${libtorch_base_path} ) ``` -------------------------------- ### Clean Momentum Build Artifacts Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Remove build artifacts and the Pixi virtual environment to start over. This cleans the 'build/' directory and '.pixi/'. ```bash pixi run clean ``` -------------------------------- ### Open Project in Visual Studio Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/04_developer_guide/01_development_environment.md Opens the Momentum project in Microsoft Visual Studio 2022 on Windows using Pixi. ```bash pixi run open_vs ``` -------------------------------- ### Create and Configure Camera Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/02_examples/02_visualization_pymomentum_rasterizer.md Demonstrates how to create a camera with a pinhole intrinsics model and set its extrinsics using look_at and frame methods. This is useful for defining the viewpoint and framing objects in the scene. ```python import pymomentum.camera as pym_camera import pymomentum.renderer as pym_renderer import numpy as np image_height, image_width = 800, 1000 # Create a pinhole intrinsics model intrinsics = pym_camera.PinholeIntrinsicsModel( image_width=image_width, image_height=image_height, fx=800.0, # focal length in pixels fy=800.0, cx=image_width / 2.0, # principal point cy=image_height / 2.0 ) # Create a camera with the intrinsics camera = pym_camera.Camera(intrinsics) # Move the camera along -z and look at the origin camera = camera.look_at( position=np.array([0, 0, 1]), target=np.zeros(3), up=np.array([0, 1, 0]) ) # Make sure the entire object is in view: camera = camera.frame(vertex_positions) ``` -------------------------------- ### Include Public Momentum Headers Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/04_developer_guide/02_style_guide.md In public Momentum header files, use angle brackets for includes. This ensures that downstream users can find these headers in their system include paths after installation. ```cpp // In public header files (e.g., momentum/character/character.h) #include #include ``` -------------------------------- ### Basic C++ Source Code Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md A simple C++ program that includes the Momentum mesh header and creates a Mesh object. This serves as a starting point for applications using Momentum's math functionalities. ```cpp #include using namespace momentum; int main() { auto mesh = Mesh(); mesh.updateNormals(); return EXIT_SUCCESS; } ``` -------------------------------- ### Run refine_motion with Config (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/04_refine_motion.md Execute the refine_motion tool using buck run with a specific mode for Windows. This command is intended for internal Facebook/Meta development environments. ```bash buck run @arvr/mode/win/opt refine_motion -- -c refine_motion.config ``` -------------------------------- ### Configure CMake Project (Windows) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Configures the CMake build for a project on Windows. Assumes the project root is at 'momentum/examples/hello_world/'. ```bash # Windows pixi run cmake -S momentum/examples/hello_world -B momentum/examples/hello_world/build ``` -------------------------------- ### Standard CMake Build Options Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Defines various build options for Momentum, such as USD I/O, Python bindings, testing, examples, Rerun visualization, profiling, and SIMD instructions. These are typically set to OFF by default unless specified otherwise. ```cmake mt_option(MOMENTUM_BUILD_IO_USD "Build USD I/O support" OFF) mt_option(MOMENTUM_BUILD_PYMOMENTUM "Build Python binding" OFF) mt_option(MOMENTUM_BUILD_TESTING "Enable building tests" OFF) mt_option(MOMENTUM_BUILD_EXAMPLES "Enable building examples" OFF) mt_option(MOMENTUM_BUILD_RERUN "Build native Rerun C++ visualization support" ON) mt_option(MOMENTUM_ENABLE_PROFILING "Enable building with profiling annotations" OFF) mt_option(MOMENTUM_ENABLE_SIMD "Enable building with SIMD instructions" ON) mt_option(MOMENTUM_INSTALL_EXAMPLES "Install examples" OFF) mt_option(MOMENTUM_USE_SYSTEM_GOOGLETEST "Use GoogleTest installed in system" OFF) mt_option(MOMENTUM_USE_SYSTEM_MDSPAN "Use mdspan installed in system" OFF) mt_option(MOMENTUM_USE_SYSTEM_PYBIND11 "Use pybind11 installed in system" OFF) mt_option(MOMENTUM_USE_SYSTEM_RERUN_CPP_SDK "Use Rerun C++ SDK installed in system" OFF) mt_option(MOMENTUM_USE_SYSTEM_TRACY "Use Tracy installed in system" OFF) ``` -------------------------------- ### Build Python Bindings Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Commands to build Python bindings, run Python tests, and build Python documentation. ```bash pixi run build_py # Build Python bindings pixi run test_py # Run Python tests pixi run doc_py # Build Python docs ``` -------------------------------- ### Build C++ Library Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Commands for building the C++ library in release or debug mode, and running tests. ```bash pixi run build # Release build pixi run build_dev # Debug build pixi run test # Run tests ``` -------------------------------- ### Refine Motion with Config and Overrides (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/04_refine_motion.md Execute the refine_motion tool using buck run, specifying a Windows mode, and overriding input, output, and smoothing parameters. This is for internal development workflows. ```bash buck run @arvr/mode/win/opt refine_motion -- -c refine_motion.config -i track.glb -o refined.glb --smoothing 2.5 ``` -------------------------------- ### Run C3D Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the C3D viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt c3d_viewer -- --input ``` -------------------------------- ### Set up TorchBridge Include Directory Source: https://github.com/facebookresearch/momentum/blob/main/pymomentum/CMakeLists.txt Configures the include directory for the TorchBridge interface library and creates the necessary directory structure. This is typically used for OSS builds. ```cmake set(TORCH_BRIDGE_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/torch_bridge_include) file(MAKE_DIRECTORY ${TORCH_BRIDGE_INCLUDE_DIR}/pymomentum) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/oss/torch_bridge.h.in ${TORCH_BRIDGE_INCLUDE_DIR}/pymomentum/torch_bridge.h COPYONLY ) ``` -------------------------------- ### Run BVH Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the BVH viewer with an input file. ```bash pixi run bvh_viewer --input ``` -------------------------------- ### Build Test Wheels Locally Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/03_developer_guide/03_pypi_publishing.md Commands to clean previous build artifacts, build PyPI wheels for a specific Python version, and check the built wheel. ```bash pixi run -e py312 clean_dist pixi run -e py312 build_pypi_wheel pixi run -e py312 check_pypi ``` -------------------------------- ### Refine Motion with Config and Overrides (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/04_refine_motion.md Run the refine_motion tool with a configuration file and override specific parameters like input, output, and smoothing factor via command-line arguments. Suitable for open-source usage. ```bash pixi run refine_motion -c refine_motion.config -i track.glb -o refined.glb --smoothing 2.5 ``` -------------------------------- ### Run All Tests Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Commands to execute all C++ and Python tests, including verbose output options. ```bash pixi run test # C++ tests pixi run test_py # Python tests pixi run test_verbose # C++ verbose output pixi run test_py_verbose # Python verbose output ``` -------------------------------- ### Run URDF Viewer (OSS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the pixi run command to launch the URDF viewer with an input file. ```bash pixi run urdf_viewer --input ``` -------------------------------- ### Configure Glove Utilities Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the glove utilities test, linking character test helpers and marker tracker libraries. ```cmake mt_test( NAME glove_utils_test SOURCES_VARS glove_utils_test_sources LINK_LIBRARIES character_test_helpers marker_tracker ) ``` -------------------------------- ### Configure CMake Project (Linux/macOS) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/02_creating_your_applications.md Configures the CMake build for a project on Linux or macOS. Assumes the project root is at 'momentum/examples/hello_world/'. ```bash # Linux and macOS pixi run cmake -S momentum/examples/hello_world -B momentum/examples/hello_world/build -DCMAKE_BUILD_TYPE=Release ``` -------------------------------- ### Convert FBX Animation to GLB with Model Parameters Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/03_convert_model.md Converts an FBX animation file to GLB format, using a specified model parameter file for mapping. Note that the conversion may not be lossless and uses InverseParameterTransform for parameter fitting. ```bash pixi run convert_model -d animation.fbx -p character.model -o animation.glb ``` ```bash buck run @arvr/mode/win/opt convert_model -- -d animation.fbx -p character.model -o animation.glb ``` -------------------------------- ### Run URDF Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the URDF viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt urdf_viewer -- --input ``` -------------------------------- ### Troubleshoot Build Failures Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Commands to clean the build and rebuild the project to resolve build failures. ```bash pixi run clean && pixi run build ``` -------------------------------- ### Create Depth and RGB Buffers Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/02_examples/02_visualization_pymomentum_rasterizer.md Create z_buffer and rgb_buffer using the camera object. The buffer size is padded to the nearest multiple of 8 for SIMD performance. ```python import pymomentum.renderer as pym_renderer z_buffer = pym_renderer.create_z_buffer(camera) rgb_buffer = pym_renderer.create_rgb_buffer(camera) ``` -------------------------------- ### Print Build Options Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Calls a CMake function to print the currently configured build options. This is useful for verifying the build configuration. ```cmake mt_print_options() ``` -------------------------------- ### Run BVH Viewer (Internal) Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/03_examples/01_viewers.md Use the buck run command to launch the BVH viewer with an input file in an internal environment. ```bash buck run @arvr/mode/win/opt bvh_viewer -- --input ``` -------------------------------- ### Configure Legacy JSON I/O Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the test for legacy JSON I/O, specifying source variables, linked libraries, and environment paths. ```cmake mt_test( NAME io_legacy_json_test SOURCES_VARS io_legacy_json_test_sources LINK_LIBRARIES character_test_helpers io_legacy_json io_test_helper ENV "TEST_RESOURCES_PATH=${CMAKE_SOURCE_DIR}/momentum/test/resources" ) ``` -------------------------------- ### Generate Video Frame by Frame Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/02_examples/02_visualization_pymomentum_rasterizer.md Demonstrates how to render individual frames and write them to a video file using OpenCV. Ensure the image buffer is converted from RGB to BGR for OpenCV compatibility. ```python import cv2 # Initialize video writer fourcc = cv2.VideoWriter_fourcc(*'mp4v') video_writer = cv2.VideoWriter(file_path, fourcc, video_fps, (video_width, video_height)) for i_frame in range(n_frames): full_image = np.zeros(shape=(video_height, video_width, 3), dtype=np.uint8) # ... render your frame ... # Convert RGB to BGR for OpenCV bgr_image = full_image[..., ::-1] video_writer.write(bgr_image) video_writer.release() ``` -------------------------------- ### Run export_objs with buck Source: https://github.com/facebookresearch/momentum/blob/main/momentum/examples/export_objs/README.md Execute the export_objs utility using buck2. Specify the input animation file and the output folder for OBJ files. Optional arguments for frame range and stride can be provided. ```bash buck2 run path/to/momentum/examples:export_objs -- \ -i \ -o \ [--first ] \ [--last ] \ [--stride ] ``` -------------------------------- ### Antialiasing with Supersampling in PyMomentum Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_python/02_examples/02_visualization_pymomentum_rasterizer.md Demonstrates how to implement antialiasing by supersampling the camera and then downsampling the output. This improves visual quality, especially for thin structures. ```python import pymomentum.renderer as pym_renderer sup_samp: int = 2 cam_supersample = cam.upsample(sup_samp) z_buffer = pym_renderer.create_z_buffer(cam_supersample) rgb_buffer = pym_renderer.create_rgb_buffer(cam_supersample) # render pym_renderer.rasterize_mesh(...) output_image = np.zeros(shape=(cam.image_height, cam.image_width, 3)) # Alpha_matte function knows how to handle alpha with upsampled cameras (will # correctly blend along edges using the averaged alpha). pym_renderer.alpha_matte(z_buffer, rgb_buffer, output_image) ``` -------------------------------- ### Export all frames from GLB with buck Source: https://github.com/facebookresearch/momentum/blob/main/momentum/examples/export_objs/README.md Export all animation frames from a GLB file to a specified output folder using buck2. ```bash buck2 run path/to/momentum/examples:export_objs -- \ -i test.glb \ -o /tmp/exported_objs ``` -------------------------------- ### Configure USD glTF Roundtrip Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the test for USD glTF roundtrip functionality, linking necessary helper and I/O libraries, including Python 3. ```cmake mt_test( NAME io_usd_gltf_roundtrip_test SOURCES_VARS io_usd_gltf_roundtrip_test_sources LINK_LIBRARIES character_test_helpers character_test_helpers_gtest io_gltf io_test_helper io_usd Python3::Python ) ``` -------------------------------- ### Test Momentum Build Source: https://github.com/facebookresearch/momentum/blob/main/momentum/website/docs_cpp/02_user_guide/01_getting_started.md Run the test suite for the Momentum C++ project after building. ```bash pixi run test ``` -------------------------------- ### Feature Branch Workflow Source: https://github.com/facebookresearch/momentum/blob/main/CONTRIBUTING.md Steps for creating a feature branch, making changes, linting, and testing before committing. ```bash git checkout -b feature/your-feature # Make your changes pixi run lint # Format code pixi run test # Verify tests pass ``` -------------------------------- ### Configure Marker Gap Fill Test Source: https://github.com/facebookresearch/momentum/blob/main/CMakeLists.txt Sets up the marker gap fill test, linking character test helpers and marker tracker libraries. ```cmake mt_test( NAME marker_gap_fill_test SOURCES_VARS marker_gap_fill_test_sources LINK_LIBRARIES character_test_helpers marker_tracker ) ```