Loading…
CppCon 2021 has ended
Back To Schedule
Friday, October 29 • 9:00am - 10:00am
Units Libraries and Autonomous Vehicles: Lessons from the Trenches

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Units libraries have an enticing value proposition: they can catch mistakes in physical units at compile time, with zero runtime cost.  The most famous such error is the unit mismatch that brought down the Mars Climate Orbiter in 1999.  This multi-hundred-million dollar disaster has since become the poster child for units libraries everywhere, leaving the impression that their primary function is to produce compiler errors.  But does prolonged, real-world experience bear that out?

This talk distills lessons learned from three years of units library usage in the Autonomous Vehicle industry, across two companies (Uber ATG and Aurora).  While these libraries do work as advertised to prevent unit mismatches, we find that this is not their primary value.  Such errors are extremely rare in practice---but only because developers do significant manual work to both create and maintain unit correctness.  The main value of the units library is to robustly automate this work, letting developers redeploy this mental energy more profitably elsewhere.

The degree to which users actually obtain this benefit is primarily driven by the quality of the library's interfaces.  Broadly, this means striking a balance where we minimize friction as much as possible, while anticipating and preventing pitfalls and traps.  It also means adhering to a principle we call "unit safety", which reduces cognitive load by keeping our reasoning about units as local as possible.  Finally, it means playing nicely with other libraries: using the Eigen library as an example, we'll discuss the tradeoffs involved in two separate integration strategies.  By the end of the talk, users should have a realistic picture of the suite of benefits offered by units libraries, and be well equipped to use one effectively.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Chip Hogg

Chip Hogg

Staff Software Engineer, Aurora Innovation
Chip Hogg is a Staff Software Engineer on the Motion Planning Team at Aurora Innovation, the self-driving vehicle company that is developing the Aurora Driver. After obtaining his PhD in Physics from Carnegie Mellon in 2010, he was a postdoctoral researcher and then staff scientist... Read More →


Friday October 29, 2021 9:00am - 10:00am MDT