Skip to content

Commit

Permalink
Merge pull request #8 from rerun-io/emilk/rerun-0.14
Browse files Browse the repository at this point in the history
Update to Rerun 0.14
  • Loading branch information
emilk authored Feb 29, 2024
2 parents 17f3d0b + 44e8580 commit 0df6700
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif()

# Rerun:
include(FetchContent)
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.12.0/rerun_cpp_sdk.zip)
FetchContent_Declare(rerun_sdk URL https://github.com/rerun-io/rerun/releases/download/0.14.1/rerun_cpp_sdk.zip)
FetchContent_MakeAvailable(rerun_sdk)

# VRS:
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You can download a sample `.vrs` file from <https://www.projectaria.com/datasets
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/cpp-example-vrs/c13ed42c13ecb65b0ef689533c0525ab97471e21/1200w.png">
</picture>


## Compile and run using `pixi`
The easiest way to get started is to install [pixi](https://prefix.dev/docs/pixi/overview).

Expand All @@ -28,8 +29,8 @@ If you choose not to use pixi, you will need to install a few things yourself be
The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP.

If you need to install the viewer, follow the [installation guide](https://www.rerun.io/docs/getting-started/installing-viewer). Two of the more common ways to install the Rerun Viewer are:
* Via cargo: `cargo install rerun-cli@0.12.0`
* Via pip: `pip install rerun-sdk==0.12.0`
* Via cargo: `cargo install rerun-cli@0.14.1`
* Via pip: `pip install rerun-sdk==0.14.1`

After you have installed it, you should be able to type `rerun` in your terminal to start the viewer.

Expand All @@ -52,6 +53,6 @@ We haven't tried getting this example working on Windows yet, because VRS has no


## Known limitations with Rerun
* 0.10.0 of the Rerun C++ SDK accidentally shipped with parts of it compiled in Debug build, making it unnecessarily slow. This will be fixed in [Rerun 0.10.1](https://github.com/rerun-io/rerun/milestone/11).
* Time-scalar plots are currently very slow in Rerun, something we're [actively working on](https://github.com/rerun-io/rerun/issues/374).
* [Points cloud sizes are limited](https://github.com/rerun-io/rerun/issues/3076), and [big point clouds are slow](https://github.com/rerun-io/rerun/issues/1136).
This example makes heavy use of out-of-order logging.
This leads to slow ingestion speeds in Rerun, especially for plots.
Follow the progress on this [here](https://github.com/rerun-io/rerun/issues/4810).
18 changes: 9 additions & 9 deletions src/imu_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,21 @@ namespace rerun_vrs {

void IMUPlayer::log_accelerometer(const std::array<float, 3>& accelMSec2) {
_rec->log(_entity_path + "/accelerometer", rerun::Arrows3D::from_vectors({accelMSec2}));
_rec->log(_entity_path + "/accelerometer/x", rerun::TimeSeriesScalar(accelMSec2[0]));
_rec->log(_entity_path + "/accelerometer/y", rerun::TimeSeriesScalar(accelMSec2[1]));
_rec->log(_entity_path + "/accelerometer/z", rerun::TimeSeriesScalar(accelMSec2[2]));
_rec->log(_entity_path + "/accelerometer/x", rerun::Scalar(accelMSec2[0]));
_rec->log(_entity_path + "/accelerometer/y", rerun::Scalar(accelMSec2[1]));
_rec->log(_entity_path + "/accelerometer/z", rerun::Scalar(accelMSec2[2]));
}

void IMUPlayer::log_gyroscope(const std::array<float, 3>& gyroRadSec) {
_rec->log(_entity_path + "/gyroscope/x", rerun::TimeSeriesScalar(gyroRadSec[0]));
_rec->log(_entity_path + "/gyroscope/y", rerun::TimeSeriesScalar(gyroRadSec[1]));
_rec->log(_entity_path + "/gyroscope/z", rerun::TimeSeriesScalar(gyroRadSec[2]));
_rec->log(_entity_path + "/gyroscope/x", rerun::Scalar(gyroRadSec[0]));
_rec->log(_entity_path + "/gyroscope/y", rerun::Scalar(gyroRadSec[1]));
_rec->log(_entity_path + "/gyroscope/z", rerun::Scalar(gyroRadSec[2]));
}

void IMUPlayer::log_magnetometer(const std::array<float, 3>& magTesla) {
_rec->log(_entity_path + "/magnetometer/x", rerun::TimeSeriesScalar(magTesla[0]));
_rec->log(_entity_path + "/magnetometer/y", rerun::TimeSeriesScalar(magTesla[1]));
_rec->log(_entity_path + "/magnetometer/z", rerun::TimeSeriesScalar(magTesla[2]));
_rec->log(_entity_path + "/magnetometer/x", rerun::Scalar(magTesla[0]));
_rec->log(_entity_path + "/magnetometer/y", rerun::Scalar(magTesla[1]));
_rec->log(_entity_path + "/magnetometer/z", rerun::Scalar(magTesla[2]));
}

bool might_contain_imu_data(const vrs::StreamId& id) {
Expand Down

0 comments on commit 0df6700

Please sign in to comment.