PHYSFRAME: type checking physical frames of reference for robotic systems

A robotic system continuously measures its own motions and the external world during operation. Such measurements are with respect to some frame of reference, i.e., a coordinate system. A nontrivial robotic system has a large number of different frames and data have to be translated back-and-forth from a frame to another. The onus is on the developers to get such translation right. However, this is very challenging and error-prone, evidenced by the large number of questions and issues related to frame uses on developers' forum. Since any state variable can be associated with some frame, reference frames can be naturally modeled as variable types. We hence develop a novel type system that can automatically infer variables' frame types and in turn detect any type inconsistencies and violations of frame conventions. The evaluation on a set of 180 publicly available ROS projects shows that our system can detect 190 inconsistencies with 154 true positives. We reported 52 to developers and received 18 responses so far, with 15 fixed/acknowledged. Our technique also finds 45 violations of common practices.

[1]  Andrew Kennedy,et al.  Dimension Types , 1994, ESOP.

[2]  Andrew Kennedy,et al.  Types for Units-of-Measure: Theory and Practice , 2009, CEFP.

[3]  Donald Sannella,et al.  Programming Languages and Systems — ESOP '94 , 1994, Lecture Notes in Computer Science.

[4]  Hans Utz,et al.  Miro - middleware for mobile robot applications , 2002, IEEE Trans. Robotics Autom..

[5]  Sebastian G. Elbaum,et al.  Lightweight detection of physical unit inconsistencies without program annotations , 2017, ISSTA.

[6]  Patrizia Scandurra,et al.  Component-based robotic engineering (Part I) [Tutorial] , 2009, IEEE Robotics & Automation Magazine.

[7]  Peter Sincak,et al.  Comparison Study of Robotic Middleware for Robotic Applications , 2015 .

[8]  Tully Foote,et al.  tf: The transform library , 2013, 2013 IEEE Conference on Technologies for Practical Robot Applications (TePRA).

[9]  Juan D. Tardós,et al.  ORB-SLAM2: An Open-Source SLAM System for Monocular, Stereo, and RGB-D Cameras , 2016, IEEE Transactions on Robotics.

[10]  Dawson R. Engler,et al.  Bugs as deviant behavior: a general approach to inferring errors in systems code , 2001, SOSP.

[11]  Kostadin Damevski,et al.  Expressing measurement units in interfaces for scientific component software , 2009, CBHPC '09.

[12]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[13]  Sebastian G. Elbaum,et al.  Phriky-units: a lightweight, annotation-free physical unit inconsistency detection tool , 2017, ISSTA.

[14]  Sebastian Elbaum,et al.  PHYSFRAME: type checking physical frames of reference for robotic systems , 2021, ESEC/SIGSOFT FSE.

[15]  Nurlida Basir,et al.  Deriving Safety Cases for Hierarchical Structure in Model-Based Development , 2010, SAFECOMP.

[16]  Richard T. Vaughan,et al.  The Player/Stage Project: Tools for Multi-Robot and Distributed Sensor Systems , 2003 .

[17]  Michael R. Lowry,et al.  Certifying domain-specific policies , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[18]  Michael R. Lowry,et al.  META-AMPHION: Synthesis of Efficient Domain-Specific Program Synthesis Systems , 2004, Automated Software Engineering.

[19]  Xiangyu Zhang,et al.  Phys: probabilistic physical unit assignment and inconsistency detection , 2018, ESEC/SIGSOFT FSE.

[20]  Alexei Makarenko,et al.  Towards component-based robotics , 2005, 2005 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[21]  Morgan Quigley,et al.  ROS: an open-source Robot Operating System , 2009, ICRA 2009.

[22]  Herman Bruyninckx,et al.  Open robot control software: the OROCOS project , 2001, Proceedings 2001 ICRA. IEEE International Conference on Robotics and Automation (Cat. No.01CH37164).

[23]  Michael D. Ernst,et al.  Ayudante: identifying undesired variable interactions , 2015, WODA@SPLASH.

[24]  Luca Cardelli Type systems , 1996, CSUR.

[25]  Mikael Rittri,et al.  Dimension inference under polymorphic recursion , 1995, FPCA '95.