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

Make it easy to log custom arrow data in C++ #8880

Merged
merged 9 commits into from
Jan 31, 2025
Merged

Make it easy to log custom arrow data in C++ #8880

merged 9 commits into from
Jan 31, 2025

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jan 31, 2025

Related

What

Adds a few small utilities to ComponentBatch & ComponentColumn to make logging with raw arrow arrays more convenient.
Adds snippets that are on par with the other sdks demonstrating how "any value"-style logging can be done

Example for mixing points with fully custom arrow values:

    auto points = rerun::Points2D({{-1.0f, -1.0f}, {-1.0f, 1.0f}, {1.0f, -1.0f}, {1.0f, 1.0f}});

    std::shared_ptr<arrow::Array> arrow_array;
    arrow::DoubleBuilder confidences_builder;
    ARROW_RETURN_NOT_OK(confidences_builder.AppendValues({0.3, 0.4, 0.5, 0.6}));
    ARROW_RETURN_NOT_OK(confidences_builder.Finish(&arrow_array));
    auto confidences =
        rerun::ComponentBatch::from_arrow_array(std::move(arrow_array), "confidence");

    rec.log("extra_values", points, confidences);

  • pass main ci

Copy link

github-actions bot commented Jan 31, 2025

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

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

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

@teh-cmc
Copy link
Member

teh-cmc commented Jan 31, 2025

I'm taking a chance and triggering the full-check early...

Advienne que pourra

@teh-cmc
Copy link
Member

teh-cmc commented Jan 31, 2025

@rerun-bot full-check

@teh-cmc teh-cmc self-requested a review January 31, 2025 15:52
Copy link

Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

looks pretty based to me

Copy link
Member

Choose a reason for hiding this comment

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

@teh-cmc
Copy link
Member

teh-cmc commented Jan 31, 2025

You can add the failing links to the growing collection at the bottom of lychee.toml 🙃

* [404] [https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.cpp](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_values_send_columns.cpp) | Failed: Network error: Not Found
* [404] [https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.cpp](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/any_values.cpp) | Failed: Network error: Not Found
* [404] [https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/tutorials/extra_values.cpp) | Failed: Network error: Not Found
* [404] [https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.cpp](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/howto/any_batch_value_send_columns.cpp) | Failed: Network error: Not Found

@teh-cmc
Copy link
Member

teh-cmc commented Jan 31, 2025

Failing on windows!

@teh-cmc
Copy link
Member

teh-cmc commented Jan 31, 2025

@rerun-bot full-check

Copy link

@Wumpf
Copy link
Member Author

Wumpf commented Jan 31, 2025

thanks!

@Wumpf Wumpf merged commit 5949a22 into main Jan 31, 2025
68 of 70 checks passed
@Wumpf Wumpf deleted the andreas/cpp/any branch January 31, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement AnyValues for C++
2 participants