Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMU data example #9102

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

IMU data example #9102

wants to merge 10 commits into from

Conversation

oxkitsune
Copy link
Member

@oxkitsune oxkitsune commented Feb 20, 2025

Related

Closes #9023

What

Adds an example showcasing how to log multi-dimensional signals using send_columns

imu.mp4

@oxkitsune oxkitsune added examples Issues relating to the Rerun examples include in changelog labels Feb 20, 2025
Copy link

github-actions bot commented Feb 20, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
dbc99d9 https://rerun.io/viewer/pr/9102 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link

github-actions bot commented Feb 20, 2025

Latest documentation preview deployed successfully.

Result Commit Link
dbc99d9 https://landing-f21vgimyc-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

@oxkitsune oxkitsune marked this pull request as ready for review February 21, 2025 09:45
Comment on lines +81 to +95
imu_data = pd.read_csv(
cwd / DATASET_NAME / "dso/imu.txt",
sep=" ",
header=0,
names=["timestamp", "gyro.x", "gyro.y", "gyro.z", "accel.x", "accel.y", "accel.z"],
comment="#",
)

times = rr.TimeNanosColumn("timestamp", imu_data["timestamp"])

gyro = imu_data[["gyro.x", "gyro.y", "gyro.z"]]
rr.send_columns("/gyroscope", indexes=[times], columns=rr.Scalar.columns(scalar=gyro))

accel = imu_data[["accel.x", "accel.y", "accel.z"]]
rr.send_columns("/accelerometer", indexes=[times], columns=rr.Scalar.columns(scalar=accel))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be nice to bring this snippet out into the README to highlight for users that are browsing on the website

@Wumpf Wumpf self-requested a review February 21, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issues relating to the Rerun examples include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example for IMU data sending
2 participants