< Back to Blog

Announcing RealSense-Rust

By
|
April 13, 2021
Rust

Table of Contents

Tangram Vision is committed to contributing to the Rust ecosystem for perception, sensors, and robotics. To that end, we are presenting...

Realsense-Rust: Interface with Intel RealSense devices from the comfort and safety of Rust

We recognize that there aren't many existing Rust resources for using off-the-shelf sensors in an easy and reliable way. This is an issue; reliable and easy perception is the cornerstone of our business! So Tangram is fixing that, one sensor at a time.

RealSense was the obvious first choice for us. The sensor line is near-ubiquitous, but many we've talked to have experienced software issues. Reasons for this are varied, from difficulties with memory or hardware management in C or C++, to just grasping the sheer variety of sensors and options that the library supports. Moreover, the ubiquity of the platform contributes in its own right: there are a lot of users in general, so any fraction of users with problems seems like a large number of users.  Regardless, we've taken a shot at making the RealSense SDK memory-safe and ready to roll in any Rust context:

  • Provide concrete types rather than "extensible" pointers
  • Preferring the use of native Rust containers or types over librealsense2 containers written in C
  • Rust-like error handling throughout the API
  • Make lifetimes obvious for all data through the system
  • Make invalid states impossible (to the best of our ability)

...among other small Rust improvements. Check out the crate's architecture doc to learn more about the design philosophy we employed to put this together.

We would be remiss if we didn't mention that this crate did exist before we inherited it. Thanks to Jerry Lin and other contributors, we started with a strong base of work from the community. Standing with that community, we will maintain this crate to the best of our abilities as an open-source repository.

We'll be introducing more sensor crates in the future, both to support the community and our own platform's SDK. Let us know what you think on our GitLab page; testing welcome!

And if you feel like perception piping will be a pain always and forever... we suggest you sign up for early access to the Tangram Vision SDK! Tangram Vision is developing DevOps for Perception: focus on what makes your product stand out, and leave the sensor integration and ongoing maintenance to us.

Share On:

You May Also Like:

DevOps For Perception

The Tangram Vision SDK is free for the first five instances and unlimited users.