QuickLinks:
This is the data used in Figure 1. This file contains a physical unit inconsistency on line 576.
To run this code, see example #1 from the QuickStart page.
To run phys on this file, navigate to the repo root directory and enter:
docker run -v "$(pwd)"/data:/data phys /data/summit_xl_sim/summit_xl_robot_control/src/summit_xl_robot_control.cpp
These files are used to evaluate how well phys can infer units for variables. This command shows each variable name that can have units along with a list of physical unit types and a likelihood per type.
To run phys on the first file from this list:
docker run -v "$(pwd)"/data:/data phys /data/aladdin_working/components/perception/Perception.cpp --print_variable_types
For example, one line of the expected output is:
angle_b: [({'radian': 1.0}, 0.9193548387096537), ({'second': -2.0, 'meter': -1.0, 'kilogram': 1.0}, 0.5833333333333333), ({'quaternion': 1.0}, 0.5833333333333333), ({'degree_celsius': 1.0}, 0.5833333333333333), ({'meter': 1.0}, 0.5833333333333333), ({'second': 1.0}, 0.5833333333333333), ({'second': -1.0}, 0.5833333333333333), ({'second': -2.0, 'meter': 1.0, 'kilogram': 1.0}, 0.5833333333333333), ({'second': -2.0, 'meter': 2.0, 'kilogram': 1.0}, 0.5833333333333333), ({'second': -1.0, 'meter': 1.0}, 0.5833333333333333), ({'degree_360': 1.0}, 0.5833333333333333), ({'second': 1.0, 'meter': 1.0}, 0.5)]
This means for variable angle_b, the physical unit type radians is 91.9% likely.
These files are used during development to test phys.
To run phys on the first file from this list:
docker run -v "$(pwd)"/data:/data phys /data/bayesian_compact_ware/ard/src/ard_node.cpp
For example, one line of the expected output is:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 323. Units: [{'quaternion': 1.0}, {'meter': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 324. Units: [{'quaternion': 1.0}, {'meter': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 325. Units: [{'quaternion': 1.0}, {'meter': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 334. Units: [{'meter': 1.0}, {'quaternion': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 335. Units: [{'meter': 1.0}, {'quaternion': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 336. Units: [{'meter': 1.0}, {'quaternion': 1.0}] file:/data/bayesian_compact_ware/ard/src/ard_node.cpp, strong:6,
This means there are 6 physical unit inconsistency, all of the type 'MULTIPLE UNITS'. The first inconsistency is at line 323 where a variable is assigned both meter and quaternion.
These files were randomly selected from 500+ files with phys inconsistencies and are used to evaluate how well phys detects physical unit (PU) inconsistencies.
To run phys on the first file from this list:
docker run -v "$(pwd)"/data:/data phys /data/kaqi_driver/src/base_driver.cpp
For example, one line of the expected output is:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 883. Units: [{'meter': 1.0}, {'second': -1.0, 'meter': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 884. Units: [{'meter': 1.0}, {'second': -1.0, 'meter': 1.0}] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MULTIPLE UNITS FOR VARIABLE Assignment of multiple units on line 885. Units: [{'meter': 1.0}, {'second': -1.0}] file:/data/kaqi_driver/src/base_driver.cpp, strong:3,