├── .clang-format ├── .github └── workflows │ ├── build-and-test.yml │ ├── build-and-test_projects.yml │ ├── build-wheel-and-deploy.yml │ └── publish-website.yml ├── .gitignore ├── .gitmodules ├── BUILD.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── Dockerfile.fedora ├── LICENSE ├── README.md ├── data ├── aria_sensors.jpg ├── aria_unit_test_sequence_calib.vrs └── sample_calib.json ├── node_modules └── .yarn-integrity ├── projects ├── AriaPilotDatasetTools │ ├── CMakeLists.txt │ ├── PilotDataset.cpp │ ├── PilotDataset.h │ ├── speech_to_text_datum.h │ └── viewer │ │ ├── PilotDatasetViewer.cpp │ │ ├── PilotDatasetViewer.h │ │ └── main.cpp └── EgoExo │ ├── CMakeLists.txt │ ├── CompressedIStream.cpp │ ├── CompressedIStream.h │ ├── Data3DGui.cpp │ ├── Data3DGui.h │ ├── GlobalPointCloud.h │ ├── GlobalPointCloudReader.cpp │ ├── GlobalPointCloudReader.h │ ├── GoProCalibration.h │ ├── GoProCalibrationReader.cpp │ ├── GoProCalibrationReader.h │ ├── ReadMe.md │ └── main.cpp ├── src ├── CMakeLists.txt ├── ReadMe.md ├── data_provider │ ├── AriaDataProvider.h │ ├── AriaStreamIds.h │ ├── AriaVrsDataProvider.cpp │ ├── AriaVrsDataProvider.h │ ├── CMakeLists.txt │ ├── ReadMe.md │ ├── data_layout │ │ ├── CMakeLists.txt │ │ └── aria │ │ │ ├── AudioMetadata.h │ │ │ ├── BarometerMetadata.h │ │ │ ├── BluetoothBeaconMetadata.h │ │ │ ├── GpsMetadata.h │ │ │ ├── ImageSensorMetadata.h │ │ │ ├── MotionSensorMetadata.h │ │ │ ├── PoseMetadata.h │ │ │ ├── ReadMe.md │ │ │ ├── TimeSyncMetadata.h │ │ │ ├── WifiBeaconMetadata.h │ │ │ └── sample_app │ │ │ └── AriaFileReader.cpp │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── ReadMe.md │ │ ├── readAll.cpp │ │ └── readSelected.cpp │ ├── mps_io │ │ ├── CMakeLists.txt │ │ ├── eyeGazeReader.cpp │ │ ├── eyeGazeReader.h │ │ ├── onlineCalibrationReader.cpp │ │ ├── onlineCalibrationReader.h │ │ ├── trajectoryReader.cpp │ │ └── trajectoryReader.h │ ├── mps_visualization │ │ ├── AriaViewer.cpp │ │ ├── AriaViewer.h │ │ ├── CMakeLists.txt │ │ ├── main_eyegaze.cpp │ │ └── main_trajectory.cpp │ ├── players │ │ ├── AriaAudioPlayer.cpp │ │ ├── AriaAudioPlayer.h │ │ ├── AriaBarometerPlayer.cpp │ │ ├── AriaBarometerPlayer.h │ │ ├── AriaBluetoothBeaconPlayer.cpp │ │ ├── AriaBluetoothBeaconPlayer.h │ │ ├── AriaGpsPlayer.cpp │ │ ├── AriaGpsPlayer.h │ │ ├── AriaImageSensorPlayer.cpp │ │ ├── AriaImageSensorPlayer.h │ │ ├── AriaMotionSensorPlayer.cpp │ │ ├── AriaMotionSensorPlayer.h │ │ ├── AriaPosePlayer.cpp │ │ ├── AriaPosePlayer.h │ │ ├── AriaTimeSyncPlayer.cpp │ │ ├── AriaTimeSyncPlayer.h │ │ ├── AriaWifiBeaconPlayer.cpp │ │ ├── AriaWifiBeaconPlayer.h │ │ ├── CMakeLists.txt │ │ └── ReadMe.md │ ├── utils.cpp │ └── utils.h ├── experimental │ ├── CMakeLists.txt │ ├── ImageMutationFilterCopier.h │ ├── Readme.md │ └── main.cpp ├── pyproject.toml ├── pyproject_arm64.toml ├── python │ ├── AriaDataProviderPyBind.h │ ├── AriaPlayersPyBind.h │ ├── DeviceModelPyBind.h │ ├── MpsIOPyBind.h │ ├── bindings.cpp │ └── tutorials │ │ ├── DataProvider_ImageTimeline.py │ │ └── Sensors.py ├── sensors │ ├── CMakeLists.txt │ ├── camera │ │ ├── math │ │ │ └── optimization │ │ │ │ └── IgnoreJetInfinitesimal.h │ │ ├── portability │ │ │ └── Inline.h │ │ └── projection │ │ │ ├── FisheyeRadTanThinPrism.h │ │ │ ├── KannalaBrandtK3.h │ │ │ └── common.h │ ├── examples │ │ ├── CMakeLists.txt │ │ └── main.cpp │ ├── models │ │ ├── DeviceModel.cpp │ │ ├── DeviceModel.h │ │ └── README.md │ ├── portability │ │ └── Inline.h │ ├── tests │ │ ├── CMakeLists.txt │ │ └── DeviceModelTests.cpp │ └── utility │ │ ├── VrsUtils.cpp │ │ └── VrsUtils.h ├── setup.py ├── version.txt └── visualization │ ├── AriaViewer.cpp │ ├── AriaViewer.h │ ├── AriaViewerBase.cpp │ ├── AriaViewerBase.h │ ├── CMakeLists.txt │ ├── main.cpp │ ├── main_aria_sensors_viewer.cpp │ └── main_multi.cpp └── website ├── .gitignore ├── README.md ├── babel.config.js ├── docs ├── FAQ.mdx ├── aria-vrs.mdx ├── citation-contribute.mdx ├── howto │ ├── MPS.mdx │ ├── _category_.json │ ├── calibration.mdx │ ├── dataprovider.mdx │ ├── examples.mdx │ └── visualizing.mdx ├── install.mdx ├── license.mdx ├── overview.mdx ├── pilotdata │ ├── _category_.json │ ├── desk │ │ ├── _category_.json │ │ ├── desktop_overview.mdx │ │ └── desktop_setup.mdx │ ├── location-output.mdx │ ├── pilotdata-index.mdx │ ├── reprojected-gaze.mdx │ ├── speech2text.mdx │ └── timestamps.mdx ├── sensors-measurements.mdx └── use-vrs.mdx ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src ├── components │ ├── HomepageFeatures.js │ └── HomepageFeatures.module.css ├── css │ └── custom.css └── pages │ ├── index.js │ ├── index.module.css │ └── markdown-page.md ├── static ├── .nojekyll ├── img │ ├── Aria-technical-specs.jpeg │ ├── aria_icon.png │ ├── aria_icon_transparent_small.png │ ├── arrows-to-eye-solid.svg │ ├── docs │ │ ├── EyeGazeViewer.png │ │ ├── TrajectoryAndEyeGazeVectorsViewer.png │ │ ├── TrajectoryViewer.png │ │ ├── aria_ref_frames.PNG │ │ ├── aria_ref_frames_all_black.png │ │ ├── aria_viewer.png │ │ └── aria_viewer_multiples.png │ ├── glasses-solid.svg │ ├── oss_logo.png │ ├── pilot_dataset │ │ └── YCB_objects.png │ └── python-brands.svg └── video │ ├── 2wearers_location_inSync.m4v │ ├── 2wearers_synched.m4v │ ├── aria_multi_viewer.m4v │ ├── aria_viewer.m4v │ ├── desk_12-demo.m4v │ ├── desk_activity.m4v │ ├── et_visualization.m4v │ ├── location_all_activities.m4v │ └── map_merge.m4v └── yarn.lock /.github/workflows/build-and-test_projects.yml: -------------------------------------------------------------------------------- 1 | name: Build projects 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | name: Build ${{ matrix.project }} on ${{ matrix.os }} 12 | runs-on: ${{ matrix.os }} 13 | strategy: 14 | matrix: 15 | os: [ubuntu-latest, macOS-latest] 16 | project: [AriaPilotDatasetTools, EgoExo] 17 | steps: 18 | - name : Checkout 19 | uses: actions/checkout@v2 20 | with: 21 | submodules: 'true' 22 | 23 | - name: Install dependencies 24 | shell: bash 25 | run: | 26 | if [ "$RUNNER_OS" == "Linux" ]; then 27 | # Update & upgrade package lists 28 | sudo apt-get update -y 29 | sudo apt-get upgrade 30 | # Deal with Github CI limitation 31 | # https://github.com/actions/runner-images/issues/6399#issuecomment-1285011525 32 | sudo apt install -y libunwind-dev 33 | 34 | # Generic dependencies 35 | sudo apt-get install cmake 36 | 37 | # Install VRS dependencies 38 | sudo apt-get install -o Acquire::Retries=5 \ 39 | libgtest-dev libgmock-dev \ 40 | libfmt-dev libcereal-dev \ 41 | libturbojpeg-dev libpng-dev \ 42 | liblz4-dev libzstd-dev libxxhash-dev \ 43 | libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-date-time-dev 44 | 45 | # Build Cereal (header only library) 46 | cd /tmp; git clone https://github.com/USCiLab/cereal.git -b v1.3.2 \ 47 | && cd cereal \ 48 | && cmake -DSKIP_PORTABILITY_TEST=1 -DJUST_INSTALL_CEREAL=ON .; sudo make -j$thread install; rm -rf /tmp/cereal; 49 | 50 | # Clean APT cache 51 | sudo apt-get clean 52 | 53 | elif [ "$RUNNER_OS" == "macOS" ]; then 54 | # Install system deps with Homebrew 55 | brew install cmake 56 | # VRS dependencies 57 | brew install boost fmt sophus cereal googletest glog lz4 zstd xxhash libpng jpeg-turbo 58 | else 59 | echo "$RUNNER_OS not supported" 60 | exit 1 61 | fi 62 | 63 | - name: Install & build Pangolin 64 | shell: bash 65 | run: | 66 | if [ "$RUNNER_OS" == "Linux" ]; then 67 | sudo apt-get install \ 68 | libeigen3-dev \ 69 | libglew-dev libgl1-mesa-dev \ 70 | libwayland-dev libxkbcommon-dev wayland-protocols 71 | elif [ "$RUNNER_OS" == "macOS" ]; then 72 | brew install eigen glew 73 | fi 74 | 75 | # Build and install Pangolin (optional) 76 | cd /tmp; git clone https://github.com/stevenlovegrove/Pangolin.git -b v0.8 \ 77 | && mkdir Pangolin_Build && cd Pangolin_Build \ 78 | && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=OFF -DBUILD_PANGOLIN_PYTHON=OFF -DBUILD_EXAMPLES=OFF ../Pangolin/ \ 79 | && sudo make -j$thread install; 80 | 81 | - name: Install additional deps 82 | if: matrix.project == 'EgoExo' && matrix.os == 'ubuntu-latest' 83 | shell: bash 84 | run: | 85 | sudo apt-get install libboost-iostreams-dev 86 | 87 | - name: Configure & build project 88 | shell: bash 89 | run: | 90 | mkdir build 91 | cmake -DCMAKE_BUILD_TYPE=RELEASE -S ./projects/${{ matrix.project }} -B build 92 | cd build 93 | make -j8 94 | -------------------------------------------------------------------------------- /.github/workflows/build-wheel-and-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Build wheels and deploy 2 | 3 | on: 4 | # this workflow can only be manually triggered for now. 5 | workflow_dispatch: 6 | inputs: 7 | deploy: 8 | description: 'Where to deploy the artifacts? Only build (build), deploy to test PyPI (test), or deploy to PyPI (prod).' 9 | required: true 10 | type: choice 11 | default: 'build' 12 | options: 13 | - build 14 | - test 15 | - prod 16 | 17 | jobs: 18 | build-wheels: 19 | if: github.repository == 'facebookresearch/Aria_data_tools' 20 | name: Build wheels on ${{ matrix.os }} 21 | runs-on: ${{ matrix.os }} 22 | strategy: 23 | matrix: 24 | os: [macOS-latest, ubuntu-20.04] 25 | steps: 26 | - uses: actions/checkout@v3 27 | with: 28 | submodules: recursive 29 | - name: Set up Python 30 | uses: actions/setup-python@v4 31 | with: 32 | python-version: '3.8' 33 | - name: Upgrade pip 34 | run: | 35 | python3 -m pip install --upgrade pip 36 | 37 | - name: Install cibuildwheel 38 | run: | 39 | python3 -m pip install cibuildwheel 40 | 41 | - name: Build wheels for CPython 42 | run: | 43 | python3 -m cibuildwheel --output-dir dist ./src 44 | - uses: actions/upload-artifact@v2 45 | with: 46 | name: python-package-distributions 47 | path: dist 48 | 49 | publish-to-pypi: 50 | runs-on: ubuntu-latest 51 | needs: 52 | - build-wheels 53 | steps: 54 | - name: Download wheels from previous jobs 55 | # by default this will download all artifacts 56 | uses: actions/download-artifact@v3 57 | with: 58 | name: python-package-distributions 59 | # PyPI publish action uploads everything under dist/* by default 60 | path: dist 61 | 62 | - name: Display the list of artifacts 63 | run: ls -R dist 64 | 65 | - name: Publish to Test PyPI 66 | if: github.event.inputs.deploy == 'test' 67 | uses: pypa/gh-action-pypi-publish@v1.4.2 68 | with: 69 | user: __token__ 70 | password: ${{ secrets.TEST_PYPI_TOKEN_PROJECTARIA_TOOLS }} 71 | repository_url: https://test.pypi.org/legacy/ 72 | skip_existing: true 73 | verbose: true 74 | -------------------------------------------------------------------------------- /.github/workflows/publish-website.yml: -------------------------------------------------------------------------------- 1 | name: publish website 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build_docs_job: 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: [3.6] 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v2 19 | - name: Install dependencies 20 | run: | 21 | sudo apt-get install doxygen 22 | - name: Build the Website 23 | run: | 24 | cd website 25 | yarn install 26 | yarn run build 27 | id: build 28 | - name: Get output time 29 | run: echo "The time was ${{ steps.build.outputs.time }}" 30 | - name: Deploy 31 | if: ${{ github.event_name == 'push' }} 32 | uses: JamesIves/github-pages-deploy-action@releases/v3 33 | with: 34 | ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} 35 | BRANCH: gh-pages # The branch the action should deploy to. 36 | FOLDER: website/build # The folder the action should deploy. 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | **/.DS_Store 3 | *.slo 4 | *.lo 5 | *.o 6 | *.obj 7 | 8 | # Precompiled Headers 9 | *.gch 10 | *.pch 11 | 12 | # Compiled Dynamic libraries 13 | *.so 14 | *.dylib 15 | *.dll 16 | 17 | # Fortran module files 18 | *.mod 19 | *.smod 20 | 21 | # Compiled Static libraries 22 | *.lai 23 | *.la 24 | *.a 25 | *.lib 26 | 27 | # Executables 28 | *.exe 29 | *.out 30 | *.app 31 | 32 | **/cmake-build-debug 33 | **/CMakeCache.txt 34 | **/cmake_install.cmake 35 | **/install_manifest.txt 36 | **/CMakeFiles/ 37 | **/CTestTestfile.cmake 38 | **/Makefile 39 | **/*.cbp 40 | **/CMakeScripts 41 | **/compile_commands.json 42 | 43 | include/divisible/* 44 | 45 | 46 | ## Local 47 | 48 | .idea/*.xml 49 | 50 | build/**/* 51 | 52 | include/* 53 | lib/* 54 | bin/* 55 | test/test_runner 56 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/third_party/fast-cpp-csv-parser"] 2 | path = src/third_party/fast-cpp-csv-parser 3 | url = https://github.com/ben-strasser/fast-cpp-csv-parser.git 4 | [submodule "src/third_party/eigen"] 5 | path = src/third_party/eigen 6 | url = https://gitlab.com/libeigen/eigen.git 7 | [submodule "src/third_party/cereal"] 8 | path = src/third_party/cereal 9 | url = https://github.com/USCiLab/cereal.git 10 | [submodule "src/third_party/Sophus"] 11 | path = src/third_party/Sophus 12 | url = https://github.com/strasdat/Sophus.git 13 | [submodule "src/third_party/vrs"] 14 | path = src/third_party/vrs 15 | url = https://github.com/facebookresearch/vrs.git 16 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | This Code of Conduct also applies outside the project spaces when there is a 56 | reasonable belief that an individual's behavior may have a negative impact on 57 | the project or its community. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported by contacting the project team at . All 63 | complaints will be reviewed and investigated and will result in a response that 64 | is deemed necessary and appropriate to the circumstances. The project team is 65 | obligated to maintain confidentiality with regard to the reporter of an incident. 66 | Further details of specific enforcement policies may be posted separately. 67 | 68 | Project maintainers who do not follow or enforce the Code of Conduct in good 69 | faith may face temporary or permanent repercussions as determined by other 70 | members of the project's leadership. 71 | 72 | ## Attribution 73 | 74 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 75 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 76 | 77 | [homepage]: https://www.contributor-covenant.org 78 | 79 | For answers to common questions about this code of conduct, see 80 | https://www.contributor-covenant.org/faq 81 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to "Aria Research Kit (ARK)" 2 | 3 | We want to make contributing to this project as easy and transparent as 4 | possible. 5 | 6 | ## Pull Requests 7 | 8 | We welcome pull requests. 9 | 10 | 1. Fork the repo and create your branch from `master`. 11 | 2. If you've added code that should be tested, add tests. 12 | 3. If you've changed APIs, update the documentation in the code. 13 | 4. Ensure the test suite passes. 14 | 5. If you haven't already, complete the Contributor License Agreement ("CLA"). 15 | 16 | ## Contributor License Agreement ("CLA") 17 | 18 | In order to accept your pull request, we need you to submit a CLA. You only need 19 | to do this once to work on any of Facebook's open source projects. 20 | 21 | Complete your CLA here: 22 | 23 | ## Issues 24 | 25 | We use GitHub issues to track public bugs. Please ensure your description is 26 | clear and has sufficient instructions to be able to reproduce the issue. 27 | 28 | Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe 29 | disclosure of security bugs. In those cases, please go through the process 30 | outlined on that page and do not file a public issue. 31 | 32 | ## License 33 | 34 | By contributing to "Aria Research Kit (ARK)", you agree that your contributions will be licensed under 35 | the [LICENSE](./LICENSE) file in the root directory of this source tree. 36 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Start from an ubuntu container 16 | FROM ubuntu:focal 17 | 18 | # Ensure a SUDO command is available in the container 19 | RUN if type sudo 2>/dev/null; then \ 20 | echo "The sudo command already exists... Skipping."; \ 21 | else \ 22 | echo "#!/bin/sh\n\${@}" > /usr/sbin/sudo; \ 23 | chmod +x /usr/sbin/sudo; \ 24 | fi 25 | 26 | # Update & upgrade distribution repositories 27 | RUN apt-get update --fix-missing && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y tzdata --fix-missing; sudo apt upgrade -y --fix-missing 28 | 29 | # Install build essentials 30 | RUN sudo apt-get install -y cmake git build-essential; 31 | 32 | # Install python pip essentials 33 | RUN sudo apt-get install -y libpython3-dev python3-pip; 34 | 35 | # Install VRS dependencies and compile/install VRS 36 | # Note that we install cereal (header only) library to get last version 37 | # On some system libcereal-dev can be enough 38 | RUN sudo apt-get install -y libgtest-dev libgmock-dev \ 39 | libfmt-dev \ 40 | libturbojpeg-dev libpng-dev \ 41 | liblz4-dev libzstd-dev libxxhash-dev \ 42 | libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-date-time-dev; \ 43 | cd /tmp; git clone https://github.com/USCiLab/cereal.git -b v1.3.2 \ 44 | && cd cereal \ 45 | && cmake -DSKIP_PORTABILITY_TEST=1 -DJUST_INSTALL_CEREAL=ON .; sudo make -j2 install; rm -rf /tmp/cereal; 46 | 47 | # Code 48 | ADD ./ /opt/aria_data_tools 49 | 50 | # Configure 51 | RUN mkdir /opt/aria_data_tools_Build; cd /opt/aria_data_tools_Build; cmake -DBUILD_WITH_PANGOLIN=OFF /opt/aria_data_tools/src; 52 | 53 | # Build & test 54 | RUN cd /opt/aria_data_tools_Build; make -j2 ; ctest -j; 55 | 56 | # Build python bindings 57 | RUN cd /opt/aria_data_tools/src; pip3 install --global-option=build_ext --global-option="-j2" .; 58 | -------------------------------------------------------------------------------- /Dockerfile.fedora: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Start from a Fedora container 16 | FROM docker.io/dokken/fedora-38 17 | 18 | # Ensure a SUDO command is available in the container 19 | RUN if type sudo 2>/dev/null; then \ 20 | echo "The sudo command already exists... Skipping."; \ 21 | else \ 22 | echo "#!/bin/sh\n\${@}" > /usr/sbin/sudo; \ 23 | chmod +x /usr/sbin/sudo; \ 24 | fi 25 | 26 | # Install build essentials 27 | RUN sudo dnf install -y git cmake gcc gcc-c++ make 28 | 29 | # Install python pip essentials 30 | RUN sudo dnf install -y python3-devel; pip3 install --upgrade pip; pip3 install pybind11[global] numpy 31 | 32 | # Install VRS dependencies and compile/install VRS 33 | RUN sudo dnf install -y gtest-devel gmock-devel glog-devel \ 34 | fmt-devel lz4-devel libzstd-devel xxhash-devel \ 35 | boost-devel libpng-devel libjpeg-turbo-devel turbojpeg-devel; 36 | 37 | # Build Cereal (header only library) 38 | RUN cd /tmp; git clone https://github.com/USCiLab/cereal.git -b v1.3.2; cd cereal; cmake -DSKIP_PORTABILITY_TEST=1 -DJUST_INSTALL_CEREAL=ON .; sudo make -j install 39 | 40 | # Code 41 | ADD ./ /opt/aria_data_tools 42 | 43 | # Configure 44 | RUN mkdir /opt/aria_data_tools_Build; cd /opt/aria_data_tools_Build; cmake -DBUILD_WITH_PANGOLIN=OFF /opt/aria_data_tools/src; 45 | 46 | # Build & test 47 | RUN cd /opt/aria_data_tools_Build; make -j2 ; ctest -j; 48 | 49 | # Build python bindings 50 | RUN cd /opt/aria_data_tools/src; pip3 install --global-option=build_ext --global-option="-j2" .; 51 | -------------------------------------------------------------------------------- /data/aria_sensors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/data/aria_sensors.jpg -------------------------------------------------------------------------------- /data/aria_unit_test_sequence_calib.vrs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/data/aria_unit_test_sequence_calib.vrs -------------------------------------------------------------------------------- /node_modules/.yarn-integrity: -------------------------------------------------------------------------------- 1 | { 2 | "systemParams": "darwin-x64-108", 3 | "modulesFolders": [ 4 | "node_modules" 5 | ], 6 | "flags": [ 7 | "checkFiles" 8 | ], 9 | "linkedModules": [], 10 | "topLevelPatterns": [], 11 | "lockfileEntries": {}, 12 | "files": [], 13 | "artifacts": {} 14 | } -------------------------------------------------------------------------------- /projects/AriaPilotDatasetTools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | message("--- Compiling AriaPilotDatasetTools.") 16 | 17 | cmake_minimum_required(VERSION 3.12) 18 | 19 | project(AriaPilotDatasetTools 20 | VERSION 0.1 21 | DESCRIPTION "Data provider and utilities for Project Aria Pilot Dataset (CVPR2022)." 22 | LANGUAGES CXX) 23 | 24 | set(CMAKE_CXX_STANDARD 17) 25 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 26 | 27 | # Build in Release mode by default 28 | if (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 29 | set(CMAKE_BUILD_TYPE "Release") 30 | endif (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 31 | 32 | # Allow to use set for parent projects 33 | set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) 34 | 35 | find_package(Pangolin QUIET) 36 | if (Pangolin_FOUND) 37 | set(BUILD_WITH_PANGOLIN ON) 38 | else() 39 | set(BUILD_WITH_PANGOLIN OFF) 40 | endif() 41 | 42 | # This folder is "Project" using aria data tools core libraries 43 | add_subdirectory(../../src ariaDataToolsCore EXCLUDE_FROM_ALL) 44 | 45 | add_library(pilotDatasetProvider_lib 46 | PilotDataset.cpp 47 | PilotDataset.h 48 | speech_to_text_datum.h) 49 | target_link_libraries(pilotDatasetProvider_lib 50 | PUBLIC 51 | aria_viewer_lib 52 | vrsdataprovider 53 | Sophus::Sophus 54 | ) 55 | target_include_directories(pilotDatasetProvider_lib 56 | PUBLIC 57 | ${CMAKE_CURRENT_SOURCE_DIR} 58 | PRIVATE 59 | "../../src/third_party/"#fast-cpp-csv-parser 60 | ) 61 | 62 | if (BUILD_WITH_PANGOLIN) 63 | message("--- Pangolin library has been found. Visualizer will be built") 64 | find_package(Threads REQUIRED) 65 | add_executable(pilotDataset_viewer 66 | ./viewer/main.cpp 67 | ./viewer/PilotDatasetViewer.cpp 68 | ./viewer/PilotDatasetViewer.h) 69 | target_link_libraries(pilotDataset_viewer 70 | PRIVATE 71 | aria_viewer_lib 72 | pilotDatasetProvider_lib 73 | ${Pangolin_LIBRARIES} 74 | Threads::Threads) 75 | else() 76 | message("--- Pangolin (optional) library dependency has NOT been found. The dataset visualizer will NOT be built") 77 | endif (BUILD_WITH_PANGOLIN) 78 | -------------------------------------------------------------------------------- /projects/AriaPilotDatasetTools/PilotDataset.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include "AriaVrsDataProvider.h" 21 | #include "speech_to_text_datum.h" 22 | 23 | namespace ark::datatools::dataprovider { 24 | 25 | // PilotDatasetProvider provides the necessary APIs to load and access timesync data from the Aria 26 | // CVPR Pilot dataset 27 | // 3 kind of metadata is available: 28 | // - Poses (based on IMULeft) 29 | // - EyeTracking 30 | // - SpeechToText 31 | class PilotDatasetProvider : public AriaVrsDataProvider { 32 | public: 33 | // Initialize Additional data, VRS will still be load using the open(X) function 34 | PilotDatasetProvider( 35 | const std::string& posePath = "", 36 | const std::string& eyetrackingPath = "", 37 | const std::string& speechToTextPath = ""); 38 | 39 | // 40 | // Time aligned serving of Dataset metadata 41 | // 42 | 43 | // eyetracking data time-aligned serving 44 | std::optional getEyetracksOnRgbImage() const; 45 | // speechToText data time-aligned serving 46 | std::optional getSpeechToText() const; 47 | // aria pose side-loading time-aligned serving 48 | std::optional getPose() const; 49 | 50 | // return pose aligned with the current SLAM camera timestamp 51 | std::optional getLatestPoseOfStream(const vrs::StreamId& streamId); 52 | std::optional getPoseOfStreamAtTimestampNs( 53 | const vrs::StreamId& streamId, 54 | const int64_t timestampNs); 55 | 56 | protected: 57 | std::map imuLeftPoses_; 58 | std::map eyetracksOnRgbImage_; 59 | std::map speechToText_; 60 | 61 | bool hasEyetracks_ = false; 62 | bool hasSpeechToText_ = false; 63 | bool hasPoses_ = false; 64 | }; 65 | 66 | } // namespace ark::datatools::dataprovider 67 | -------------------------------------------------------------------------------- /projects/AriaPilotDatasetTools/speech_to_text_datum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | namespace ark::datatools::dataprovider { 20 | 21 | // struct to hold one speech-to-text datum spanning the time from tStart to tEnd (in nano 22 | // seconds). 23 | struct SpeechToTextDatum { 24 | // start and end time of the utterance 25 | int64_t tStart_ns = 0; 26 | int64_t tEnd_ns = 0; 27 | // the transcribed text 28 | std::string text = ""; 29 | // the confidence in the transcription 30 | float confidence = 0.; 31 | 32 | // compute duration in nano seconds of the utterance 33 | int64_t duration_ns() const { 34 | return tEnd_ns - tStart_ns; 35 | } 36 | // compute duration in seconds of the utterance 37 | double duration_s() const { 38 | return duration_ns() * 1e-9; 39 | } 40 | }; 41 | 42 | } // namespace ark::datatools::dataprovider 43 | -------------------------------------------------------------------------------- /projects/AriaPilotDatasetTools/viewer/PilotDatasetViewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "AriaViewerBase.h" 20 | 21 | #include "PilotDataset.h" 22 | 23 | namespace ark::datatools::visualization { 24 | 25 | class PilotDatasetViewer : public AriaViewerBase { 26 | public: 27 | PilotDatasetViewer( 28 | dataprovider::PilotDatasetProvider* dataProvider, 29 | int width, 30 | int height, 31 | const std::string& name = "PilotDatasetViewer", 32 | int id = 0); 33 | 34 | ~PilotDatasetViewer() override = default; 35 | 36 | void run() override; 37 | 38 | std::pair initDataStreams( 39 | const std::vector& kImageStreamIds, 40 | const std::vector&, 41 | const std::vector&) override; 42 | 43 | private: 44 | void setPose(const std::optional& T_World_ImuLeft); 45 | 46 | void drawTraj(); 47 | void drawRigs( 48 | bool showRig3D = true, 49 | bool showLeftCam3D = true, 50 | bool showRightCam3D = true, 51 | bool showRgbCam3D = true, 52 | int camSparsity = 4); 53 | 54 | // Save transformation to move data to IMU Left (Aria Pilot dataset Reference system) 55 | std::unordered_map> 56 | T_ImuLeft_cameraMap_; 57 | 58 | std::vector T_World_Camera_; // Position of the Aria device 59 | Sophus::SE3d T_Viewer_World_; // Setup initial position 60 | 61 | const dataprovider::PilotDatasetProvider* dataProvider_; 62 | }; 63 | } // namespace ark::datatools::visualization 64 | -------------------------------------------------------------------------------- /projects/EgoExo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | message("--- Compiling EgoExo.") 16 | 17 | cmake_minimum_required(VERSION 3.12) 18 | 19 | project(AriaPilotDatasetTools 20 | VERSION 0.1 21 | DESCRIPTION "Utilities for the EgoExo dataset." 22 | LANGUAGES CXX) 23 | 24 | set(CMAKE_CXX_STANDARD 17) 25 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 26 | 27 | # Build in Release mode by default 28 | if (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 29 | set(CMAKE_BUILD_TYPE "Release") 30 | endif (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 31 | 32 | # This folder is "Project" using aria data tools core libraries 33 | add_subdirectory(../../src ariaDataToolsCore EXCLUDE_FROM_ALL) 34 | 35 | find_package(Pangolin QUIET) 36 | 37 | find_package(Boost REQUIRED COMPONENTS iostreams) 38 | 39 | if (Pangolin_FOUND) 40 | 41 | add_library(compressed_istream CompressedIStream.cpp CompressedIStream.h) 42 | target_link_libraries(compressed_istream PUBLIC Boost::iostreams) 43 | 44 | add_library(data_loaders 45 | GlobalPointCloud.h 46 | GlobalPointCloudReader.h GlobalPointCloudReader.cpp 47 | GoProCalibration.h 48 | GoProCalibrationReader.h GoProCalibrationReader.cpp) 49 | target_link_libraries(data_loaders PUBLIC mps_io compressed_istream) 50 | target_include_directories(data_loaders 51 | PRIVATE 52 | ${CMAKE_CURRENT_SOURCE_DIR} 53 | "../../src/third_party/"#fast-cpp-csv-parser 54 | ) 55 | 56 | add_executable(egoExoViewer 57 | main.cpp 58 | Data3DGui.cpp Data3DGui.h 59 | ) 60 | target_link_libraries(egoExoViewer 61 | PRIVATE 62 | data_loaders 63 | ${Pangolin_LIBRARIES} 64 | ) 65 | else() 66 | message("Pangolin has not been found. We can't compile this 'egoExoViewer' binary") 67 | endif() 68 | -------------------------------------------------------------------------------- /projects/EgoExo/CompressedIStream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "CompressedIStream.h" 18 | 19 | #include 20 | #include 21 | 22 | namespace utils { 23 | CompressedIStream::CompressedIStream(const std::string& path, StreamCompressionMode compression) 24 | : std::istream(&inbuf_), 25 | backingIfstream_(path.c_str(), std::ios_base::in | std::ios_base::binary), 26 | inbuf_() { 27 | if (compression == StreamCompressionMode::GZIP) { 28 | inbuf_.push(boost::iostreams::gzip_decompressor()); 29 | } 30 | 31 | assert(backingIfstream_.good()); 32 | inbuf_.push(backingIfstream_); 33 | } 34 | } // namespace utils 35 | -------------------------------------------------------------------------------- /projects/EgoExo/CompressedIStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace utils { 24 | 25 | enum class StreamCompressionMode { 26 | NONE, 27 | GZIP, 28 | }; 29 | 30 | using boost_filtering_inbuf = boost::iostreams::filtering_streambuf; 31 | 32 | class CompressedIStream : public std::istream { 33 | public: 34 | explicit CompressedIStream( 35 | const std::string& path, 36 | StreamCompressionMode compression = StreamCompressionMode::GZIP); 37 | 38 | private: 39 | std::ifstream backingIfstream_; // destruct AFTER inbuf_ 40 | boost_filtering_inbuf inbuf_; // destruct BEFORE backingIfstream_ 41 | }; 42 | } // namespace utils 43 | -------------------------------------------------------------------------------- /projects/EgoExo/GlobalPointCloud.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ego_exo { 23 | 24 | // 25 | // Point cloud data 26 | // 27 | 28 | struct GlobalPointPosition { 29 | // A unique identifier of this point within this map 30 | uint64_t uid; 31 | 32 | // The position of this point relative the world coordinate frame 33 | Eigen::Vector3d position_world; 34 | 35 | // Number of observations of the point 36 | uint64_t numObservations; 37 | 38 | // Standard deviation of the inverse distance estimate 39 | float inverseDistanceStd; 40 | 41 | // Standard deviation of distance estimate 42 | float distanceStd; 43 | 44 | // Noise-normalized magnitude of image gradient squared 45 | float normImageGradientSquared; 46 | }; 47 | 48 | using GlobalPointCloud = std::vector; 49 | 50 | } // namespace ego_exo 51 | -------------------------------------------------------------------------------- /projects/EgoExo/GlobalPointCloudReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "GlobalPointCloudReader.h" 18 | 19 | #include "CompressedIStream.h" 20 | 21 | #ifndef CSV_IO_NO_THREAD 22 | #define CSV_IO_NO_THREAD 23 | #endif 24 | #include 25 | 26 | #include 27 | 28 | namespace ego_exo { 29 | 30 | GlobalPointCloud readGlobalPointCloud( 31 | const std::string& path, 32 | const utils::StreamCompressionMode compression) { 33 | utils::CompressedIStream istream(path, compression); 34 | io::CSVReader csv(path.c_str(), istream); 35 | 36 | // Read in the CSV header 37 | const auto readHeader = [&](auto&&... args) { csv.read_header(io::ignore_no_column, args...); }; 38 | std::apply(readHeader, kGlobalPointCloudColumns); 39 | 40 | GlobalPointCloud cloud; 41 | GlobalPointPosition point; 42 | 43 | while (csv.read_row( 44 | point.uid, 45 | point.position_world.x(), 46 | point.position_world.y(), 47 | point.position_world.z(), 48 | point.numObservations, 49 | point.inverseDistanceStd, 50 | point.distanceStd, 51 | point.normImageGradientSquared)) { 52 | cloud.push_back(point); 53 | } 54 | 55 | std::cout << "Loaded #3dPoints: " << cloud.size() << std::endl; 56 | 57 | return cloud; 58 | } 59 | 60 | } // namespace ego_exo 61 | -------------------------------------------------------------------------------- /projects/EgoExo/GlobalPointCloudReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "GlobalPointCloud.h" 20 | 21 | #include "CompressedIStream.h" 22 | 23 | #include 24 | #include 25 | 26 | namespace ego_exo { 27 | 28 | constexpr std::array kGlobalPointCloudColumns = { 29 | "uid", 30 | "px_world", 31 | "py_world", 32 | "pz_world", 33 | "num_observations", 34 | "inv_dist_std", 35 | "dist_std", 36 | "norm_image_gradient_squared"}; 37 | 38 | GlobalPointCloud readGlobalPointCloud( 39 | const std::string& path, 40 | const utils::StreamCompressionMode compression); 41 | 42 | } // namespace ego_exo 43 | -------------------------------------------------------------------------------- /projects/EgoExo/GoProCalibration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | namespace ego_exo { 25 | 26 | // 27 | // GoPro Camera data 28 | // 29 | 30 | // GoPro intrinsic calib, and extrinsic pose in the world frame 31 | struct GoProCalibration { 32 | // GoPro's unique identifier, currently we are using path of the video file 33 | std::string uid; 34 | // GoPro's pose in world frame 35 | Sophus::SE3d T_world_gopro; 36 | // image size 37 | int width, height; 38 | // cam intrinsic calibration params ("fx, fy, cx, cy, k1, k2, k3, k4") 39 | std::array intrinsics; 40 | }; 41 | 42 | using GoProCalibrations = std::vector; 43 | 44 | } // namespace ego_exo 45 | -------------------------------------------------------------------------------- /projects/EgoExo/GoProCalibrationReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "GoProCalibrationReader.h" 18 | 19 | #ifndef CSV_IO_NO_THREAD 20 | #define CSV_IO_NO_THREAD 21 | #endif 22 | #include 23 | 24 | #include 25 | 26 | namespace ego_exo { 27 | 28 | GoProCalibrations loadGoProCalibrations(const std::string& fileName) { 29 | GoProCalibrations poses; 30 | 31 | io::CSVReader csv(fileName); 32 | // Read in the CSV header 33 | const auto readHeader = [&](auto&&... args) { csv.read_header(io::ignore_no_column, args...); }; 34 | std::apply(readHeader, kGoProPoseHeader); 35 | 36 | std::string gopro_uid; 37 | Eigen::Vector3d t_world_gopro; 38 | Eigen::Quaterniond q_world_gopro; 39 | int width, height; 40 | std::array intrinsics; 41 | 42 | while (csv.read_row( 43 | gopro_uid, 44 | t_world_gopro.x(), 45 | t_world_gopro.y(), 46 | t_world_gopro.z(), 47 | q_world_gopro.x(), 48 | q_world_gopro.y(), 49 | q_world_gopro.z(), 50 | q_world_gopro.w(), 51 | width, 52 | height, 53 | intrinsics[0], 54 | intrinsics[1], 55 | intrinsics[2], 56 | intrinsics[3], 57 | intrinsics[4], 58 | intrinsics[5], 59 | intrinsics[6], 60 | intrinsics[7])) { 61 | auto& pose = poses.emplace_back(); 62 | pose.uid = gopro_uid; 63 | pose.T_world_gopro = Sophus::SE3d(q_world_gopro, t_world_gopro); 64 | pose.width = width; 65 | pose.height = height; 66 | pose.intrinsics = intrinsics; 67 | } 68 | std::cout << "Loaded #GoProCalibration data: " << poses.size() << std::endl; 69 | 70 | return poses; 71 | } 72 | 73 | } // namespace ego_exo 74 | -------------------------------------------------------------------------------- /projects/EgoExo/GoProCalibrationReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "GoProCalibration.h" 20 | 21 | #include 22 | 23 | namespace ego_exo { 24 | 25 | constexpr std::array kGoProPoseHeader = { 26 | "gopro_uid", 27 | "tx_world_gopro", 28 | "ty_world_gopro", 29 | "tz_world_gopro", 30 | "qx_world_gopro", 31 | "qy_world_gopro", 32 | "qz_world_gopro", 33 | "qw_world_gopro", 34 | "image_width", 35 | "image_height", 36 | "intrinsics_0", 37 | "intrinsics_1", 38 | "intrinsics_2", 39 | "intrinsics_3", 40 | "intrinsics_4", 41 | "intrinsics_5", 42 | "intrinsics_6", 43 | "intrinsics_7", 44 | }; 45 | 46 | GoProCalibrations loadGoProCalibrations(const std::string& fileName); 47 | 48 | } // namespace ego_exo 49 | -------------------------------------------------------------------------------- /projects/EgoExo/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Get Started 2 | 3 |
4 | 1. Checkout/Compilation 5 | 6 | 7 | ``` 8 | # Clone the project & assuming Pangolin is setup on your machine 9 | git clone https://github.com/facebookresearch/Aria_data_tools.git --recursive 10 | mkdir build 11 | cmake -DCMAKE_BUILD_TYPE=RELEASE -S ./Aria_data_tools/projects/EgoExo -B build 12 | cd build 13 | make -j 14 | ``` 15 |
16 | 17 |
18 | 2. Running the Data Inspector 19 | 20 | 21 | ``` 22 | ./egoExoViewer 23 | ``` 24 |
25 | 26 |
27 | 3. Dataset documentation 28 | 29 | 30 | A EgoExo dataset is compounded of required and optional files such as: 31 | - 1 to N Aria trajectory files as closed_loop_trajectory.csv 32 | - 0 to 1 point cloud file in csv or csv.gz format as global_points<.csv/.csv.gz> 33 | - 0 to 1 GoPro cloud file in csv format as gopro_calibrations.csv 34 | ``` 35 |
36 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | cmake_minimum_required(VERSION 3.12) 16 | 17 | project(ark 18 | VERSION 0.1 19 | DESCRIPTION "SDK and utilities for Project Aria datasets." 20 | LANGUAGES CXX) 21 | 22 | set(CMAKE_CXX_STANDARD 17) 23 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 24 | 25 | # Build in Release mode by default 26 | if (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 27 | set(CMAKE_BUILD_TYPE "Release") 28 | endif (NOT CMAKE_BUILD_TYPE AND NOT MSVC) 29 | 30 | # Handle shared 3rd party library (all as submodules) 31 | option(UNIT_TESTS OFF) 32 | option(BUILD_SAMPLES OFF) 33 | option(BUILD_TOOLS OFF) 34 | add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third_party/vrs" EXCLUDE_FROM_ALL) 35 | add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen" EXCLUDE_FROM_ALL) 36 | option(SKIP_PERFORMANCE_COMPARISON OFF) 37 | option(BUILD_SANDBOX OFF) 38 | option(BUILD_DOC OFF) 39 | add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third_party/cereal") 40 | option(BUILD_SOPHUS_TESTS OFF) 41 | option(BUILD_SOPHUS_EXAMPLES OFF) 42 | add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third_party/Sophus") 43 | add_definitions("-DSOPHUS_DISABLE_ENSURES") 44 | 45 | # Project CMAKE options 46 | option(BUILD_PYARK "Build python binding." OFF) 47 | option(BUILD_ARK_TESTS "Build tests." ON) 48 | option(BUILD_ARK_EXAMPLES "Build examples." ON) 49 | option(BUILD_WITH_PANGOLIN "Build Pangolin related samples" OFF) 50 | 51 | if(BUILD_ARK_TESTS) 52 | enable_testing() 53 | endif(BUILD_ARK_TESTS) 54 | 55 | if(BUILD_PYARK) 56 | include(FetchContent) 57 | FetchContent_Declare( 58 | pybind11 59 | GIT_REPOSITORY https://github.com/pybind/pybind11.git 60 | GIT_TAG master 61 | ) 62 | FetchContent_MakeAvailable(pybind11) 63 | 64 | add_subdirectory(${pybind11_SOURCE_DIR}) 65 | pybind11_add_module(projectaria_tools ${CMAKE_CURRENT_SOURCE_DIR}/python/bindings.cpp) 66 | target_link_libraries(projectaria_tools PUBLIC dataprovider sensors mps_io vrslib) 67 | endif(BUILD_PYARK) 68 | 69 | 70 | add_subdirectory(data_provider) 71 | add_subdirectory(sensors) 72 | 73 | if (BUILD_ARK_EXAMPLES) 74 | add_subdirectory(experimental) 75 | endif(BUILD_ARK_EXAMPLES) 76 | 77 | if (BUILD_WITH_PANGOLIN) 78 | add_subdirectory(visualization) 79 | endif(BUILD_WITH_PANGOLIN) 80 | -------------------------------------------------------------------------------- /src/ReadMe.md: -------------------------------------------------------------------------------- 1 | # What is in this folder? 2 | 3 | - `data_provider`: Tools for reading and playing Aria sequences (VRS files). 4 | - `sensors`: Sensor model definitions and calibration tooling. 5 | - `scripts`: Scripts for installing build dependencies. 6 | - `visualization`: A viewer class and sample usages that utilize it. 7 | - `python`: Python bindings for data provider, device model and viewer tool. 8 | -------------------------------------------------------------------------------- /src/data_provider/AriaDataProvider.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "models/DeviceModel.h" 24 | 25 | namespace ark::datatools::dataprovider { 26 | 27 | class AriaDataProvider { 28 | protected: 29 | using optional_audio_reference_vector = 30 | std::optional>>; 31 | using optional_img_buffer_reference_vector = 32 | std::optional>>; 33 | 34 | public: 35 | AriaDataProvider() = default; 36 | virtual ~AriaDataProvider() = default; 37 | virtual bool open(const std::string& sourcePath) = 0; 38 | virtual void setStreamPlayer(const vrs::StreamId& streamId) = 0; 39 | virtual bool tryFetchNextData( 40 | const vrs::StreamId& streamId, 41 | double currentTimestampSec = std::numeric_limits::max()) = 0; 42 | virtual void* getImageBuffer(const vrs::StreamId& streamId) const = 0; 43 | virtual optional_img_buffer_reference_vector getImageBufferVector( 44 | const vrs::StreamId& streamId) const = 0; 45 | virtual uint32_t getImageWidth(const vrs::StreamId& streamId) const = 0; 46 | virtual uint32_t getImageHeight(const vrs::StreamId& streamId) const = 0; 47 | virtual double getFastestNominalRateHz() = 0; 48 | virtual double getFirstTimestampSec() = 0; 49 | // imu data 50 | virtual Eigen::Vector3f getMotionAccelData(const vrs::StreamId& streamId) const = 0; 51 | virtual Eigen::Vector3f getMotionGyroData(const vrs::StreamId& streamId) const = 0; 52 | // barometer data 53 | virtual double getBarometerPressure() const = 0; 54 | virtual double getBarometerTemperature() const = 0; 55 | // magnetometer data 56 | virtual Eigen::Vector3f getMagnetometerData() const = 0; 57 | // audio data 58 | virtual optional_audio_reference_vector getAudioData() const = 0; 59 | virtual uint8_t getAudioNumChannels() const = 0; 60 | 61 | virtual bool atLastRecords() = 0; 62 | virtual bool loadDeviceModel() = 0; 63 | virtual bool streamExistsInSource(const vrs::StreamId& streamId) = 0; 64 | 65 | virtual void setImagePlayerVerbose(const vrs::StreamId& streamId, bool verbose) = 0; 66 | virtual void setMotionPlayerVerbose(const vrs::StreamId& streamId, bool verbose) = 0; 67 | virtual void setWifiBeaconPlayerVerbose(bool verbose) = 0; 68 | virtual void setAudioPlayerVerbose(bool verbose) = 0; 69 | virtual void setBluetoothBeaconPlayerVerbose(bool verbose) = 0; 70 | virtual void setGpsPlayerVerbose(bool verbose) = 0; 71 | virtual void setBarometerPlayerVerbose(bool verbose) = 0; 72 | virtual void setTimeSyncPlayerVerbose(bool verbose) = 0; 73 | 74 | const datatools::sensors::DeviceModel& getDeviceModel() const { 75 | return deviceModel_; 76 | } 77 | 78 | protected: 79 | std::set providerStreamIds_; 80 | datatools::sensors::DeviceModel deviceModel_; 81 | 82 | std::string sourcePath_; 83 | }; 84 | } // namespace ark::datatools::dataprovider 85 | -------------------------------------------------------------------------------- /src/data_provider/AriaStreamIds.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // List all StreamId related to Aria Data Layout 22 | namespace ark::datatools::dataprovider { 23 | static const vrs::StreamId kEyeCameraStreamId{vrs::RecordableTypeId::EyeCameraRecordableClass, 1}; 24 | static const vrs::StreamId kRgbCameraStreamId{vrs::RecordableTypeId::RgbCameraRecordableClass, 1}; 25 | static const vrs::StreamId kSlamLeftCameraStreamId{vrs::RecordableTypeId::SlamCameraData, 1}; 26 | static const vrs::StreamId kSlamRightCameraStreamId{vrs::RecordableTypeId::SlamCameraData, 2}; 27 | static const vrs::StreamId kImuRightStreamId{vrs::RecordableTypeId::SlamImuData, 1}; 28 | static const vrs::StreamId kImuLeftStreamId{vrs::RecordableTypeId::SlamImuData, 2}; 29 | static const vrs::StreamId kMagnetometerStreamId{vrs::RecordableTypeId::SlamMagnetometerData, 1}; 30 | static const vrs::StreamId kBarometerStreamId{vrs::RecordableTypeId::BarometerRecordableClass, 1}; 31 | static const vrs::StreamId kAudioStreamId{vrs::RecordableTypeId::StereoAudioRecordableClass, 1}; 32 | static const vrs::StreamId kWifiStreamId{vrs::RecordableTypeId::WifiBeaconRecordableClass, 1}; 33 | static const vrs::StreamId kBluetoothStreamId{ 34 | vrs::RecordableTypeId::BluetoothBeaconRecordableClass, 35 | 1}; 36 | static const vrs::StreamId kGpsStreamId{vrs::RecordableTypeId::GpsRecordableClass, 1}; 37 | static const vrs::StreamId kTimeSyncStreamId{vrs::RecordableTypeId::TimeRecordableClass, 1}; 38 | } // namespace ark::datatools::dataprovider 39 | -------------------------------------------------------------------------------- /src/data_provider/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | add_library(dataprovider AriaDataProvider.h AriaStreamIds.h utils.h utils.cpp) 16 | target_link_libraries(dataprovider 17 | PUBLIC 18 | players 19 | sensors 20 | vrsdataprovider 21 | Sophus::Sophus) 22 | target_include_directories(dataprovider 23 | PUBLIC 24 | ${CMAKE_CURRENT_SOURCE_DIR} "../" 25 | PRIVATE 26 | "../third_party/"#fast-cpp-csv-parser" 27 | ) 28 | 29 | add_library(vrsdataprovider AriaVrsDataProvider.h AriaVrsDataProvider.cpp) 30 | target_link_libraries(vrsdataprovider PUBLIC dataprovider players) 31 | target_include_directories(vrsdataprovider PUBLIC dataprovider ${CMAKE_CURRENT_SOURCE_DIR}) 32 | 33 | add_subdirectory(data_layout) 34 | add_subdirectory(examples) 35 | add_subdirectory(mps_io) 36 | 37 | if (BUILD_WITH_PANGOLIN) 38 | add_subdirectory(mps_visualization) 39 | endif(BUILD_WITH_PANGOLIN) 40 | 41 | add_subdirectory(players) 42 | -------------------------------------------------------------------------------- /src/data_provider/ReadMe.md: -------------------------------------------------------------------------------- 1 | # What is in this folder? 2 | 3 | - `examples`: Sample usages of Aria data provider for reading Aria sequences. 4 | - `players`: Player implementations for every Aria stream, which allows storing/retrieving VRS configuration/data records. 5 | - `AriaVrsDataProvider.h/.cpp`: A VRS data provider class `AriaVrsDataProvider` with an interface that enables attaching players to a `vrs::RecordFileReader` instance and exposing its basic operations. 6 | - `AriaDataProvider.h`: The base class `AriaDataProvider` that folder data provider class under `examples` and VRS data provider class inherit. Primarily defined for enabling the usage of functionality that exists in both data provider types. 7 | - `utils.h/cpp`: Contains helper functions for data provider. 8 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | file( 16 | GLOB 17 | header_files 18 | ./aria/*.h 19 | ) 20 | 21 | add_library(ariaDataLayout INTERFACE) 22 | target_sources(ariaDataLayout INTERFACE ${header_files}) 23 | target_link_libraries(ariaDataLayout INTERFACE vrslib) 24 | target_include_directories(ariaDataLayout INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) 25 | 26 | add_executable(AriaFileReader ./aria/sample_app/AriaFileReader.cpp) 27 | target_link_libraries(AriaFileReader PRIVATE ariaDataLayout) 28 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/AudioMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | // Note: The VRS stream type for audio data is 26 | // vrs::RecordableTypeId::StereoAudioRecordableClass. 27 | 28 | namespace aria { 29 | 30 | struct AudioConfigRecordMetadata : public vrs::AutoDataLayout { 31 | static constexpr uint32_t kVersion = 2; 32 | 33 | vrs::DataPieceValue streamId{"stream_id"}; 34 | 35 | // Number of channels in the audio stream. 36 | vrs::DataPieceValue numChannels{vrs::datalayout_conventions::kAudioChannelCount}; 37 | 38 | // Number of samples per second. Typical values: 44100Hz. 39 | vrs::DataPieceValue sampleRate{vrs::datalayout_conventions::kAudioSampleRate}; 40 | 41 | // Format of each subsample, deciding the bits and type per subsample. 42 | // Convertible from vrs::AudioSampleFormat. 43 | vrs::DataPieceValue sampleFormat{vrs::datalayout_conventions::kAudioSampleFormat}; 44 | 45 | vrs::AutoDataLayoutEnd endLayout; 46 | }; 47 | 48 | struct AudioDataRecordMetadata : public vrs::AutoDataLayout { 49 | static constexpr uint32_t kVersion = 2; 50 | 51 | // A list of timestamps of each sample in the block, following the same order they are stored in 52 | // the ContentBlock. 53 | vrs::DataPieceVector captureTimestampsNs{"capture_timestamps_ns"}; 54 | 55 | // Set 1 for muted, 0 otherwise. 56 | vrs::DataPieceValue audioMuted{"audio_muted"}; 57 | 58 | vrs::AutoDataLayoutEnd endLayout; 59 | }; 60 | 61 | } // namespace aria 62 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/BarometerMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for barometer data is 25 | // vrs::RecordableTypeId::BarometerRecordableClass. 26 | 27 | namespace aria { 28 | 29 | struct BarometerConfigRecordMetadata : public vrs::AutoDataLayout { 30 | static constexpr uint32_t kVersion = 1; 31 | 32 | vrs::DataPieceValue streamId{"stream_id"}; 33 | vrs::DataPieceString sensorModelName{"sensor_model_name"}; 34 | 35 | // Sample rate for temperature and pressure data (in unit of Hz) 36 | vrs::DataPieceValue sampleRate{"sample_rate"}; 37 | 38 | vrs::AutoDataLayoutEnd end; 39 | }; 40 | 41 | struct BarometerDataRecordMetadata : public vrs::AutoDataLayout { 42 | static constexpr uint32_t kVersion = 1; 43 | 44 | // Timestamp of data capture in board clock, in unit of nanoseconds. 45 | vrs::DataPieceValue captureTimestampNs{"capture_timestamp_ns"}; 46 | 47 | // Temperature in Celsius degree. 48 | vrs::DataPieceValue temperature{"temperature"}; 49 | 50 | // Pressure in Pascal. 51 | vrs::DataPieceValue pressure{"pressure"}; 52 | 53 | // Relative altitude in meters. 54 | vrs::DataPieceValue altitude{"altitude"}; 55 | 56 | vrs::AutoDataLayoutEnd end; 57 | }; 58 | 59 | } // namespace aria 60 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/BluetoothBeaconMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for Bluetooth beacon data is 25 | // vrs::RecordableTypeId::BluetoothBeaconRecordableClass. 26 | 27 | namespace aria { 28 | 29 | struct BluetoothBeaconConfigRecordMetadata : public vrs::AutoDataLayout { 30 | static constexpr uint32_t kVersion = 1; 31 | 32 | vrs::DataPieceValue streamId{"stream_id"}; 33 | 34 | // Sample rate [Hz] 35 | vrs::DataPieceValue sampleRateHz{"sample_rate_hz"}; 36 | 37 | vrs::AutoDataLayoutEnd end; 38 | }; 39 | 40 | struct BluetoothBeaconDataRecordMetadata : public vrs::AutoDataLayout { 41 | static constexpr uint32_t kVersion = 2; 42 | 43 | // Timestamp of the data sample in real time (UNIX epoch). 44 | vrs::DataPieceValue systemTimestampNs{"system_timestamp_ns"}; 45 | 46 | // Timestamp of the data sample in board-clock domain. 47 | vrs::DataPieceValue boardTimestampNs{"board_timestamp_ns"}; 48 | 49 | // Timestamp (in board clock) when scan request was issued. 50 | // This field is used to group samples in the same way as phones do it. 51 | vrs::DataPieceValue boardScanRequestStartTimestampNs{ 52 | "board_request_start_timestamp_ns"}; 53 | 54 | // Timestamp (in board clock) when scan request is completed. 55 | // This field is used to group samples and calculate single scan duration. 56 | vrs::DataPieceValue boardScanRequestCompleteTimestampNs{ 57 | "board_request_complete_timestamp_ns"}; 58 | 59 | // A string representing the unique identifier of the Bluetooth beacon physical device. 60 | vrs::DataPieceString uniqueId{"unique_id"}; 61 | 62 | // Transmission power, in units of dBm. 63 | vrs::DataPieceValue txPower{"tx_power"}; 64 | 65 | // Received signal strength indication, in units of dBm. 66 | vrs::DataPieceValue rssi{"rssi"}; 67 | 68 | // Frequency of the signal, in units of MHz. 69 | vrs::DataPieceValue freqMhz{"freq_mhz"}; 70 | 71 | vrs::AutoDataLayoutEnd end; 72 | }; 73 | 74 | } // namespace aria 75 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/GpsMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for GPS data is vrs::RecordableTypeId::GpsRecordableClass. 25 | 26 | namespace aria { 27 | 28 | struct GpsConfigRecordMetadata : public vrs::AutoDataLayout { 29 | static constexpr uint32_t kVersion = 1; 30 | 31 | vrs::DataPieceValue streamId{"stream_id"}; 32 | 33 | // Sample rate [Hz] 34 | vrs::DataPieceValue sampleRateHz{"sample_rate_hz"}; 35 | 36 | vrs::AutoDataLayoutEnd end; 37 | }; 38 | 39 | struct GpsDataRecordMetadata : public vrs::AutoDataLayout { 40 | static constexpr uint32_t kVersion = 1; 41 | 42 | // Timestamp of capturing this sample, in nanoseconds. 43 | vrs::DataPieceValue captureTimestampNs{"capture_timestamp_ns"}; 44 | 45 | // UTC time in milliseconds. 46 | vrs::DataPieceValue utcTimeMs{"utc_time_ms"}; 47 | 48 | // GPS fix data: This is the calculated positional information from raw satellite data. 49 | // Provider is typically "gps" 50 | vrs::DataPieceString provider{"provider"}; 51 | // Latitude in degrees 52 | vrs::DataPieceValue latitude{"latitude"}; 53 | // Longitude in degrees 54 | vrs::DataPieceValue longitude{"longitude"}; 55 | // Altitude in meters 56 | vrs::DataPieceValue altitude{"altitude"}; 57 | 58 | // Horizontal accuracy in meters 59 | vrs::DataPieceValue accuracy{"accuracy"}; 60 | 61 | // Vertical accuracy in meters 62 | vrs::DataPieceValue verticalAccuracy{"vertical_accuracy"}; 63 | 64 | // Speed over ground [m/s] 65 | vrs::DataPieceValue speed{"speed"}; 66 | 67 | // Raw data: This is the raw numerical data from each satellite. Each element is a string 68 | // representing the raw data sentence from one satellite. Can be parsed by any standard GPS 69 | // library. 70 | vrs::DataPieceVector rawData{"raw_data"}; 71 | 72 | vrs::AutoDataLayoutEnd end; 73 | }; 74 | 75 | } // namespace aria 76 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/PoseMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for Pose data is vrs::RecordableTypeId::PoseRecordableClass. 25 | 26 | namespace aria { 27 | 28 | struct PoseConfigRecordMetadata : public vrs::AutoDataLayout { 29 | static constexpr uint32_t kVersion = 1; 30 | 31 | vrs::DataPieceValue streamId{"stream_id"}; 32 | 33 | vrs::AutoDataLayoutEnd end; 34 | }; 35 | 36 | struct PoseDataRecordMetadata : public vrs::AutoDataLayout { 37 | static constexpr uint32_t kVersion = 1; 38 | 39 | // Timestamp of capturing this sample, in nanoseconds. 40 | vrs::DataPieceValue captureTimestampNs{"capture_timestamp_ns"}; 41 | // Translation of IMU left sensor pose in world coordinates 42 | vrs::DataPieceValue T_World_ImuLeft_translation{"T_Odometry_BodyImu_translation"}; 43 | // Rotation quaternion of IMU left sensor pose in world coordinates 44 | vrs::DataPieceValue T_World_ImuLeft_quaternion{"T_Odometry_BodyImu_quaternion"}; 45 | 46 | vrs::AutoDataLayoutEnd endLayout; 47 | }; 48 | 49 | } // namespace aria 50 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/ReadMe.md: -------------------------------------------------------------------------------- 1 | # What is in this folder? 2 | 3 | - `data_layout/aria` provides `DataLayout` definitions used by the Aria device (definitions of the metadata blocks found 4 | in Aria VRS files) 5 | - `data_layout/sample_app/AriaFileReader.cpp` demonstrates how to use the VRS API to read an Aria VRS file. 6 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/TimeSyncMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for time sync data is vrs::RecordableTypeId::TimeRecordableClass. 25 | 26 | namespace aria { 27 | 28 | struct TimeSyncConfigRecordMetadata : public vrs::AutoDataLayout { 29 | static constexpr uint32_t kVersion = 1; 30 | 31 | vrs::DataPieceValue streamId{"stream_id"}; 32 | 33 | // Sample rate for time data [Hz] 34 | vrs::DataPieceValue sampleRateHz{"sample_rate_hz"}; 35 | 36 | vrs::AutoDataLayoutEnd endLayout; 37 | }; 38 | 39 | struct TimeSyncDataRecordMetadata : public vrs::AutoDataLayout { 40 | static constexpr uint32_t kVersion = 1; 41 | 42 | // The capture timestamp in nanoseconds using a monotonic clock, same clock that 43 | // is used for the VRS records timestamps 44 | vrs::DataPieceValue monotonicTimestampNs{"monotonic_timestamp_ns"}; 45 | 46 | // The real time clock or wall clock in nanoseconds 47 | vrs::DataPieceValue realTimestampNs{"real_timestamp_ns"}; 48 | 49 | vrs::AutoDataLayoutEnd endLayout; 50 | }; 51 | 52 | } // namespace aria 53 | -------------------------------------------------------------------------------- /src/data_provider/data_layout/aria/WifiBeaconMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | // Note: The VRS stream type for Wi-Fi, beacon data is 25 | // vrs::RecordableTypeId::WifiBeaconRecordableClass. 26 | 27 | namespace aria { 28 | 29 | struct WifiBeaconConfigRecordMetadata : public vrs::AutoDataLayout { 30 | static constexpr uint32_t kVersion = 1; 31 | 32 | vrs::DataPieceValue streamId{"stream_id"}; 33 | 34 | vrs::AutoDataLayoutEnd end; 35 | }; 36 | 37 | struct WifiBeaconDataRecordMetadata : public vrs::AutoDataLayout { 38 | static constexpr uint32_t kVersion = 2; 39 | 40 | // Timestamp of the data sample in real time (UNIX epoch). 41 | vrs::DataPieceValue systemTimestampNs{"system_timestamp_ns"}; 42 | 43 | // Timestamp of the data sample in board-clock domain. 44 | vrs::DataPieceValue boardTimestampNs{"board_timestamp_ns"}; 45 | 46 | // Timestamp (in board clock) when scan request was issued. 47 | // This field is used to group samples in the same way as phones do it. 48 | vrs::DataPieceValue boardScanRequestStartTimestampNs{ 49 | "board_request_start_timestamp_ns"}; 50 | 51 | // Timestamp (in board clock) when scan request is completed. 52 | // This field is used to group samples and calculate single scan duration. 53 | vrs::DataPieceValue boardScanRequestCompleteTimestampNs{ 54 | "board_request_complete_timestamp_ns"}; 55 | 56 | // A string representing the Service Set Identifier (SSID) of the Wi-Fi beacon. 57 | vrs::DataPieceString ssid{"ssid"}; 58 | 59 | // Basic Service Set Identifier (BSSID) or MAC address of the Wi-Fi beacon, a unique identifier 60 | // of the physical device. 61 | vrs::DataPieceString bssidMac{"bssid_mac"}; 62 | 63 | // Received signal strength indication, in units of dBm. 64 | vrs::DataPieceValue rssi{"rssi"}; 65 | 66 | // Frequency of the signal, in units of MHz. 67 | vrs::DataPieceValue freqMhz{"freq_mhz"}; 68 | 69 | // A list of antenna signal strengths, in units of dBm. The index of an element corresponds to 70 | // the antenna ID, with its value being the signal strength. 71 | vrs::DataPieceVector rssiPerAntenna{"rssi_per_antenna"}; 72 | 73 | vrs::AutoDataLayoutEnd end; 74 | }; 75 | 76 | } // namespace aria 77 | -------------------------------------------------------------------------------- /src/data_provider/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | add_executable(read_all readAll.cpp) 16 | target_link_libraries(read_all PRIVATE vrsdataprovider) 17 | target_include_directories(read_all PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "../") 18 | 19 | 20 | add_executable(read_selected readSelected.cpp) 21 | target_link_libraries(read_selected PRIVATE vrsdataprovider) 22 | target_include_directories(read_selected PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "../") 23 | -------------------------------------------------------------------------------- /src/data_provider/examples/ReadMe.md: -------------------------------------------------------------------------------- 1 | # What is in this folder? 2 | 3 | - `readall.cpp`: Sample VRS data provider usage for reading records of all streams in an Aria VRS file verbosely. Usage: `./read_all ` 4 | - `readSelected.cpp`: Sample VRS data provider usage for reading records of selected streams in an Aria VRS file verbosely. Usage: `./read_selected ` 5 | -------------------------------------------------------------------------------- /src/data_provider/examples/readAll.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "data_provider/AriaVrsDataProvider.h" 18 | 19 | int main(int argc, char** argv) { 20 | if (argc != 2) { 21 | fmt::print(stderr, "VRS file path must be provided as an argument, exiting.\n"); 22 | return 0; 23 | } 24 | ark::datatools::dataprovider::AriaVrsDataProvider vrsDataProvider; 25 | if (!vrsDataProvider.openFile(argv[1])) { 26 | fmt::print(stderr, "Failed to open '{}'.\n", argv[1]); 27 | } 28 | // Check existing streams in the file and set players for all of them 29 | for (auto id : vrsDataProvider.getStreamsInFile()) { 30 | vrsDataProvider.setStreamPlayer(id); 31 | } 32 | vrsDataProvider.setVerbose(true); 33 | vrsDataProvider.readAllRecords(); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /src/data_provider/examples/readSelected.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "data_provider/AriaStreamIds.h" 18 | #include "data_provider/AriaVrsDataProvider.h" 19 | 20 | int main(int argc, char** argv) { 21 | if (argc != 2) { 22 | fmt::print(stderr, "VRS file path must be provided as an argument, exiting.\n"); 23 | return 0; 24 | } 25 | ark::datatools::dataprovider::AriaVrsDataProvider vrsDataProvider; 26 | if (!vrsDataProvider.openFile(argv[1])) { 27 | fmt::print(stderr, "Failed to open '{}'.\n", argv[1]); 28 | } 29 | // Set players for streams as desired 30 | vrsDataProvider.setSlamLeftCameraPlayer(); 31 | vrsDataProvider.setSlamRightCameraPlayer(); 32 | vrsDataProvider.setImuRightPlayer(); 33 | // Another way of setting a player by using a stream ID explicitly 34 | vrsDataProvider.setStreamPlayer(ark::datatools::dataprovider::kMagnetometerStreamId); 35 | vrsDataProvider.setVerbose(true); 36 | // Read all records 37 | vrsDataProvider.readAllRecords(); 38 | 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /src/data_provider/mps_io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | add_library(mps_io 16 | trajectoryReader.h trajectoryReader.cpp 17 | eyeGazeReader.h eyeGazeReader.cpp 18 | onlineCalibrationReader.h onlineCalibrationReader.cpp) 19 | target_link_libraries(mps_io PUBLIC Sophus::Sophus sensors) 20 | target_include_directories(mps_io 21 | PUBLIC 22 | ${CMAKE_CURRENT_SOURCE_DIR} "../" 23 | PRIVATE 24 | "../../third_party/" #fast-cpp-csv-parser 25 | ) 26 | -------------------------------------------------------------------------------- /src/data_provider/mps_io/eyeGazeReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "models/DeviceModel.h" 26 | 27 | namespace ark::datatools { 28 | 29 | struct EyeGaze { 30 | // EyeGaze data is defined in CPF (Central Pupil Frame). 31 | // Coordinates of a unit vector along the gaze direction. 32 | Eigen::Vector3d gaze_vector = {0., 0., 0.}; 33 | 34 | // Confidence in the output [0, 1] 35 | // Smaller values indicate higher confidence 36 | float uncertainty = 0.f; 37 | }; 38 | 39 | // Timestamp is aligned with device image capture 40 | using TemporalEyeGazeData = std::map; 41 | 42 | TemporalEyeGazeData readEyeGaze(const std::string& path); 43 | 44 | void ProjectEyeGazeRayInCamera( 45 | const std::string& cameraString, 46 | const sensors::DeviceModel& deviceModel, 47 | const Eigen::Vector3d& eyeGazeVector, 48 | const double minDepth, 49 | const double maxDepth, 50 | const double samples, 51 | std::map& camProjectionPerDepth, 52 | const int cameraWidth = -1, 53 | const int cameraHeight = -1); 54 | 55 | } // namespace ark::datatools 56 | -------------------------------------------------------------------------------- /src/data_provider/mps_io/onlineCalibrationReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | #include "onlineCalibrationReader.h" 21 | 22 | namespace ark::datatools { 23 | 24 | TemporalDeviceModels readOnlineCalibration(const std::string& filepath) { 25 | std::ifstream infile(filepath); 26 | if (infile) { 27 | std::string jsonCalibrationString; 28 | TemporalDeviceModels temporalDeviceModels; 29 | while (std::getline(infile, jsonCalibrationString)) { 30 | sensors::DeviceModel deviceModel = sensors::DeviceModel::fromJson(jsonCalibrationString); 31 | // Read timestamps 32 | fb_rapidjson::Document doc; 33 | doc.Parse(jsonCalibrationString.c_str()); 34 | const auto timestamp_us = std::stoul(doc["tracking_timestamp_us"].GetString()); 35 | // FYI you can also use "utc_timestamp_ns" for hashing if you need to. 36 | temporalDeviceModels[std::chrono::microseconds(timestamp_us)] = std::move(deviceModel); 37 | } 38 | std::cout << "Loaded #deviceModels records: " << temporalDeviceModels.size() << std::endl; 39 | return temporalDeviceModels; 40 | } else { 41 | std::cerr << "[readOnlineCalibration] Can't open the provided file path." << std::endl; 42 | } 43 | return {}; 44 | } 45 | 46 | } // namespace ark::datatools 47 | -------------------------------------------------------------------------------- /src/data_provider/mps_io/onlineCalibrationReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include "models/DeviceModel.h" 22 | 23 | namespace ark::datatools { 24 | 25 | // A time sorted list of DeviceModels data 26 | using TemporalDeviceModels = std::map; 27 | 28 | // Read Online Calibration data from a file 29 | TemporalDeviceModels readOnlineCalibration(const std::string& filepath); 30 | 31 | } // namespace ark::datatools 32 | -------------------------------------------------------------------------------- /src/data_provider/mps_io/trajectoryReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace ark::datatools { 26 | 27 | struct TrajectoryPose { 28 | // Timestamp of the measurement 29 | std::chrono::microseconds tracking_timestamp_us; 30 | 31 | // UTC Timestamp of the device image capture 32 | std::chrono::nanoseconds utcTimestamp; 33 | 34 | // Transformation from this device to some arbitrary world coordinate frame 35 | Sophus::SE3d T_world_device; 36 | 37 | // Translational velocity of the device with respect to the world in device frame 38 | Eigen::Vector3d deviceLinearVelocity_device = {0., 0., 0.}; 39 | 40 | // Angular velocity with respect to the world in device frame 41 | Eigen::Vector3d angularVelocity_device = {0., 0., 0.}; 42 | 43 | // Quality score: float between [0, 1] which describes how good the pose and dynamics are. 44 | // 45 | // qualityScore = 1: we are confident the pose and dynamics "good" 46 | // qualityScore = 0: we have no confidence on the pose and dynamics quality 47 | std::optional qualityScore; 48 | 49 | // Estimated gravity direction in device frame 50 | std::optional gravity_odometry; 51 | 52 | // The Unique Identifier of the graph-connected component this pose belongs to 53 | std::optional graphUid; 54 | }; 55 | 56 | // A Trajectory is a list of Trajectory poses 57 | using Trajectory = std::vector; 58 | 59 | Trajectory readOpenLoop(const std::string& path); 60 | Trajectory readCloseLoop(const std::string& path); 61 | 62 | } // namespace ark::datatools 63 | -------------------------------------------------------------------------------- /src/data_provider/mps_visualization/AriaViewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include "data_provider/AriaVrsDataProvider.h" 21 | #include "eyeGazeReader.h" 22 | #include "visualization/AriaViewerBase.h" 23 | 24 | namespace ark::datatools::visualization { 25 | 26 | class AriaViewer : public AriaViewerBase { 27 | public: 28 | AriaViewer( 29 | datatools::dataprovider::AriaDataProvider* dataProvider, 30 | int width, 31 | int height, 32 | const std::string& eyeTrackingFilepath, 33 | const std::string& name = "AriaEyeGazeViewer"); 34 | ~AriaViewer() override = default; 35 | void run() override; 36 | 37 | bool readData(double currentTimestampSec) override; 38 | 39 | public: 40 | // Interface to store temporally sorted EyeGaze data record 41 | using EyeGazeDataRecords = std::map>; 42 | 43 | private: 44 | // Store all record for search (timestamp sorted) 45 | EyeGazeDataRecords eyeGazeData_; 46 | // Last current valid EyeGaze recording 47 | EyeGazeDataRecords::mapped_type lastEyeGazeRecord_; 48 | // A rolling buffer history of EyeGaze yaw, pitch recordings 49 | std::deque eyeGazeHistory_; 50 | 51 | // Store current Timestamp relative to the Aria sequence we are at 52 | std::int64_t currentTimestamp_ = 0; 53 | }; 54 | 55 | } // namespace ark::datatools::visualization 56 | -------------------------------------------------------------------------------- /src/data_provider/mps_visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | find_package(Pangolin REQUIRED) 16 | find_package(Threads REQUIRED) 17 | 18 | add_executable(mps_eyegaze_viewer main_eyegaze.cpp AriaViewer.cpp AriaViewer.h) 19 | target_link_libraries(mps_eyegaze_viewer 20 | PRIVATE 21 | aria_viewer_lib 22 | mps_io 23 | ${Pangolin_LIBRARIES} 24 | Threads::Threads) 25 | 26 | add_executable(mps_trajectory_viewer main_trajectory.cpp) 27 | target_link_libraries(mps_trajectory_viewer 28 | PRIVATE 29 | mps_io 30 | ${Pangolin_LIBRARIES}) 31 | -------------------------------------------------------------------------------- /src/data_provider/mps_visualization/main_eyegaze.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "AriaStreamIds.h" 23 | #include "AriaViewer.h" 24 | 25 | using namespace ark::datatools; 26 | 27 | namespace { 28 | template < 29 | class result_t = std::chrono::milliseconds, 30 | class clock_t = std::chrono::steady_clock, 31 | class duration_t = std::chrono::milliseconds> 32 | auto since(std::chrono::time_point const& start) { 33 | return std::chrono::duration_cast(clock_t::now() - start); 34 | }; 35 | 36 | using namespace ark::datatools::dataprovider; 37 | 38 | const std::vector kImageStreamIds = { 39 | kEyeCameraStreamId, 40 | kRgbCameraStreamId, 41 | kSlamLeftCameraStreamId, 42 | kSlamRightCameraStreamId}; 43 | 44 | } // namespace 45 | 46 | int main(int argc, const char* argv[]) { 47 | if (argc < 2) { 48 | fmt::print(stderr, "VRS and EyeGaze file path must be provided as the argument, exiting.\n"); 49 | return 0; 50 | } 51 | 52 | const std::string vrsPath = argv[1]; 53 | std::string eyeGazeRecordsPath; 54 | if (argc == 3) { 55 | eyeGazeRecordsPath = argv[2]; 56 | } 57 | 58 | // get and open data provider 59 | std::shared_ptr dataProvider = 60 | std::make_shared(); 61 | if (!dataProvider->open(vrsPath)) { 62 | fmt::print(stderr, "Failed to open '{}'.\n", vrsPath); 63 | return 0; 64 | } 65 | 66 | fmt::print(stdout, "Opened '{}'.\n", vrsPath); 67 | 68 | // start viewer with dataprovider 69 | std::shared_ptr viewer = 70 | std::make_shared(dataProvider.get(), 900, 800, eyeGazeRecordsPath); 71 | // initialize and setup datastreams 72 | auto initDataStreams = viewer->initDataStreams(kImageStreamIds); 73 | double currentTimestampSec = initDataStreams.first; 74 | double fastestNominalRateHz = initDataStreams.second; 75 | // read and visualize datastreams at desired speed 76 | const double waitTimeSec = (1. / fastestNominalRateHz) / 10.; 77 | std::thread readerThread([&viewer, &dataProvider, ¤tTimestampSec, &waitTimeSec]() { 78 | auto start = std::chrono::steady_clock::now(); 79 | while (!dataProvider->atLastRecords()) { 80 | if (viewer->readData(currentTimestampSec)) { 81 | currentTimestampSec += waitTimeSec; 82 | // subtract time it took to load data from wait time 83 | double thisWaitTimeSec = 84 | waitTimeSec - since(start).count() * 1e-6; 85 | if (thisWaitTimeSec > 0.) { 86 | std::this_thread::sleep_for(std::chrono::nanoseconds( 87 | static_cast(thisWaitTimeSec * 1e9 / viewer->getPlaybackSpeedFactor()))); 88 | } 89 | start = std::chrono::steady_clock::now(); 90 | } 91 | } 92 | std::cout << "Finished reading records" << std::endl; 93 | }); 94 | viewer->run(); 95 | readerThread.join(); 96 | return 0; 97 | } 98 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaAudioPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | #include "AriaAudioPlayer.h" 21 | 22 | #include 23 | #include 24 | 25 | namespace ark::datatools::dataprovider { 26 | 27 | bool AriaAudioPlayer::onDataLayoutRead( 28 | const vrs::CurrentRecord& r, 29 | size_t blockIndex, 30 | vrs::DataLayout& dl) { 31 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 32 | auto& config = getExpectedLayout(dl, blockIndex); 33 | configRecord_.streamId = config.streamId.get(); 34 | configRecord_.numChannels = config.numChannels.get(); 35 | configRecord_.sampleRate = config.sampleRate.get(); 36 | configRecord_.sampleFormat = config.sampleFormat.get(); 37 | } else if (r.recordType == vrs::Record::Type::DATA) { 38 | auto& data = getExpectedLayout(dl, blockIndex); 39 | data.captureTimestampsNs.get(dataRecord_.captureTimestampsNs); 40 | dataRecord_.audioMuted = data.audioMuted.get(); 41 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 42 | } 43 | return true; 44 | } 45 | 46 | bool AriaAudioPlayer::onAudioRead( 47 | const vrs::CurrentRecord& r, 48 | size_t /* idx */, 49 | const vrs::ContentBlock& cb) { 50 | auto& audioSpec = cb.audio(); 51 | assert(audioSpec.getSampleFormat() == vrs::AudioSampleFormat::S32_LE); 52 | data_.data.clear(); 53 | data_.data.resize(audioSpec.getSampleCount() * audioSpec.getChannelCount()); 54 | // Actually read the audio data 55 | if (r.reader->read(data_.data) == 0) { 56 | callback_(r, data_.data, verbose_); 57 | if (verbose_) { 58 | fmt::print( 59 | "{:.3f} {} [{}]: {} {}x{} samples.\n", 60 | r.timestamp, 61 | r.streamId.getName(), 62 | r.streamId.getNumericName(), 63 | audioSpec.asString(), 64 | audioSpec.getSampleCount(), 65 | audioSpec.getChannelCount()); 66 | } 67 | } 68 | return true; 69 | } 70 | 71 | } // namespace ark::datatools::dataprovider 72 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaAudioPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using AudioCallback = 25 | std::function& data, bool verbose)>; 26 | 27 | struct AriaAudioData { 28 | std::vector data; 29 | }; 30 | 31 | struct AriaAudioConfigRecord { 32 | uint32_t streamId; 33 | uint8_t numChannels; 34 | uint32_t sampleRate; 35 | uint8_t sampleFormat; 36 | }; 37 | 38 | struct AriaAudioDataRecord { 39 | std::vector captureTimestampsNs; 40 | uint8_t audioMuted; 41 | }; 42 | 43 | class AriaAudioPlayer : public vrs::RecordFormatStreamPlayer { 44 | public: 45 | explicit AriaAudioPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 46 | AriaAudioPlayer(const AriaAudioPlayer&) = delete; 47 | AriaAudioPlayer& operator=(const AriaAudioPlayer&) = delete; 48 | AriaAudioPlayer(AriaAudioPlayer&&) = default; 49 | 50 | void setCallback(AudioCallback callback) { 51 | callback_ = callback; 52 | } 53 | 54 | const AriaAudioData& getData() const { 55 | return data_; 56 | } 57 | 58 | const AriaAudioConfigRecord& getConfigRecord() const { 59 | return configRecord_; 60 | } 61 | 62 | const AriaAudioDataRecord& getDataRecord() const { 63 | return dataRecord_; 64 | } 65 | 66 | const vrs::StreamId& getStreamId() const { 67 | return streamId_; 68 | } 69 | 70 | double getNextTimestampSec() const { 71 | return nextTimestampSec_; 72 | } 73 | 74 | void setVerbose(bool verbose) { 75 | verbose_ = verbose; 76 | } 77 | 78 | private: 79 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 80 | override; 81 | bool onAudioRead(const vrs::CurrentRecord& r, size_t blockIdx, const vrs::ContentBlock& cb) 82 | override; 83 | 84 | const vrs::StreamId streamId_; 85 | AudioCallback callback_ = [](const vrs::CurrentRecord&, std::vector&, bool) { 86 | return true; 87 | }; 88 | AriaAudioData data_; 89 | AriaAudioConfigRecord configRecord_; 90 | AriaAudioDataRecord dataRecord_; 91 | 92 | double nextTimestampSec_ = 0; 93 | bool verbose_ = false; 94 | }; 95 | 96 | } // namespace ark::datatools::dataprovider 97 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaBarometerPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaBarometerPlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaBarometerPlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | configRecord_.sensorModelName = config.sensorModelName.get(); 31 | configRecord_.sampleRate = config.sampleRate.get(); 32 | } else if (r.recordType == vrs::Record::Type::DATA) { 33 | auto& data = getExpectedLayout(dl, blockIndex); 34 | dataRecord_.captureTimestampNs = data.captureTimestampNs.get(); 35 | dataRecord_.temperature = data.temperature.get(); 36 | dataRecord_.pressure = data.pressure.get(); 37 | dataRecord_.altitude = data.altitude.get(); 38 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 39 | callback_(r, data, verbose_); 40 | } 41 | return true; 42 | } 43 | 44 | } // namespace ark::datatools::dataprovider 45 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaBarometerPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using BarometerCallback = 25 | std::function; 26 | 27 | struct AriaBarometerConfigRecord { 28 | uint32_t streamId; 29 | std::string sensorModelName; 30 | double sampleRate; 31 | }; 32 | 33 | struct AriaBarometerDataRecord { 34 | int64_t captureTimestampNs; 35 | double temperature; // in degrees Celsius 36 | double pressure; // in Pascal 37 | double altitude; 38 | }; 39 | 40 | class AriaBarometerPlayer : public vrs::RecordFormatStreamPlayer { 41 | public: 42 | explicit AriaBarometerPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 43 | AriaBarometerPlayer(const AriaBarometerPlayer&) = delete; 44 | AriaBarometerPlayer& operator=(const AriaBarometerPlayer&) = delete; 45 | AriaBarometerPlayer(AriaBarometerPlayer&&) = default; 46 | 47 | void setCallback(BarometerCallback callback) { 48 | callback_ = callback; 49 | } 50 | 51 | const AriaBarometerConfigRecord& getConfigRecord() const { 52 | return configRecord_; 53 | } 54 | 55 | const AriaBarometerDataRecord& getDataRecord() const { 56 | return dataRecord_; 57 | } 58 | 59 | const vrs::StreamId& getStreamId() const { 60 | return streamId_; 61 | } 62 | 63 | double getNextTimestampSec() const { 64 | return nextTimestampSec_; 65 | } 66 | 67 | void setVerbose(bool verbose) { 68 | verbose_ = verbose; 69 | } 70 | 71 | private: 72 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 73 | override; 74 | 75 | const vrs::StreamId streamId_; 76 | BarometerCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { 77 | return true; 78 | }; 79 | 80 | AriaBarometerConfigRecord configRecord_; 81 | AriaBarometerDataRecord dataRecord_; 82 | 83 | double nextTimestampSec_ = 0; 84 | bool verbose_ = false; 85 | }; 86 | 87 | } // namespace ark::datatools::dataprovider 88 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaBluetoothBeaconPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaBluetoothBeaconPlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaBluetoothBeaconPlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | configRecord_.sampleRateHz = config.sampleRateHz.get(); 31 | } else if (r.recordType == vrs::Record::Type::DATA) { 32 | auto& data = getExpectedLayout(dl, blockIndex); 33 | dataRecord_.systemTimestampNs = data.systemTimestampNs.get(); 34 | dataRecord_.boardTimestampNs = data.boardTimestampNs.get(); 35 | dataRecord_.boardScanRequestStartTimestampNs = data.boardScanRequestStartTimestampNs.get(); 36 | dataRecord_.boardScanRequestCompleteTimestampNs = 37 | data.boardScanRequestCompleteTimestampNs.get(); 38 | dataRecord_.uniqueId = data.uniqueId.get(); 39 | dataRecord_.txPower = data.txPower.get(); 40 | dataRecord_.rssi = data.rssi.get(); 41 | dataRecord_.freqMhz = data.freqMhz.get(); 42 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 43 | callback_(r, data, verbose_); 44 | } 45 | return true; 46 | } 47 | 48 | } // namespace ark::datatools::dataprovider 49 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaBluetoothBeaconPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using BluetoothBeaconCallback = 25 | std::function; 26 | 27 | struct AriaBluetoothBeaconConfigRecord { 28 | uint32_t streamId; 29 | double sampleRateHz; 30 | }; 31 | 32 | struct AriaBluetoothBeaconDataRecord { 33 | int64_t systemTimestampNs; 34 | int64_t boardTimestampNs; 35 | int64_t boardScanRequestStartTimestampNs; 36 | int64_t boardScanRequestCompleteTimestampNs; 37 | std::string uniqueId; 38 | float txPower; 39 | float rssi; 40 | float freqMhz; 41 | }; 42 | 43 | class AriaBluetoothBeaconPlayer : public vrs::RecordFormatStreamPlayer { 44 | public: 45 | explicit AriaBluetoothBeaconPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 46 | AriaBluetoothBeaconPlayer(const AriaBluetoothBeaconPlayer&) = delete; 47 | AriaBluetoothBeaconPlayer& operator=(const AriaBluetoothBeaconPlayer&) = delete; 48 | AriaBluetoothBeaconPlayer(AriaBluetoothBeaconPlayer&&) = default; 49 | 50 | void setCallback(BluetoothBeaconCallback callback) { 51 | callback_ = callback; 52 | } 53 | 54 | const AriaBluetoothBeaconConfigRecord& getConfigRecord() const { 55 | return configRecord_; 56 | } 57 | 58 | const AriaBluetoothBeaconDataRecord& getDataRecord() const { 59 | return dataRecord_; 60 | } 61 | 62 | const vrs::StreamId& getStreamId() const { 63 | return streamId_; 64 | } 65 | 66 | double getNextTimestampSec() const { 67 | return nextTimestampSec_; 68 | } 69 | 70 | void setVerbose(bool verbose) { 71 | verbose_ = verbose; 72 | } 73 | 74 | private: 75 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 76 | override; 77 | 78 | const vrs::StreamId streamId_; 79 | BluetoothBeaconCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { 80 | return true; 81 | }; 82 | 83 | AriaBluetoothBeaconConfigRecord configRecord_; 84 | AriaBluetoothBeaconDataRecord dataRecord_; 85 | 86 | double nextTimestampSec_ = 0; 87 | bool verbose_ = false; 88 | }; 89 | 90 | } // namespace ark::datatools::dataprovider 91 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaGpsPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaGpsPlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaGpsPlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | configRecord_.sampleRateHz = config.sampleRateHz.get(); 31 | } else if (r.recordType == vrs::Record::Type::DATA) { 32 | auto& data = getExpectedLayout(dl, blockIndex); 33 | dataRecord_.captureTimestampNs = data.captureTimestampNs.get(); 34 | dataRecord_.utcTimeMs = data.utcTimeMs.get(); 35 | dataRecord_.provider = data.provider.get(); 36 | dataRecord_.latitude = data.latitude.get(); 37 | dataRecord_.longitude = data.longitude.get(); 38 | dataRecord_.altitude = data.altitude.get(); 39 | dataRecord_.accuracy = data.accuracy.get(); 40 | dataRecord_.verticalAccuracy = data.verticalAccuracy.get(); 41 | dataRecord_.speed = data.speed.get(); 42 | data.rawData.get(dataRecord_.rawData); 43 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 44 | callback_(r, data, verbose_); 45 | } 46 | return true; 47 | } 48 | 49 | } // namespace ark::datatools::dataprovider 50 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaGpsPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using GpsCallback = 25 | std::function; 26 | 27 | struct AriaGpsConfigRecord { 28 | uint32_t streamId; 29 | double sampleRateHz; 30 | }; 31 | 32 | struct AriaGpsDataRecord { 33 | int64_t captureTimestampNs; ///< @brief capture time in device domain 34 | int64_t utcTimeMs; ///< @brief capture time in UTC domain 35 | std::string provider; ///< @brief GPS provider 36 | float latitude; ///< @brief latitude of the position in Degrees Minutes Seconds (DMS) 37 | float longitude; ///< @brief longitude of the position in Degrees Minutes Seconds (DMS) 38 | float altitude; ///< @brief altitude of the position 39 | float accuracy; ///< @brief horizontal accuracy of the position in meters 40 | float verticalAccuracy; ///< @brief vertical accuracy of the position in meters 41 | float speed; 42 | std::vector rawData; 43 | }; 44 | 45 | class AriaGpsPlayer : public vrs::RecordFormatStreamPlayer { 46 | public: 47 | explicit AriaGpsPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 48 | AriaGpsPlayer(const AriaGpsPlayer&) = delete; 49 | AriaGpsPlayer& operator=(const AriaGpsPlayer&) = delete; 50 | AriaGpsPlayer(AriaGpsPlayer&&) = default; 51 | 52 | void setCallback(GpsCallback callback) { 53 | callback_ = callback; 54 | } 55 | 56 | const AriaGpsConfigRecord& getConfigRecord() const { 57 | return configRecord_; 58 | } 59 | 60 | const AriaGpsDataRecord& getDataRecord() const { 61 | return dataRecord_; 62 | } 63 | 64 | const vrs::StreamId& getStreamId() const { 65 | return streamId_; 66 | } 67 | 68 | double getNextTimestampSec() const { 69 | return nextTimestampSec_; 70 | } 71 | 72 | void setVerbose(bool verbose) { 73 | verbose_ = verbose; 74 | } 75 | 76 | private: 77 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 78 | override; 79 | 80 | const vrs::StreamId streamId_; 81 | GpsCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { return true; }; 82 | 83 | AriaGpsConfigRecord configRecord_; 84 | AriaGpsDataRecord dataRecord_; 85 | 86 | double nextTimestampSec_ = 0; 87 | bool verbose_ = false; 88 | }; 89 | 90 | } // namespace ark::datatools::dataprovider 91 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaMotionSensorPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaMotionSensorPlayer.h" 20 | 21 | #include 22 | 23 | namespace ark::datatools::dataprovider { 24 | 25 | bool AriaMotionSensorPlayer::onDataLayoutRead( 26 | const vrs::CurrentRecord& r, 27 | size_t blockIndex, 28 | vrs::DataLayout& dl) { 29 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 30 | auto& config = getExpectedLayout(dl, blockIndex); 31 | configRecord_.streamIndex = config.streamIndex.get(); 32 | configRecord_.deviceType = config.deviceType.get(); 33 | configRecord_.deviceVersion = config.deviceVersion.get(); 34 | configRecord_.deviceSerial = config.deviceSerial.get(); 35 | configRecord_.deviceId = config.deviceId.get(); 36 | configRecord_.sensorModel = config.sensorModel.get(); 37 | configRecord_.nominalRateHz = config.nominalRateHz.get(); 38 | configRecord_.hasAccelerometer = config.hasAccelerometer.get(); 39 | configRecord_.hasGyroscope = config.hasGyroscope.get(); 40 | configRecord_.factoryCalibration = config.factoryCalibration.get(); 41 | configRecord_.onlineCalibration = config.onlineCalibration.get(); 42 | configRecord_.description = config.description.get(); 43 | } else if (r.recordType == vrs::Record::Type::DATA) { 44 | auto& data = getExpectedLayout(dl, blockIndex); 45 | dataRecord_.accelValid = data.accelValid.get(); 46 | dataRecord_.gyroValid = data.gyroValid.get(); 47 | dataRecord_.magValid = data.magValid.get(); 48 | dataRecord_.temperature = data.temperature.get(); 49 | dataRecord_.captureTimestampNs = data.captureTimestampNs.get(); 50 | dataRecord_.arrivalTimestampNs = data.arrivalTimestampNs.get(); 51 | data.accelMSec2.get(dataRecord_.accelMSec2); 52 | data.gyroRadSec.get(dataRecord_.gyroRadSec); 53 | data.magTesla.get(dataRecord_.magTesla); 54 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 55 | callback_(r, data, verbose_); 56 | } 57 | return true; 58 | } 59 | 60 | } // namespace ark::datatools::dataprovider 61 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaMotionSensorPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using MotionCallback = 25 | std::function; 26 | 27 | struct AriaMotionConfigRecord { 28 | uint32_t streamIndex; 29 | std::string deviceType; 30 | std::string deviceVersion; 31 | std::string deviceSerial; 32 | uint64_t deviceId; 33 | std::string sensorModel; 34 | double nominalRateHz; 35 | bool hasAccelerometer; 36 | bool hasGyroscope; 37 | bool hasMagnetometer; 38 | std::string factoryCalibration; 39 | std::string onlineCalibration; 40 | std::string description; 41 | }; 42 | 43 | struct AriaMotionDataRecord { 44 | bool accelValid; 45 | bool gyroValid; 46 | bool magValid; 47 | double temperature; 48 | int64_t captureTimestampNs; 49 | int64_t arrivalTimestampNs; 50 | std::vector accelMSec2; 51 | std::vector gyroRadSec; 52 | std::vector magTesla; 53 | }; 54 | 55 | class AriaMotionSensorPlayer : public vrs::RecordFormatStreamPlayer { 56 | public: 57 | explicit AriaMotionSensorPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 58 | AriaMotionSensorPlayer(const AriaMotionSensorPlayer&) = delete; 59 | AriaMotionSensorPlayer& operator=(const AriaMotionSensorPlayer&) = delete; 60 | AriaMotionSensorPlayer(AriaMotionSensorPlayer&&) = default; 61 | 62 | void setCallback(MotionCallback callback) { 63 | callback_ = callback; 64 | } 65 | 66 | const AriaMotionConfigRecord& getConfigRecord() const { 67 | return configRecord_; 68 | } 69 | 70 | const AriaMotionDataRecord& getDataRecord() const { 71 | return dataRecord_; 72 | } 73 | 74 | const vrs::StreamId& getStreamId() const { 75 | return streamId_; 76 | } 77 | 78 | double getNextTimestampSec() const { 79 | return nextTimestampSec_; 80 | } 81 | 82 | void setVerbose(bool verbose) { 83 | verbose_ = verbose; 84 | } 85 | 86 | private: 87 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 88 | override; 89 | 90 | const vrs::StreamId streamId_; 91 | MotionCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { return true; }; 92 | 93 | AriaMotionConfigRecord configRecord_; 94 | AriaMotionDataRecord dataRecord_; 95 | 96 | double nextTimestampSec_ = 0; 97 | bool verbose_ = false; 98 | }; 99 | 100 | } // namespace ark::datatools::dataprovider 101 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaPosePlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaPosePlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaPosePlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | } else if (r.recordType == vrs::Record::Type::DATA) { 31 | auto& data = getExpectedLayout(dl, blockIndex); 32 | dataRecord_.captureTimestampNs = data.captureTimestampNs.get(); 33 | vrs::Point3Df translation; 34 | data.T_World_ImuLeft_translation.get(translation); 35 | dataRecord_.T_World_ImuLeft_translation[0] = translation[0]; 36 | dataRecord_.T_World_ImuLeft_translation[1] = translation[1]; 37 | dataRecord_.T_World_ImuLeft_translation[2] = translation[2]; 38 | vrs::Point4Df quaternion; 39 | data.T_World_ImuLeft_quaternion.get(quaternion); 40 | dataRecord_.T_World_ImuLeft_quaternion[0] = quaternion[0]; 41 | dataRecord_.T_World_ImuLeft_quaternion[1] = quaternion[1]; 42 | dataRecord_.T_World_ImuLeft_quaternion[2] = quaternion[2]; 43 | dataRecord_.T_World_ImuLeft_quaternion[3] = quaternion[3]; 44 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 45 | callback_(r, data, verbose_); 46 | } 47 | return true; 48 | } 49 | 50 | } // namespace ark::datatools::dataprovider 51 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaPosePlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using PoseCallback = 25 | std::function; 26 | 27 | struct AriaPoseConfigRecord { 28 | uint32_t streamId; 29 | }; 30 | 31 | struct AriaPoseDataRecord { 32 | int64_t captureTimestampNs; 33 | std::vector T_World_ImuLeft_translation = {0, 0, 0}; 34 | std::vector T_World_ImuLeft_quaternion = {0, 0, 0, 1}; 35 | }; 36 | 37 | class AriaPosePlayer : public vrs::RecordFormatStreamPlayer { 38 | public: 39 | explicit AriaPosePlayer(vrs::StreamId streamId) : streamId_(streamId) {} 40 | AriaPosePlayer(const AriaPosePlayer&) = delete; 41 | AriaPosePlayer& operator=(const AriaPosePlayer&) = delete; 42 | AriaPosePlayer(AriaPosePlayer&&) = default; 43 | 44 | void setCallback(PoseCallback callback) { 45 | callback_ = callback; 46 | } 47 | 48 | const AriaPoseConfigRecord& getConfigRecord() const { 49 | return configRecord_; 50 | } 51 | 52 | const AriaPoseDataRecord& getDataRecord() const { 53 | return dataRecord_; 54 | } 55 | 56 | const vrs::StreamId& getStreamId() const { 57 | return streamId_; 58 | } 59 | 60 | double getNextTimestampSec() const { 61 | return nextTimestampSec_; 62 | } 63 | 64 | void setVerbose(bool verbose) { 65 | verbose_ = verbose; 66 | } 67 | 68 | private: 69 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 70 | override; 71 | 72 | const vrs::StreamId streamId_; 73 | PoseCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { return true; }; 74 | 75 | AriaPoseConfigRecord configRecord_; 76 | AriaPoseDataRecord dataRecord_; 77 | 78 | double nextTimestampSec_ = 0; 79 | bool verbose_ = false; 80 | }; 81 | 82 | } // namespace ark::datatools::dataprovider 83 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaTimeSyncPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaTimeSyncPlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaTimeSyncPlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | configRecord_.sampleRateHz = config.sampleRateHz.get(); 31 | } else if (r.recordType == vrs::Record::Type::DATA) { 32 | auto& data = getExpectedLayout(dl, blockIndex); 33 | dataRecord_.monotonicTimestampNs = data.monotonicTimestampNs.get(); 34 | dataRecord_.realTimestampNs = data.realTimestampNs.get(); 35 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 36 | callback_(r, data, verbose_); 37 | } 38 | return true; 39 | } 40 | 41 | } // namespace ark::datatools::dataprovider 42 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaTimeSyncPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using TimeSyncCallback = 25 | std::function; 26 | 27 | struct AriaTimeSyncConfigRecord { 28 | uint32_t streamId; 29 | double sampleRateHz; 30 | }; 31 | 32 | struct AriaTimeSyncDataRecord { 33 | int64_t monotonicTimestampNs; 34 | int64_t realTimestampNs; 35 | }; 36 | 37 | class AriaTimeSyncPlayer : public vrs::RecordFormatStreamPlayer { 38 | public: 39 | explicit AriaTimeSyncPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 40 | AriaTimeSyncPlayer(const AriaTimeSyncPlayer&) = delete; 41 | AriaTimeSyncPlayer& operator=(const AriaTimeSyncPlayer&) = delete; 42 | AriaTimeSyncPlayer(AriaTimeSyncPlayer&&) = default; 43 | 44 | void setCallback(TimeSyncCallback callback) { 45 | callback_ = callback; 46 | } 47 | 48 | const AriaTimeSyncConfigRecord& getConfigRecord() const { 49 | return configRecord_; 50 | } 51 | 52 | const AriaTimeSyncDataRecord& getDataRecord() const { 53 | return dataRecord_; 54 | } 55 | 56 | const vrs::StreamId& getStreamId() const { 57 | return streamId_; 58 | } 59 | 60 | double getNextTimestampSec() const { 61 | return nextTimestampSec_; 62 | } 63 | 64 | void setVerbose(bool verbose) { 65 | verbose_ = verbose; 66 | } 67 | 68 | private: 69 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 70 | override; 71 | 72 | const vrs::StreamId streamId_; 73 | TimeSyncCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { 74 | return true; 75 | }; 76 | 77 | AriaTimeSyncConfigRecord configRecord_; 78 | AriaTimeSyncDataRecord dataRecord_; 79 | 80 | double nextTimestampSec_ = 0; 81 | bool verbose_ = false; 82 | }; 83 | 84 | } // namespace ark::datatools::dataprovider 85 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaWifiBeaconPlayer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "AriaWifiBeaconPlayer.h" 20 | 21 | namespace ark::datatools::dataprovider { 22 | 23 | bool AriaWifiBeaconPlayer::onDataLayoutRead( 24 | const vrs::CurrentRecord& r, 25 | size_t blockIndex, 26 | vrs::DataLayout& dl) { 27 | if (r.recordType == vrs::Record::Type::CONFIGURATION) { 28 | auto& config = getExpectedLayout(dl, blockIndex); 29 | configRecord_.streamId = config.streamId.get(); 30 | } else if (r.recordType == vrs::Record::Type::DATA) { 31 | auto& data = getExpectedLayout(dl, blockIndex); 32 | dataRecord_.systemTimestampNs = data.systemTimestampNs.get(); 33 | dataRecord_.boardTimestampNs = data.boardTimestampNs.get(); 34 | dataRecord_.boardScanRequestStartTimestampNs = data.boardScanRequestStartTimestampNs.get(); 35 | dataRecord_.boardScanRequestCompleteTimestampNs = 36 | data.boardScanRequestCompleteTimestampNs.get(); 37 | dataRecord_.ssid = data.ssid.get(); 38 | dataRecord_.bssidMac = data.bssidMac.get(); 39 | dataRecord_.rssi = data.rssi.get(); 40 | dataRecord_.freqMhz = data.freqMhz.get(); 41 | data.rssiPerAntenna.get(dataRecord_.rssiPerAntenna); 42 | nextTimestampSec_ = std::nextafter(r.timestamp, std::numeric_limits::max()); 43 | callback_(r, data, verbose_); 44 | } 45 | return true; 46 | } 47 | 48 | } // namespace ark::datatools::dataprovider 49 | -------------------------------------------------------------------------------- /src/data_provider/players/AriaWifiBeaconPlayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace ark::datatools::dataprovider { 23 | 24 | using WifiBeaconCallback = 25 | std::function; 26 | 27 | struct AriaWifiBeaconConfigRecord { 28 | uint32_t streamId; 29 | }; 30 | 31 | struct AriaWifiBeaconDataRecord { 32 | int64_t systemTimestampNs; 33 | int64_t boardTimestampNs; 34 | int64_t boardScanRequestStartTimestampNs; 35 | int64_t boardScanRequestCompleteTimestampNs; 36 | std::string ssid; 37 | std::string bssidMac; 38 | float rssi; 39 | float freqMhz; 40 | std::vector rssiPerAntenna; 41 | }; 42 | 43 | class AriaWifiBeaconPlayer : public vrs::RecordFormatStreamPlayer { 44 | public: 45 | explicit AriaWifiBeaconPlayer(vrs::StreamId streamId) : streamId_(streamId) {} 46 | AriaWifiBeaconPlayer(const AriaWifiBeaconPlayer&) = delete; 47 | AriaWifiBeaconPlayer& operator=(const AriaWifiBeaconPlayer&) = delete; 48 | AriaWifiBeaconPlayer(AriaWifiBeaconPlayer&&) = default; 49 | 50 | void setCallback(WifiBeaconCallback callback) { 51 | callback_ = callback; 52 | } 53 | 54 | const AriaWifiBeaconConfigRecord& getConfigRecord() const { 55 | return configRecord_; 56 | } 57 | 58 | const AriaWifiBeaconDataRecord& getDataRecord() const { 59 | return dataRecord_; 60 | } 61 | 62 | const vrs::StreamId& getStreamId() const { 63 | return streamId_; 64 | } 65 | 66 | double getNextTimestampSec() const { 67 | return nextTimestampSec_; 68 | } 69 | 70 | void setVerbose(bool verbose) { 71 | verbose_ = verbose; 72 | } 73 | 74 | private: 75 | bool onDataLayoutRead(const vrs::CurrentRecord& r, size_t blockIndex, vrs::DataLayout& dl) 76 | override; 77 | 78 | const vrs::StreamId streamId_; 79 | WifiBeaconCallback callback_ = [](const vrs::CurrentRecord&, vrs::DataLayout&, bool) { 80 | return true; 81 | }; 82 | 83 | AriaWifiBeaconConfigRecord configRecord_; 84 | AriaWifiBeaconDataRecord dataRecord_; 85 | 86 | double nextTimestampSec_ = 0; 87 | bool verbose_ = false; 88 | }; 89 | 90 | } // namespace ark::datatools::dataprovider 91 | -------------------------------------------------------------------------------- /src/data_provider/players/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # players library 16 | file( 17 | GLOB_RECURSE 18 | source_files 19 | *.cpp 20 | ) 21 | file( 22 | GLOB_RECURSE 23 | header_files 24 | *.h 25 | ) 26 | 27 | add_library(players ${source_files} ${header_files}) 28 | target_link_libraries(players PUBLIC ariaDataLayout vrslib vrs_utils) 29 | target_include_directories(players PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 30 | -------------------------------------------------------------------------------- /src/data_provider/players/ReadMe.md: -------------------------------------------------------------------------------- 1 | # What is in this folder? 2 | 3 | Player implementations for every Aria stream, which allows storing/retrieving VRS configuration/data records. Contents of configuration and data record structs in each player match the layouts under `vrs/oss/aria`. 4 | -------------------------------------------------------------------------------- /src/data_provider/utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "utils.h" 18 | #include 19 | #include 20 | #include 21 | #ifndef CSV_IO_NO_THREAD 22 | #define CSV_IO_NO_THREAD 23 | #endif 24 | #include "fast-cpp-csv-parser/csv.h" 25 | 26 | namespace ark::datatools::dataprovider { 27 | 28 | void getDirContent(const std::string& dirPath, std::vector& dirContent) { 29 | std::set pathSet; 30 | for (const auto& p : std::filesystem::directory_iterator(dirPath)) { 31 | pathSet.insert(p.path().string()); 32 | } 33 | std::copy(pathSet.begin(), pathSet.end(), std::back_inserter(dirContent)); 34 | } 35 | 36 | constexpr const char* kTimeSyncPathSuffix = "synchronization/timestamp_map.csv"; 37 | 38 | std::string getTimeSyncPath(const std::string& vrsPath) { 39 | std::string timeSyncCsvPath; 40 | auto pathSplitted = ark::datatools::dataprovider::strSplit(vrsPath, '/'); 41 | pathSplitted.pop_back(); 42 | for (auto& subfolder : pathSplitted) { 43 | timeSyncCsvPath += subfolder + "/"; 44 | } 45 | timeSyncCsvPath += kTimeSyncPathSuffix; 46 | return timeSyncCsvPath; 47 | } 48 | 49 | std::map readTimeSyncCsv(const std::string& inputTimeSyncCsv) { 50 | std::map timeSyncToTimeRecording; 51 | if (!inputTimeSyncCsv.empty()) { 52 | io::CSVReader<2> in(inputTimeSyncCsv); 53 | in.read_header(io::ignore_extra_column, "deviceTimestampNs", "syncedTimestampNs"); 54 | uint64_t tRecording, tSync; 55 | while (in.read_row(tRecording, tSync)) { 56 | timeSyncToTimeRecording[tSync] = tRecording; 57 | } 58 | } 59 | std::cout << "Loaded " << timeSyncToTimeRecording.size() << " sync timestamps " << std::endl; 60 | return timeSyncToTimeRecording; 61 | } 62 | 63 | std::vector strSplit(const std::string& s, const char delimiter) { 64 | std::vector result; 65 | std::stringstream ss(s); 66 | std::string item; 67 | while (getline(ss, item, delimiter)) { 68 | result.push_back(item); 69 | } 70 | return result; 71 | } 72 | 73 | } // namespace ark::datatools::dataprovider 74 | -------------------------------------------------------------------------------- /src/data_provider/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace ark::datatools::dataprovider { 26 | 27 | // Table to map Aria numeric StreamID to calibration label string. 28 | // Please check our documentation for more details. 29 | const std::unordered_map kDeviceNumericIdToLabel = { 30 | {"1201-1", "camera-slam-left"}, 31 | {"1201-2", "camera-slam-right"}, 32 | {"1202-1", "imu-right"}, 33 | {"1202-2", "imu-left"}, 34 | {"214-1", "camera-rgb"}}; 35 | 36 | void getDirContent(const std::string& dirPath, std::vector& dirContent); 37 | std::vector strSplit(const std::string& s, const char delimiter); 38 | 39 | std::string getTimeSyncPath(const std::string& vrsPath); 40 | 41 | std::map readTimeSyncCsv(const std::string& inputTimeSyncCsv); 42 | 43 | } // namespace ark::datatools::dataprovider 44 | -------------------------------------------------------------------------------- /src/experimental/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | find_package(fmt REQUIRED) 16 | 17 | add_executable(vrs_mutable main.cpp ImageMutationFilterCopier.h) 18 | target_link_libraries(vrs_mutable PRIVATE vrs_utils fmt::fmt) 19 | target_include_directories(vrs_mutable PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) 20 | -------------------------------------------------------------------------------- /src/experimental/Readme.md: -------------------------------------------------------------------------------- 1 | # Experimental features 2 | 3 | ## VRS Copy Image mutation 4 | `vrs_mutable` is a sample demonstrating how to create a VRS file copy with on the fly custom image modification. 5 | 6 | ### How the VRS image mutation is implemented 7 | 8 | The feature is implemented by using the `RecordFilterCopier` concept along a `vrs copy` operation. 9 | 10 | By adding a `ImageMutationFilter` abstraction of `RecordFilterCopier` with a custom `UserDefinedImageMutator`, the user can modify on the fly the PixelFrame image read from a given VRS and export it to a new VRS file. 11 | FYI: 12 | - Image size and bit depth must remains the same. 13 | - `ImageMutationFilter::shouldCopyVerbatim` implements the logic to apply the functor only on image stream 14 | - `ImageMutationFilter::filterImage` implements the JPG buffer codec logic and allow you to access the uncompressed PixelFrame for mutation with your functor 15 | 16 | ### How to write your how custom image mutation? 17 | - See the provided examples `VerticalImageFlipMutator`, `NullifyModuloTwoTimestamp` or extend the `VrsExportLoader`. 18 | 19 | 20 | ``` 21 | struct MyCustomImageMutator : public vrs::utils::UserDefinedImageMutator { 22 | bool operator()(double timestamp, const vrs::StreamId& streamId, vrs::utils::PixelFrame* frame) 23 | override { 24 | if (!frame) { // If frame is invalid, Do nothing. 25 | return false; 26 | } 27 | // If frame is valid: 28 | // - apply your image processing function 29 | // - or load an image from disk to replace the image buffer 30 | // -> Note the image size (Width, Height, Stride) must be left unchanged 31 | 32 | // Image is defined by its PixelFrame: 33 | // frame->getWidth() 34 | // frame->getHeight() 35 | // 36 | // frame->wdata() - Pixel image buffer start (of size frame->getStride()*frame->getHeight() ) 37 | // 38 | // You could iterate the image from top to bottom as following: 39 | // 40 | // const size_t lineLength = frame->getStride(); 41 | // uint32_t top = 0; 42 | // uint32_t bottom = frame->getHeight() - 1; 43 | // while (top < bottom) { 44 | // uint8_t* topPixels = frame->wdata() + top * frame->getStride(); 45 | // top++; 46 | // } 47 | 48 | return true; 49 | } 50 | }; 51 | ``` 52 | 53 | ### How to run the code: 54 | `vrs_mutable -- ` 55 | 56 | ### Illustration of a possible End2End demo (VRS export, local image mutation and VRS Copy mutation) 57 | 58 | 1. Export VRS Frames 59 | ``` 60 | $ vrs extract-images --to /tmp/data 61 | ``` 62 | 63 | 2. Modify your image frame (i.e blur some objects) 64 | 65 | 3. Use VRS Copy with ImageMutation to upload modified frames by using the `VrsExportLoader` Mutator 66 | - Todo left as tutorial for the user (load the image frame and replace the pixel in PixelFrame) 67 | -------------------------------------------------------------------------------- /src/pyproject.toml: -------------------------------------------------------------------------------- 1 | # 2 | # To generate wheels locally for linux run 3 | # python3 -m cibuildwheel --output-dir dist --platform linux ./src 4 | # To generate wheels locally for mac x86_64 run 5 | # python3 -m cibuildwheel --output-dir dist --platform macos --arch x86_64 ./src 6 | # 7 | [tool.cibuildwheel] 8 | build="cp36-*64 cp37-*64 cp38-*64 cp39-*64 cp310-*64 cp311-*64" 9 | 10 | [tool.cibuildwheel.linux] 11 | archs = ["x86_64"] 12 | before-build=''' 13 | # Install system deps 14 | # Toolchains 15 | yum install -y cmake git gtest-devel \ 16 | lz4-devel libzstd-devel xxhash-devel libpng-devel \ 17 | python3-pip 18 | 19 | # Installing pybind11 20 | pip3 install pybind11[global] 21 | 22 | # Install and compile libraries 23 | thread=$(nproc) 24 | 25 | # Build Fmt 26 | cd /tmp; git clone https://github.com/fmtlib/fmt.git -b 8.1.1 \ 27 | && cd fmt \ 28 | && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DFMT_TEST=OFF .; make -j$thread install; rm -rf /tmp/fmt; 29 | 30 | cd /tmp && git clone https://github.com/USCiLab/cereal.git -b v1.3.2 \ 31 | && cd cereal \ 32 | && cmake -DSKIP_PORTABILITY_TEST=1 -DJUST_INSTALL_CEREAL=ON .;make -j4 install; rm -rf /tmp/cereal; 33 | 34 | cd /tmp && git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git -b 2.1.4 \ 35 | && cd libjpeg-turbo \ 36 | && cmake -DCMAKE_BUILD_TYPE=Release -DWITH_JPEG8=1 -DCMAKE_INSTALL_DEFAULT_PREFIX=/usr .;make -j$thread install; rm -rf /tmp/libjpeg-turbo; 37 | 38 | cd /tmp && git clone --recursive https://github.com/boostorg/boost.git -b boost-1.81.0 \ 39 | && cd boost \ 40 | && ./bootstrap.sh \ 41 | && ./b2 --with-system --with-filesystem --with-thread --with-chrono --with-date_time --with-serialization install \ 42 | && rm -rf /tmp/boost; 43 | ''' 44 | 45 | skip="*-manylinux_i686 *musllinux*" 46 | 47 | [tool.cibuildwheel.macos] 48 | archs = ["x86_64"] 49 | before-build="brew install boost cereal cmake fmt glog jpeg-turbo libpng lz4 xxhash zstd" 50 | environment = {"CMAKE_ARGS"="-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"} 51 | -------------------------------------------------------------------------------- /src/pyproject_arm64.toml: -------------------------------------------------------------------------------- 1 | # 2 | # To generate the whl files for mac arm64 run 3 | # python3 -m cibuildwheel --output-dir dist --platform macos --config-file {package}/pyproject_arm64.toml --archs arm64 ./src 4 | # 5 | [tool.cibuildwheel] 6 | build="cp36-*64 cp37-*64 cp38-*64 cp39-*64 cp310-*64 cp311-*64" 7 | 8 | [tool.cibuildwheel.macos] 9 | archs = ["arm64"] 10 | before-build="arch -arm64 brew install boost cereal cmake fmt glog jpeg-turbo libpng lz4 xxhash zstd" 11 | environment = {"ARCHFLAGS" ="-arch arm64", "CMAKE_ARGS"="-DCMAKE_PREFIX_PATH=/Users/${USER}/homebrew -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"} 12 | -------------------------------------------------------------------------------- /src/python/MpsIOPyBind.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "eyeGazeReader.h" 26 | #include "trajectoryReader.h" 27 | 28 | namespace py = pybind11; 29 | using namespace pybind11::literals; 30 | 31 | namespace ark::datatools::mpsIO { 32 | 33 | void exportMpsIO(py::module& m) { 34 | m.doc() = "A pybind11 binding for Aria Research Kit (ARK) mps_io library."; 35 | 36 | py::class_(m, "EyeGaze") 37 | .def_readwrite("gaze_vector", &EyeGaze::gaze_vector) 38 | .def_readwrite("uncertainty", &EyeGaze::uncertainty); 39 | 40 | m.def("readEyeGaze", &readEyeGaze, "path"_a); 41 | 42 | py::class_(m, "TrajectoryPose") 43 | .def_readwrite("tracking_timestamp_us", &TrajectoryPose::tracking_timestamp_us) 44 | .def_readwrite("utcTimestamp", &TrajectoryPose::utcTimestamp) 45 | .def_readwrite("T_world_device", &TrajectoryPose::T_world_device) 46 | .def_readwrite("deviceLinearVelocity_device", &TrajectoryPose::deviceLinearVelocity_device) 47 | .def_readwrite("angularVelocity_device", &TrajectoryPose::angularVelocity_device) 48 | .def_readwrite("qualityScore", &TrajectoryPose::qualityScore) 49 | .def_readwrite("gravity_odometry", &TrajectoryPose::gravity_odometry) 50 | .def_readwrite("graphUid", &TrajectoryPose::graphUid); 51 | 52 | m.def("readOpenLoop", &readOpenLoop, "path"_a); 53 | m.def("readCloseLoop", &readCloseLoop, "path"_a); 54 | } 55 | 56 | } // namespace ark::datatools::mpsIO 57 | -------------------------------------------------------------------------------- /src/python/bindings.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "AriaDataProviderPyBind.h" 18 | #include "AriaPlayersPyBind.h" 19 | #include "DeviceModelPyBind.h" 20 | #include "MpsIOPyBind.h" 21 | 22 | namespace py = pybind11; 23 | using namespace ark::datatools; 24 | 25 | PYBIND11_MODULE(projectaria_tools, m) { 26 | py::module dataprovider = m.def_submodule("dataprovider"); 27 | dataprovider::exportPlayers(dataprovider); 28 | dataprovider::exportDataProvider(dataprovider); 29 | 30 | py::module sensors = m.def_submodule("sensors"); 31 | sensors::exportSensors(sensors); 32 | 33 | py::module mpsIO = m.def_submodule("mps_io"); 34 | mpsIO::exportMpsIO(mpsIO); 35 | } 36 | -------------------------------------------------------------------------------- /src/python/tutorials/DataProvider_ImageTimeline.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import argparse 16 | 17 | import numpy as np 18 | from PIL import Image 19 | from projectaria_tools.dataprovider import AriaVrsDataProvider, StreamId 20 | 21 | 22 | def parse_args(): 23 | parser = argparse.ArgumentParser() 24 | parser.add_argument( 25 | "--vrs", 26 | dest="vrs_path", 27 | type=str, 28 | required=True, 29 | help="path to vrs file", 30 | ) 31 | return parser.parse_args() 32 | 33 | 34 | # DataProvider samples 35 | # Extract 10 RGB camera thumbnails from a VRS file 36 | # Teachings: 37 | # - How to initialize the AriaVrsDataProvider 38 | # - How to register a given Player to the DataProvider 39 | # - How to initialize a StreamId and query data records for it at a given timestamp 40 | if __name__ == "__main__": 41 | args = parse_args() 42 | 43 | aria_data_provider: AriaVrsDataProvider = AriaVrsDataProvider() 44 | if not aria_data_provider.openFile(args.vrs_path): 45 | print(f"failed to open vrs: {args.vrs_path}") 46 | 47 | aria_data_provider.setRgbCameraPlayer() 48 | 49 | aria_data_provider.setVerbose(True) 50 | 51 | # from https://facebookresearch.github.io/Aria_data_tools/docs/sensors-measurements/ 52 | rgb_camera_recordable_type_id = 214 53 | rgb_camera_instance_id = 1 54 | 55 | rgb_camera_stream_id = StreamId( 56 | rgb_camera_recordable_type_id, rgb_camera_instance_id 57 | ) 58 | 59 | recording_start = aria_data_provider.getFirstTimestampSec() 60 | recording_end = aria_data_provider.getLastDataRecord(rgb_camera_stream_id).timestamp 61 | 62 | sample_count = 10 63 | sample_timestamps = np.linspace(recording_start, recording_end, sample_count) 64 | 65 | width = aria_data_provider.getImageWidth(rgb_camera_stream_id) 66 | height = aria_data_provider.getImageHeight(rgb_camera_stream_id) 67 | 68 | resize_ratio = 10 69 | big_image = new_image = Image.new( 70 | "RGB", (int(width * sample_count / resize_ratio), int(height / resize_ratio)) 71 | ) 72 | current_width = 0 73 | 74 | for sample in sample_timestamps: 75 | aria_data_provider.readDataRecordByTime(rgb_camera_stream_id, sample) 76 | 77 | rgb_player = aria_data_provider.getRgbCameraPlayer() 78 | img = rgb_player.getData() 79 | 80 | img_buf = img.pixelFrame.getBuffer() 81 | buffer_array = np.array(img_buf, dtype=np.uint8) 82 | image_array = buffer_array.reshape((height, width, 3)) 83 | image = Image.fromarray(image_array) 84 | 85 | new_size = ( 86 | int(image.size[0] / resize_ratio), 87 | int(image.size[1] / resize_ratio), 88 | ) 89 | image = image.resize(new_size).rotate(-90) 90 | big_image.paste(image, (current_width, 0)) 91 | current_width = int(current_width + width / resize_ratio) 92 | 93 | big_image.show() 94 | -------------------------------------------------------------------------------- /src/python/tutorials/Sensors.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import argparse 16 | 17 | import numpy as np 18 | 19 | from projectaria_tools import sensors 20 | 21 | 22 | def parse_args(): 23 | parser = argparse.ArgumentParser() 24 | parser.add_argument( 25 | "--vrs", 26 | dest="vrs_path", 27 | type=str, 28 | required=True, 29 | help="path to vrs file", 30 | ) 31 | return parser.parse_args() 32 | 33 | 34 | # Sensors samples 35 | # Show how to manipulate the most common function in Sensors module 36 | # Teachings: 37 | # - How to retrieve calibration data from a given VRS file 38 | # - How to retrieve per sensor calibration data 39 | # - How to retrieve Camera calibration and use it to project/unproject points 40 | # - How to transfer points between sensor frames 41 | if __name__ == "__main__": 42 | args = parse_args() 43 | 44 | # 45 | # Read calibration data from a VRS file 46 | # 47 | print("Attempting to read calibration data from: ", args.vrs_path) 48 | calib_str = sensors.getCalibStrFromFile(args.vrs_path) 49 | 50 | device = sensors.DeviceModel.fromJson(calib_str) 51 | print(f"Cameras: {device.getCameraLabels()}") 52 | print(f"IMUs: {device.getImuLabels()}") 53 | print(f"Magnetometers: {device.getMagnetometerLabels()}") 54 | print(f"Barometers: {device.getBarometerLabels()}") 55 | print(f"Microphones: {device.getMicrophoneLabels()}") 56 | 57 | # 58 | # Demonstrate how to use camera model 59 | 60 | # Create a 3D points and project and unproject it with a given camera 61 | camLabel = "camera-slam-left" 62 | p_slamLeft = np.array([3.0, 2.0, 1.0]) 63 | uv_slamLeft = device.getCameraCalib(camLabel).projectionModel.project(p_slamLeft) 64 | print( 65 | f"Projecting 3D point {p_slamLeft} to image space of {camLabel}: " 66 | + f"{uv_slamLeft}." 67 | ) 68 | p_slamLeft_convertBack = device.getCameraCalib(camLabel).projectionModel.unproject( 69 | uv_slamLeft 70 | ) 71 | print( 72 | f"Unprojecting 2D pixel {uv_slamLeft} to 3D space in " 73 | + f"the frame of {camLabel}: {p_slamLeft_convertBack}." 74 | ) 75 | 76 | # Transform points between sensor frames. 77 | imuLabel = "imu-left" 78 | p_imuLeft = device.transform(p_slamLeft, camLabel, imuLabel) 79 | print( 80 | f"Transforming {p_slamLeft} from {camLabel} frame to {imuLabel} " 81 | + f"frame: {p_imuLeft}" 82 | ) 83 | 84 | # Rectifying points with the IMU accelerometer model. 85 | p_imuLeft_rect = device.getImuCalib( 86 | imuLabel 87 | ).accel.compensateForSystematicErrorFromMeasurement(p_imuLeft) 88 | 89 | print( 90 | f"Point {p_imuLeft} is rectified by the accelerometer model " 91 | + f"of {imuLabel} as: {p_imuLeft_rect}" 92 | ) 93 | -------------------------------------------------------------------------------- /src/sensors/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | set(SENSORS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 16 | 17 | # Build sensors lib. 18 | file(GLOB_RECURSE SENSORS_SRCS 19 | camera/*.h 20 | camera/*.cpp 21 | models/*.h 22 | models/*.cpp 23 | utility/*.cpp 24 | utility/*.cpp) 25 | add_library(sensors STATIC ${SENSORS_SRCS}) 26 | 27 | target_include_directories(sensors 28 | PUBLIC 29 | ${SENSORS_SOURCE_DIR} 30 | ) 31 | target_link_libraries(sensors 32 | PUBLIC 33 | Eigen3::Eigen 34 | vrslib 35 | Sophus::Sophus 36 | cereal::cereal 37 | ) 38 | 39 | # Build tests. 40 | if(BUILD_ARK_TESTS) 41 | add_subdirectory(tests) 42 | endif(BUILD_ARK_TESTS) 43 | 44 | # Build examples. 45 | if (BUILD_ARK_EXAMPLES) 46 | add_subdirectory(examples) 47 | endif(BUILD_ARK_EXAMPLES) 48 | -------------------------------------------------------------------------------- /src/sensors/camera/math/optimization/IgnoreJetInfinitesimal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | #include 19 | #include 20 | 21 | namespace ceres { 22 | template 23 | struct Jet; 24 | } 25 | 26 | namespace ark::datatools::sensors { 27 | 28 | template 29 | inline ARK_HOST_DEVICE double IgnoreJetInfinitesimal(const T& j) { 30 | static_assert( 31 | std::is_same::value || std::is_same::value, 32 | "T should be a ceres jet"); 33 | return j.a; 34 | } 35 | 36 | inline ARK_HOST_DEVICE double IgnoreJetInfinitesimal(double j) { 37 | return j; 38 | } 39 | 40 | inline ARK_HOST_DEVICE float IgnoreJetInfinitesimal(float j) { 41 | return j; 42 | } 43 | 44 | template 45 | inline ARK_HOST_DEVICE Eigen::Matrix 46 | IgnoreEigenJetInfinitesimal(const Eigen::MatrixBase& mat) { 47 | return mat.unaryExpr([](const typename Derived::Scalar& v) { return IgnoreJetInfinitesimal(v); }); 48 | } 49 | } // namespace ark::datatools::sensors 50 | -------------------------------------------------------------------------------- /src/sensors/camera/portability/Inline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // HOST / DEVICE Annotations 20 | #if defined(__CUDACC__) 21 | 22 | // For the NVCC specific function specifiers 23 | #include 24 | 25 | #define ARK_HOST_DEVICE __host__ __device__ 26 | #define ARK_HOST_DEVICE_INLINE __host__ __device__ __forceinline__ 27 | 28 | #else // !defined(__CUDACC__) 29 | 30 | #define ARK_HOST_DEVICE 31 | #define ARK_HOST_DEVICE_INLINE inline 32 | 33 | #endif // !defined(__CUDACC__) 34 | -------------------------------------------------------------------------------- /src/sensors/camera/projection/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | namespace ark::datatools::sensors::CameraNewtonsMethod { 27 | constexpr int kMaxIterations = 50; 28 | constexpr float kFloatTolerance = 1e-5; 29 | constexpr float kDoubleTolerance = 1e-7; 30 | 31 | template 32 | constexpr ARK_HOST_DEVICE float getConvergenceTolerance() { 33 | if (std::is_same>::value) { 34 | return kFloatTolerance; 35 | } 36 | if (std::is_same>::value) { 37 | // largest number that passes project / unproject test to within 1e-8 pixels for all models. 38 | return kDoubleTolerance; 39 | } 40 | } 41 | 42 | template <> 43 | constexpr ARK_HOST_DEVICE float getConvergenceTolerance() { 44 | return kFloatTolerance; 45 | } 46 | 47 | template <> 48 | constexpr ARK_HOST_DEVICE float getConvergenceTolerance() { 49 | return kDoubleTolerance; 50 | } 51 | 52 | template 53 | inline ARK_HOST_DEVICE bool hasConverged(const T& step) { 54 | using std::abs; 55 | return abs(IgnoreJetInfinitesimal(step)) < getConvergenceTolerance(); 56 | } 57 | 58 | template 59 | inline ARK_HOST_DEVICE bool hasConverged(const T& stepA, const T& stepB) { 60 | return IgnoreJetInfinitesimal(stepA * stepA + stepB * stepB) < 61 | getConvergenceTolerance() * getConvergenceTolerance(); 62 | } 63 | 64 | template 65 | inline ARK_HOST_DEVICE bool hasConverged(const Eigen::Matrix& step) { 66 | return IgnoreJetInfinitesimal(step.squaredNorm()) < 67 | getConvergenceTolerance() * getConvergenceTolerance(); 68 | } 69 | 70 | template 71 | inline ARK_HOST_DEVICE T initTheta(const T& r) { 72 | // tried a lot of fancy ways to initialize, this seems to work best. 73 | // the model has just gone through an tan(x) at this point, so while most points lie in the range 74 | // of about 0 to 2, points that were near the camera corners might take extreme values of 1000+. 75 | // For zero distortion the optimal output is theta = r, however as r increases all the lenses we 76 | // use seem to bias towards lower values. This warrents futher investigation however with the 77 | // naive zero distortion initialization some models fail for some points near 90 degrees. The sqrt 78 | // relationship offers a good tradeoff as it is fast to calculate and has minimal impact on most 79 | // points while pulling back extreme points to be more reasonable. 80 | using std::sqrt; 81 | return sqrt(r); 82 | } 83 | } // namespace ark::datatools::sensors::CameraNewtonsMethod 84 | -------------------------------------------------------------------------------- /src/sensors/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | add_executable(sensors_example 16 | main.cpp 17 | ) 18 | 19 | set(THREADS_PREFER_PTHREAD_FLAG ON) 20 | find_package(Threads REQUIRED) 21 | 22 | target_link_libraries(sensors_example 23 | PUBLIC 24 | sensors 25 | PRIVATE 26 | Threads::Threads 27 | ) 28 | -------------------------------------------------------------------------------- /src/sensors/examples/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include 22 | 23 | #include 24 | 25 | using namespace ark::datatools; 26 | using namespace ark::datatools::sensors; 27 | 28 | int main(int argc, char** argv) { 29 | // Load calibration file. 30 | if (argc <= 1) { 31 | std::cerr << "Usage: sensors_example [.json | .vrs]" << std::endl; 32 | return 1; 33 | } 34 | DeviceModel model = DeviceModel::fromJson(getCalibStrFromFile(argv[1])); 35 | 36 | std::cout << "Successfully loaded calibration file from: " << argv[1] << std::endl; 37 | 38 | Eigen::Vector3d p_slamLeft{3.0, 2.0, 1.0}; 39 | std::cout << "Original point in camera-slam-left frame: " << p_slamLeft.transpose() << std::endl; 40 | 41 | // Transform a 3D point from one frame to another. 42 | Eigen::Vector3d p_imuLeft = model.transform(p_slamLeft, "camera-slam-left", "imu-left"); 43 | std::cout << "Transformed to imu-left frame: " << p_imuLeft.transpose() << std::endl; 44 | 45 | // Project a 3D point to image plane and back. 46 | const auto slamLeft = model.getCameraCalib("camera-slam-left").value(); 47 | Eigen::Vector2d uv_slamLeft = slamLeft.projectionModel.project(p_slamLeft); 48 | std::cout << "Projected to image plane: " << uv_slamLeft.transpose() << std::endl; 49 | Eigen::Vector3d p_slamLeft_convertBack = slamLeft.projectionModel.unproject(uv_slamLeft); 50 | std::cout << "Unprojected to camera frame: " << p_slamLeft_convertBack.transpose() << std::endl; 51 | 52 | // Rectify a gyro 3D vector in IMU space. 53 | p_imuLeft = {0.1, 0.2, 0.3}; 54 | std::cout << "Original vector in imu-left frame: " << p_imuLeft.transpose() << std::endl; 55 | Eigen::Vector3d p_imuLeft_gyroRectified = 56 | model.getImuCalib("imu-left") 57 | .value() 58 | .gyro.compensateForSystematicErrorFromMeasurement(p_imuLeft); 59 | std::cout << "Rectified gyro vector: " << p_imuLeft_gyroRectified.transpose() << std::endl; 60 | 61 | return 0; 62 | } 63 | -------------------------------------------------------------------------------- /src/sensors/portability/Inline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | // HOST / DEVICE Annotations 20 | #if defined(__CUDACC__) 21 | 22 | // For the NVCC specific function specifiers 23 | #include 24 | 25 | #define ARVR_HOST_DEVICE __host__ __device__ 26 | #define ARVR_DEVICE_INLINE __device__ __forceinline__ 27 | #define ARVR_HOST_DEVICE_INLINE __host__ __device__ __forceinline__ 28 | 29 | #else // !defined(__CUDACC__) 30 | 31 | #define ARVR_HOST_DEVICE 32 | #define ARVR_DEVICE_INLINE inline 33 | #define ARVR_HOST_DEVICE_INLINE inline 34 | 35 | #endif // !defined(__CUDACC__) 36 | -------------------------------------------------------------------------------- /src/sensors/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | find_package(GTest) 16 | 17 | add_executable(deviceModel_tests 18 | DeviceModelTests.cpp 19 | ) 20 | 21 | target_link_libraries(deviceModel_tests 22 | PUBLIC 23 | sensors 24 | GTest::Main 25 | ) 26 | gtest_discover_tests(deviceModel_tests) 27 | add_test(NAME deviceModel_tests WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 28 | COMMAND $) 29 | -------------------------------------------------------------------------------- /src/sensors/utility/VrsUtils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | namespace ark::datatools::sensors { 25 | 26 | namespace fs = std::filesystem; 27 | 28 | std::string getCalibStrFromFile(const std::string& filePath) { 29 | auto ext = fs::path(filePath).extension(); 30 | if (ext == ".json") { 31 | std::ifstream fin(filePath); 32 | if (!fin.is_open()) { 33 | std::cerr << "Unable to find file: " << filePath << std::endl; 34 | } 35 | std::ostringstream sstr; 36 | sstr << fin.rdbuf(); 37 | fin.close(); 38 | return sstr.str(); 39 | } else if (ext == ".vrs") { 40 | vrs::RecordFileReader reader; 41 | reader.openFile(filePath); 42 | return sensors::getCalibrationFromVrsFile(reader); 43 | } else { 44 | std::cerr << "Unsupported file type: " << ext << std::endl; 45 | } 46 | // return {} - no calibration string was found 47 | return {}; 48 | } 49 | 50 | std::string getCalibrationFromVrsFile(const vrs::RecordFileReader& reader) { 51 | return reader.getTag("calib_json"); 52 | } 53 | 54 | } // namespace ark::datatools::sensors 55 | -------------------------------------------------------------------------------- /src/sensors/utility/VrsUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | namespace ark::datatools::sensors { 24 | 25 | // Get calibration string either from VRS or JSON file on disk 26 | std::string getCalibStrFromFile(const std::string& filePath); 27 | 28 | // Get calibration string from VRS RecordFileReader 29 | std::string getCalibrationFromVrsFile(const vrs::RecordFileReader& reader); 30 | 31 | } // namespace ark::datatools::sensors 32 | -------------------------------------------------------------------------------- /src/version.txt: -------------------------------------------------------------------------------- 1 | 0.0.2 2 | -------------------------------------------------------------------------------- /src/visualization/AriaViewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "AriaViewerBase.h" 20 | #include "utils.h" 21 | 22 | namespace ark::datatools::visualization { 23 | 24 | class AriaViewer : public AriaViewerBase { 25 | public: 26 | AriaViewer( 27 | datatools::dataprovider::AriaDataProvider* dataProvider, 28 | int width, 29 | int height, 30 | const std::string& name = "AriaViewer", 31 | int id = 0); 32 | 33 | ~AriaViewer() override = default; 34 | 35 | void run() override; 36 | 37 | std::pair initDataStreams( 38 | const std::vector& kImageStreamIds, 39 | const std::vector& kImuStreamIds = {}, 40 | const std::vector& kDataStreams = {}) override; 41 | }; 42 | } // namespace ark::datatools::visualization 43 | -------------------------------------------------------------------------------- /src/visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | find_package(Pangolin REQUIRED) 16 | find_package(Threads REQUIRED) 17 | 18 | add_library(aria_viewer_lib AriaViewerBase.cpp AriaViewerBase.h) 19 | target_link_libraries(aria_viewer_lib 20 | PUBLIC 21 | dataprovider 22 | Sophus::Sophus) 23 | target_include_directories(aria_viewer_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 24 | 25 | message("--- Compiling aria_viewer.") 26 | add_executable(aria_viewer main.cpp AriaViewer.cpp) 27 | target_link_libraries(aria_viewer PRIVATE aria_viewer_lib ${Pangolin_LIBRARIES} Threads::Threads) 28 | 29 | message("--- Compiling aria_multi_viewer.") 30 | add_executable(aria_multi_viewer main_multi.cpp AriaViewer.cpp) 31 | target_link_libraries(aria_multi_viewer PRIVATE aria_viewer_lib ${Pangolin_LIBRARIES} Threads::Threads) 32 | 33 | message("--- Compiling aria_sensors_viewer.") 34 | add_executable(aria_sensors_viewer main_aria_sensors_viewer.cpp) 35 | target_link_libraries(aria_sensors_viewer PRIVATE dataprovider ${Pangolin_LIBRARIES}) 36 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | module.exports = { 6 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 7 | }; 8 | -------------------------------------------------------------------------------- /website/docs/aria-vrs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | id: aria-vrs 4 | title: How Project Aria Uses VRS 5 | --- 6 | :::caution 7 | This website is an archive of Project Aria's first open source initiative. It still provides specific tooling and documentation for the Aria Pilot Dataset. Go to [Aria VRS](https://facebookresearch.github.io/projectaria_tools/docs/data_formats/aria_vrs/aria_vrs_format) in Project Aria Tools for the latest VRS documentation and timestamp definitions. 8 | ::: 9 | 10 | # **How Project Aria Uses VRS** 11 | 12 | Project Aria chose [VRS](https://facebookresearch.github.io/vrs/) as its data container because it is a file format designed to record and playback streams of XR sensor data and supports huge file sizes. These VRS files contain streams of time-sorted records generated for each sensor, with one set of sensors per stream. Project Aria data uses VRS for features such as: 13 | 14 | * Records are structured as a succession of typed content blocks. 15 | * The `DataLayout` definitions of the metadata blocks in Project Aria VRS files are open sourced under [vrs/vrs/oss/aria](https://github.com/facebookresearch/vrs/tree/main/vrs/oss/aria). These definitions provide an overview of what information can be extracted for each stream from a Project Aria sequence. 16 | * Streams contain `Configuration`, `State` and `Data` records, each with a timestamp in a common time domain for the whole file. 17 | * Playback is optimized for timestamp order, which is key for network streaming. 18 | * Random-access playback is supported via VRS 19 | 20 | The Aria Research Kit: Aria Data Tools provides an interface to access the data via an abstraction (an X_provider string) that allows users to iterate through all the sensor recordings. 21 | 22 | VRS is automatically installed when you install Aria Data Tools. [VRS](https://facebookresearch.github.io/vrs/) is an open tool with API documentation available on Github. 23 | 24 | 25 | * [VRS Readme](https://github.com/facebookresearch/vrs) 26 | * [VRS Documentation](https://facebookresearch.github.io/vrs/) 27 | * [VRS Core Functionality](https://github.com/facebookresearch/vrs/tree/main/vrs) 28 | -------------------------------------------------------------------------------- /website/docs/citation-contribute.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 12 3 | id: citation-contribute 4 | title: Citation and Contributing 5 | --- 6 | 7 | # Citation and Contributing 8 | 9 | :::caution 10 | This website is an archive of Project Aria's first open source initiative. Go to [Attribution and Contributing](https://facebookresearch.github.io/projectaria_tools/docs/attribution_citation) at Project Aria Tools for the latest citation details. 11 | ::: 12 | 13 | 14 | ## Aria Data Tools 15 | 16 | If you use Aria Data Tools in your research, please cite the Aria Data Tools website _https://facebookresearch.github.io/aria_data_tools_. 17 | 18 | If you use Aria Data Tools in GitHub, please consider starring ⭐ us and citing: 19 | 20 | ``` 21 | @misc{aria_data_tools, 22 | title = {Aria Data Tools}, 23 | author = {Selcuk Karakas and Pierre Moulon and Wenqi Zhang and Nan Yang and 24 | Julian Straub and Lingni Ma and Zhaoyang Lv and Elizabeth Argall and Georges Berenger and 25 | Tanner Schmidt and Kiran Somasundaram and Vijay Baiyya and Philippe Bouttefroy and Geof Sawaya and 26 | Yang Lou and Eric Huang and Tianwei Shen and David Caruso and Bilal Souti and Chris Sweeney and Jeff Meissner and 27 | Edward Miller and Richard Newcombe}, 28 | howpublished = {\url{https://github.com/facebookresearch/aria_data_tools}}, 29 | year = {2022} 30 | } 31 | ``` 32 | 33 | ## How to contribute 34 | 35 | We welcome contributions! See [CONTRIBUTING](https://github.com/facebookresearch/Aria_data_tools/blob/main/CONTRIBUTING.md) for details on how to get started, and our [code of conduct](https://github.com/facebookresearch/Aria_data_tools/blob/main/CODE_OF_CONDUCT.md). 36 | 37 | 38 | 39 | ## Aria Pilot Dataset 40 | 41 | If you use the Aria Pilot Dataset in your research, please cite the Aria Pilot Dataset website _https://about.facebook.com/realitylabs/projectaria/datasets_ or use the white paper when it is released. 42 | 43 | If you use the Aria Pilot Dataset in GitHub, please consider starring ⭐ us and citing: 44 | 45 | 46 | ``` 47 | @misc{aria_pilot_dataset, 48 | title = {Aria Pilot Dataset}, 49 | author = {Zhaoyang Lv and Edward Miller and Jeff Meissner and Luis Pesqueira and 50 | Chris Sweeney and Jing Dong and Lingni Ma and Pratik Patel and Pierre Moulon and 51 | Kiran Somasundaram and Omkar Parkhi and Yuyang Zou and Nikhil Raina and Steve Saarinen 52 | and Yusuf M Mansour and Po-Kang Huang and Zijian Wang and Anton Troynikov and Raul Mur Artal 53 | and Daniel DeTone and Daniel Barnes and Elizabeth Argall and Andrey Lobanovskiy and 54 | David Jaeyun Kim and Philippe Bouttefroy and Julian Straub and Jakob Julian Engel and 55 | Prince Gupta and Mingfei Yan and Renzo De Nardi and Richard Newcombe}, 56 | howpublished = {\url{https://about.facebook.com/realitylabs/projectaria/datasets}}, 57 | year = {2022} 58 | } 59 | ``` 60 | 61 | ## Acknowledgements 62 | 63 | **Everyday day activity data collection and quality analysis team:** David Bui, Thomas Soares, Michael Loudon, Madalyn Bowen. 64 | 65 | **Anonymization labeling:** Shiwei Lin, Jiabo Hu, Daisy Lu, Ruihan Shan, Robert Kuo. 66 | 67 | **Desktop activity hardware setup and data collection:** Wilson Dreewes, Cole Wilson, Kevin Harris, Tomas Hodan. 68 | 69 | **Data management and web hosting:** Mikhail Koslowski, Anton Kastritskiy. 70 | -------------------------------------------------------------------------------- /website/docs/howto/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "How to Use the Tools", 3 | "position": 4 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/install.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | id: Install 4 | title: Install 5 | --- 6 | :::info 7 | These instructions will install Aria Data Tools. We recommend using [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro) instead, wherever possible. It does not have the aria_multi_viewer utility for visualizing multiple time-synchronized recordings, but it is more up to date and will continue to be maintained. [Getting Started With Aria Data Utilities](https://facebookresearch.github.io/projectaria_tools/docs/data_utilities/getting_started) in Project Aria Tools includes Jupyter Notebook Tutorials that can be run locally, or on Google Colab. 8 | ::: 9 | 10 | # Install 11 | 12 | ## What is it? 13 | 14 | The Aria Research Kit: Aria Data Tools provides Python3 code and a C++ library to work with VRS files data and requires a C++17 compiler. 15 | 16 | :::note 17 | 18 | Aria Data Tools can be built and used in a container (Docker/Podman) or as a local build (CentOS/Debian/MacOS) on Unix distribution. 19 | 20 | ::: 21 | 22 | ## Getting started 23 | 24 | * [Build guide](https://github.com/facebookresearch/Aria_data_tools/blob/main/BUILD.md) 25 | -------------------------------------------------------------------------------- /website/docs/license.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 12 3 | id: license 4 | title: License 5 | --- 6 | # License 7 | 8 | Aria Data Tools are released by Meta under the [Apache 2.0 license](https://github.com/facebookresearch/vrs/blob/main/LICENSE). 9 | -------------------------------------------------------------------------------- /website/docs/overview.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | id: overview 4 | title: About Aria Data Tools 5 | --- 6 | :::caution 7 | Aria Data Tools is an archive of the original Aria open source tooling. Only use this for the Aria Pilot Dataset. Go to [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro) if you're working with any other Aria data. 8 | 9 | This website will be deleted in September 2024. 10 | ::: 11 | 12 | # Overview 13 | 14 | Aria Data Tools was [Project Aria's](https://www.projectaria.com/) first open source release, go to [projectaria.com](https://www.projectaria.com/) to find out about more recent open science initiatives and how to get involved. 15 | 16 | ## Aria Data Tools 17 | 18 | Aria Data Tools was released on June 19 2022 for a tutorial at CVPR: [Towards always-on egocentric vision research using Meta’s Aria glasses](https://ariatutorial2022.github.io/). This repo was deprecated in June 2023 when [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro) was released. 19 | 20 | We recommend using [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro) wherever possible. Project Aria Tools does not have Aria Data Tool's aria_multi_viewer utility for visualizing multiple time-synchronized recordings, but it is more up to date and will continue to be maintained. [Getting Started With Aria Data Utilities](https://facebookresearch.github.io/projectaria_tools/docs/data_utilities/getting_started) in Project Aria Tools includes Jupyter Notebook Tutorials that can be run locally, or on Google Colab. 21 | 22 | ## Aria Pilot Dataset 23 | 24 | [Aria Pilot Dataset documentation](/docs/pilotdata/pilotdata-index/) is stored in *Archive: Aria Data Tools*, because it was Project Aria's first open source initiative and it uses a different data structure compared to our latest open releases. 25 | 26 | ## Privacy 27 | 28 | [View Meta's principles of responsible innovation](https://about.facebook.com/realitylabs/responsible-innovation-principles/) 29 | 30 | [Project Aria research community guidelines](https://about.facebook.com/realitylabs/projectaria/community-guidelines/) 31 | 32 | ## Contact 33 | 34 | ProjectAriaDataset@fb.com 35 | -------------------------------------------------------------------------------- /website/docs/pilotdata/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Aria Pilot Dataset", 3 | "position": 5 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/pilotdata/desk/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Desktop Activities Multi-View", 3 | "position": 50 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/pilotdata/location-output.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | id: location-output 4 | title: Location Output Data 5 | --- 6 | import useBaseUrl from '@docusaurus/useBaseUrl' 7 | 8 | :::caution 9 | Aria Pilot Dataset documentation is stored in *Archive: Aria Data Tools*, because it was Project Aria's first open source initiative and it uses a different data structure compared to our latest open releases. For the most up to date tooling and to find out about our other open datasets go to [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro). 10 | 11 | This website will be deleted in September 2024. 12 | ::: 13 | 14 | # Location Output Data 15 | 16 | Location Output Data shows the Project Aria device’s position and orientation in the world across six dimensions of freedom. 17 | 18 | Each recording has a corresponding `trajectory.csv file`, which contains the co-location data of the Project Aria device. The trajectory is saved by a series of timestamped transformations of the Project Aria device's left IMU relative to the world coordinates (frames). The transformations are saved in 1KHz, to give high transformation accuracy when interpolating the trajectory at any arbitrary timestamp. 19 | 20 | To give co-location information across different recordings, trajectories from the same location are all aligned into the same world frame. Trajectories from the same sequence are all aligned into the same world frame. The origin of the world frames are arbitrarily defined. The gravity acceleration vector always points up in the z axis of the world frame. 21 | 22 | The Location Output Dataset for each recording is stored in `location/trajectory.csv` 23 | 24 | **Table 1:** *`trajectory.csv` Structure* 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
Timestamp (ns from Unix Epoch)Position in world (t_world_leftimu) [meters]Rotation R_world_leftimu
txyzqwqxqyqz
46 |
47 | 48 | :::note 49 | This data structure is different to the location output data services provided to Academic partners. 50 | ::: 51 | 52 | 56 | 57 | *Shared 3D Global Trajectories for Multi-User Activities in the Same Location* 58 | -------------------------------------------------------------------------------- /website/docs/pilotdata/reprojected-gaze.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | id: reprojected-gaze 4 | title: Eye Gaze Data 5 | --- 6 | import useBaseUrl from '@docusaurus/useBaseUrl' 7 | 8 | :::caution 9 | Aria Pilot Dataset documentation is stored in *Archive: Aria Data Tools*, because it was Project Aria's first open source initiative and it uses a different data structure compared to our latest open releases. For the most up to date tooling and to find out about our other open datasets go to [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro). 10 | 11 | This website will be deleted in September 2024. 12 | 13 | ::: 14 | 15 | # Eye Gaze Data 16 | 17 | Eye Gaze derived data uses data from Project Aria devices’ eye tracking cameras to estimate where the user is looking. Data from the eye tracking cameras are used to estimate a vector expressing the gaze direction. That vector is translated into a 2D pixel coordinate on the 120 degree FOV RGB camera image. 18 | 19 | The Eye Gaze Data for each recording is stored in `eyetracking/et_in_rgb_stream.csv`. 20 | 21 | In the csv file (x,y) represents the calibrated 2D pixel coordinate of gaze position. 22 | 23 | **Table 1:** *`et_in_rgb_stream.csv` Structure* 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
timestamp_unix_ns Calibrated gaze position (pixel coordinate)
t x y
39 |
40 | 41 | :::note 42 | The provided timestamp is the timestamp of the eye camera image used to compute the gaze, not an RGB camera timestamp. To query the approximate location of eye gaze at RGB image timestamp, we suggest you interpolate gaze results from neighboring frames. 43 | ::: 44 | 45 | 46 | 50 | 51 | **Figure 1:** *Eye Tracking Visualization* 52 | -------------------------------------------------------------------------------- /website/docs/pilotdata/speech2text.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | id: speech2text 4 | title: Speech2Text Output Data 5 | --- 6 | :::caution 7 | Aria Pilot Dataset documentation is stored in *Archive: Aria Data Tools*, because it was Project Aria's first open source initiative and it uses a different data structure compared to our latest open releases. For the most up to date tooling and to find out about our other open datasets go to [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro). 8 | 9 | This website will be deleted in September 2024. 10 | 11 | ::: 12 | 13 | # Speech2Text Output Data 14 | 15 | Speech2Text Output Data provides text strings generated by Automatic Speech Recognition with timestamps and confidence rating. 16 | 17 | Each recording has two .csv files that are the same, except `speech2text/speech.csv` uses the wav file time domain and `speech2text/speech_aria_domain.csv` uses Aria time domain. 18 | 19 | 20 | 21 | **Table 1:** *`speech.csv` Structure* 22 | 23 | |startTime_ms |endTime_ms |written |confidence | 24 | |--- |--- |--- |--- | 25 | |54040 |55040 | I’m |0.25608 | 26 | |72920 |73920 | looking |0.84339 | 27 | 28 | *Note:* token in wav file time domain (start = 0) 29 | 30 | 31 | 32 | **Table 2:** *`speech_aria_domain.csv` Structure* 33 | 34 | | startTime_ns | endTime_ns | written | confidence | 35 | |--- |--- |--- |--- | 36 | |56511040 |56512040 | I’m |0.25608 | 37 | |56529920 |56530920 | looking |0.84339 | 38 | 39 | *Note:* token in Aria file time domain (start = 0) 40 | -------------------------------------------------------------------------------- /website/docs/pilotdata/timestamps.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | id: timestamps 4 | title: Timestamps Mapping Data 5 | --- 6 | import useBaseUrl from '@docusaurus/useBaseUrl' 7 | 8 | :::caution 9 | Aria Pilot Dataset documentation is stored in *Archive: Aria Data Tools*, because it was Project Aria's first open source initiative and it uses a different data structure compared to our latest open releases. For the most up to date tooling and to find out about our other open datasets go to [Project Aria Tools](https://facebookresearch.github.io/projectaria_tools/docs/intro). 10 | 11 | This website will be deleted in September 2024. 12 | 13 | ::: 14 | 15 | # Timestamps Mapping Data 16 | 17 | Project Aria devices and multi-view devices operating in proximity to each other (<100m) can leverage [SMPTE timecode](https://en.wikipedia.org/wiki/SMPTE_timecode) to receive a synchronized time clock with sub-millisecond accuracy. 18 | 19 | The mapping between local time clock and synchronized time clock for each sequence is stored in the file `synchronization/timestamp_mapping.csv` which contains two columns of data: 20 | 21 | * `deviceTimestampNs` - Timestamps in the device’s local time clock. All devices have their own time clocks which start at different times and potentially progress at different rates. 22 | * `syncedTimestampNs` - Timestamps in the synchronized time clock common to all devices. 23 | 24 | This mapping data provides a way to convert timestamps from device local time clock to synchronized time clock and, by extension this also mean that data from multiple devices can be expressed with respect to a common time. The timestamps in `timestamp_mapping.csv` are increased monotonically. 25 | 26 | To translate the local timestamp of an arbitrary piece of data recorded by the device, you can use the offset obtained by searching in the mapping file for the nearest local timestamp and calculating its delta to the synchronized time clock. An implementation of this mechanism is provided in [Aria Data Tool’s code](https://github.com/facebookresearch/Aria_data_tools/blob/main/src/desktop_activities_viewer/DesktopActivitiesViewer.h.) 27 | 28 | **Table 1:** *`timestamp_mapping.csv` Structure* 29 | 30 | |deviceTimestampNs |syncedTimestampNs | 31 | |--- |--- | 32 | |monotonically increasing timestamps in ns |monotonically increasing timestamps in ns | 33 | 34 | 35 | 39 | -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "staticdocs-starter", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "clean": "docusaurus clear", 13 | "serve": "docusaurus serve", 14 | "write-translations": "docusaurus write-translations", 15 | "write-heading-ids": "docusaurus write-heading-ids" 16 | }, 17 | "dependencies": { 18 | "@algolia/client-search": "^4.9.1", 19 | "@docusaurus/core": "2.3.1", 20 | "@docusaurus/preset-classic": "2.3.1", 21 | "@docusaurus/theme-classic": "2.3.1", 22 | "@mdx-js/react": "^1.6.21", 23 | "@svgr/webpack": "^6.5.1", 24 | "clsx": "^1.1.1", 25 | "docusaurus-plugin-internaldocs-fb": "1.9.1", 26 | "file-loader": "^6.2.0", 27 | "prism-react-renderer": "^1.2.1", 28 | "react": "^17.0.1", 29 | "react-dom": "^17.0.1", 30 | "react-loadable": "^5.5.0", 31 | "typescript": "^2.7", 32 | "url-loader": "^4.1.1", 33 | "webpack": "^5.0.0" 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.5%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | }, 47 | "resolutions": { 48 | "shelljs": "^0.8.5", 49 | "ansi-html": "0.0.8" 50 | }, 51 | "devDependencies": { 52 | "yarn-audit-fix": "^9.3.10" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | /** 6 | * Creating a sidebar enables you to: 7 | - create an ordered group of docs 8 | - render a sidebar for each doc of that group 9 | - provide next/previous navigation 10 | 11 | The sidebars can be generated from the filesystem, or explicitly defined here. 12 | 13 | Create as many sidebars as you want. 14 | */ 15 | 16 | module.exports = { 17 | // By default, Docusaurus generates a sidebar from the docs folder structure 18 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 19 | 20 | // But you can create a sidebar manually 21 | /* 22 | tutorialSidebar: [ 23 | { 24 | type: 'category', 25 | label: 'Tutorial', 26 | items: ['hello'], 27 | }, 28 | ], 29 | */ 30 | }; 31 | -------------------------------------------------------------------------------- /website/src/components/HomepageFeatures.js: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | import React from 'react'; 6 | import clsx from 'clsx'; 7 | import styles from './HomepageFeatures.module.css'; 8 | 9 | const FeatureList = [ 10 | 11 | { 12 | title: 'C++ and Python Tools ', 13 | Svg: require('../../static/img/python-brands.svg').default, 14 | description: ( 15 | <> 16 | Analyze Project Aria VRS data with Python code and C++ libraries 17 | 18 | ), 19 | }, 20 | 21 | { 22 | title: 'A Rich Sensor Suite', 23 | Svg: require('../../static/img/arrows-to-eye-solid.svg').default, 24 | description: ( 25 | <> 26 | Read & visualize Project Aria sequences and sensor data 27 | 28 | ), 29 | }, 30 | { 31 | title: '6DoF Transformations', 32 | Svg: require('../../static/img/glasses-solid.svg').default, 33 | description: ( 34 | <> 35 | Retrieve calibration data and interact with Aria camera models 36 | 37 | ), 38 | }, 39 | 40 | ]; 41 | 42 | 43 | function Feature({Svg, title, description}) { 44 | return ( 45 |
46 |
47 | 48 |
49 |
50 |

{title}

51 |

{description}

52 |
53 |
54 | ); 55 | } 56 | 57 | export default function HomepageFeatures() { 58 | return ( 59 |
60 |
61 |
62 | {FeatureList.map((props, idx) => ( 63 | 64 | ))} 65 |
66 |
67 |
68 | ); 69 | } 70 | -------------------------------------------------------------------------------- /website/src/components/HomepageFeatures.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | .features { 6 | display: flex; 7 | align-items: center; 8 | padding: 2rem 0; 9 | width: 100%; 10 | } 11 | 12 | .featureSvg { 13 | height: 200px; 14 | width: 200px; 15 | } 16 | -------------------------------------------------------------------------------- /website/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | /** 6 | * Any CSS included here will be global. The classic template 7 | * bundles Infima by default. Infima is a CSS framework designed to 8 | * work well for content-centric websites. 9 | */ 10 | 11 | /* You can override the default Infima variables here. */ 12 | :root { 13 | --ifm-color-primary: #67788A; 14 | --ifm-color-primary-dark: rgb(33, 175, 144); 15 | --ifm-color-primary-darker: rgb(12, 14, 13); 16 | --ifm-color-primary-darkest: rgb(26, 136, 112); 17 | --ifm-color-primary-light: rgb(70, 203, 174); 18 | --ifm-color-primary-lighter: rgb(102, 212, 189); 19 | --ifm-color-primary-lightest: rgb(146, 224, 208); 20 | --ifm-code-font-size: 95%; 21 | --ifm-link-color: #1877F2; 22 | } 23 | 24 | .docusaurus-highlight-code-line { 25 | background-color: rgba(0, 0, 0, 0.1); 26 | display: block; 27 | margin: 0 calc(-1 * var(--ifm-pre-padding)); 28 | padding: 0 var(--ifm-pre-padding); 29 | } 30 | 31 | 32 | html[data-theme='dark'] .docusaurus-highlight-code-line { 33 | background-color: rgba(0, 0, 0, 0.3); 34 | } 35 | .button.button--secondary.button--outline:not(.button--active):not(:hover) { 36 | color: var(--ifm-font-color-base-inverse) 37 | } 38 | -------------------------------------------------------------------------------- /website/src/pages/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | import React from 'react'; 6 | import clsx from 'clsx'; 7 | import Layout from '@theme/Layout'; 8 | import Link from '@docusaurus/Link'; 9 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 10 | import styles from './index.module.css'; 11 | import HomepageFeatures from '../components/HomepageFeatures'; 12 | 13 | function HomepageHeader() { 14 | const {siteConfig} = useDocusaurusContext(); 15 | return ( 16 |
17 |
18 |

{siteConfig.title}

19 |

{siteConfig.tagline}

20 | 21 |

22 |
23 | 26 | Get Started 27 | 28 |
29 |
30 |
31 | ); 32 | } 33 | 34 | export default function Home() { 35 | const {siteConfig} = useDocusaurusContext(); 36 | return ( 37 | 40 | 41 |
42 | 43 |
44 |
45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. 3 | */ 4 | 5 | /** 6 | * CSS files with the .module.css suffix will be treated as CSS modules 7 | * and scoped locally. 8 | */ 9 | 10 | .heroBanner { 11 | padding: 4rem 0; 12 | text-align: center; 13 | position: relative; 14 | overflow: hidden; 15 | } 16 | 17 | @media screen and (max-width: 966px) { 18 | .heroBanner { 19 | padding: 2rem; 20 | } 21 | } 22 | 23 | .buttons { 24 | display: flex; 25 | align-items: center; 26 | justify-content: center; 27 | } 28 | -------------------------------------------------------------------------------- /website/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/img/Aria-technical-specs.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/Aria-technical-specs.jpeg -------------------------------------------------------------------------------- /website/static/img/aria_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/aria_icon.png -------------------------------------------------------------------------------- /website/static/img/aria_icon_transparent_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/aria_icon_transparent_small.png -------------------------------------------------------------------------------- /website/static/img/arrows-to-eye-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/img/docs/EyeGazeViewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/EyeGazeViewer.png -------------------------------------------------------------------------------- /website/static/img/docs/TrajectoryAndEyeGazeVectorsViewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/TrajectoryAndEyeGazeVectorsViewer.png -------------------------------------------------------------------------------- /website/static/img/docs/TrajectoryViewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/TrajectoryViewer.png -------------------------------------------------------------------------------- /website/static/img/docs/aria_ref_frames.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/aria_ref_frames.PNG -------------------------------------------------------------------------------- /website/static/img/docs/aria_ref_frames_all_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/aria_ref_frames_all_black.png -------------------------------------------------------------------------------- /website/static/img/docs/aria_viewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/aria_viewer.png -------------------------------------------------------------------------------- /website/static/img/docs/aria_viewer_multiples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/docs/aria_viewer_multiples.png -------------------------------------------------------------------------------- /website/static/img/glasses-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/img/oss_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/oss_logo.png -------------------------------------------------------------------------------- /website/static/img/pilot_dataset/YCB_objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/img/pilot_dataset/YCB_objects.png -------------------------------------------------------------------------------- /website/static/img/python-brands.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/video/2wearers_location_inSync.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/2wearers_location_inSync.m4v -------------------------------------------------------------------------------- /website/static/video/2wearers_synched.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/2wearers_synched.m4v -------------------------------------------------------------------------------- /website/static/video/aria_multi_viewer.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/aria_multi_viewer.m4v -------------------------------------------------------------------------------- /website/static/video/aria_viewer.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/aria_viewer.m4v -------------------------------------------------------------------------------- /website/static/video/desk_12-demo.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/desk_12-demo.m4v -------------------------------------------------------------------------------- /website/static/video/desk_activity.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/desk_activity.m4v -------------------------------------------------------------------------------- /website/static/video/et_visualization.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/et_visualization.m4v -------------------------------------------------------------------------------- /website/static/video/location_all_activities.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/location_all_activities.m4v -------------------------------------------------------------------------------- /website/static/video/map_merge.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/Aria_data_tools/f154dba4a3cd1672517a1a9eb4555f3dd4d20102/website/static/video/map_merge.m4v --------------------------------------------------------------------------------