Unlisted Videos All Videos All Videos Submit Video



Units Libraries and Autonomous Vehicles: Lessons from the Trenches - Chip Hogg - CppCon 2021








Uploaded to YouTube by: CppCon
Date submitted to Unlisted Videos: 20 February 2024
Date uploaded/published to YouTube: 25 December 2021

Tags:




Description:

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
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.

---
Chip Hogg

Chip Hogg is a Senior Software Engineer with Aurora Innovation, on the Motion Planning Team. After obtaining his PhD in Physics from Carnegie Mellon in 2010, he was a postdoctoral researcher and then staff scientist at the National Institute of Standards and Technology (NIST), doing Bayesian data analysis. He joined Google in 2012 as a software engineer, leaving in 2016 to work on autonomous vehicles at Uber's Advanced Technologies Group, where he stayed until their acquisition by Aurora in 2021.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

Register Now For CppCon 2022: https://cppcon.org/registration/