Experience Report: Constraint-Based Modeling of Autonomous Vehicle Trajectories
Autonomous vehicles and other robotics systems are frequently implemented using a general-purpose programming language such as C++, and prototyped using domain-specific tool such as MATLAB/Simulink, and LabVIEW. Such an approach is not efficient when programming primitive motions of autonomous vehicles when considering important safety constraints, and when promoting the broad access to robotic systems through involvement of students and aspiring students who do not know conventional low-level programming langauges. Aside from general-purpose programming languages, there are languages that are specifically designed to model autonomous vehicles, such as SHIFT, but these languages are typically for simulation purposes only. This experience report discusses the creation of a domain-specific language that allows for faster programming of autonomous vehicles while ensuring valid constraints will be met. This language generates code for multiple controllers that will operate alternatively to allow for fast and effective programming of vehicle trajectories using primitive motions. In addition to improving coding efficiency and reducing the number of programming errors, the language adds a level of abstraction so that autonomous vehicle behaviors may be generated by people with little knowledge of low-level details of the car’s operation. Furthermore, this language ensures safe operation of the vehicle by enforcing a set of user-definable constraints on the output path. A main set of constraints that are applied to every generated path have been specifically chosen to enforce safe switching between controllers and prevent the planning of unsafe actions. A novel application of the language is its ability to permit users to add specific constraints for a particular path; these constraints are checked for validity after the main constraint check is performed.