Introduction
In robotics and cyber-physical systems, simulation environments and world models often rely on heterogeneous APIs and data structures. Extracting high-level information—such as identifying specific objects or calculating optimal paths—typically requires verbose imperative code in languages like Python or C++. This manual state management and nested looping create a significant barrier to interoperability. This paper presents an extension of SelectScript, a declarative, SQL-like Domain-Specific Language (DSL), designed to treat robotic reasoning and search problems as database queries.
Methodology: Hierarchical Querying
SelectScript simplifies data retrieval by abstracting simulation states into queryable tables. To address complex reasoning, the authors introduced hierarchical queries inspired by Oracle’s SQL dialect.
Key technical features include:
- Recursive Syntax: The implementation of
START WITH(initial conditions),CONNECT BY(state transitions), andSTOP WITH(termination criteria for continuous spaces). - Search Strategy Abstraction: Users can decouple logic from execution by specifying search algorithms via keywords. For instance, adding
MEMORIZEenables bidirectional search, whileNO CYCLEorUNIQUEmanages graph traversal efficiency. - Visual Abstraction: The language supports output transformations such as
AS OccupancyGrid, allowing raw simulation data to be formatted directly for other planners or human-readable visualizations.
Experimental Environments
The language was evaluated across three distinct simulation paradigms to test its versatility in data exploration and logical reasoning.
- Open Dynamics Engine (ODE): A chaotic particle simulation used to demonstrate basic data exploration, such as generating mass distribution heat maps.
- Towers of Hanoi: A benchmark for recursive reasoning and the efficiency of different search strategies.
- OpenRAVE: A high-fidelity 3D industrial simulation featuring a mobile YouBot, serving as the primary testbed for complex path planning.
Results and Path Planning
The declarative approach yielded significant performance and productivity gains. In the Towers of Hanoi benchmark, transitioning from a standard nested query to a hierarchical CONNECT BY query with bidirectional search (MEMORIZE) reduced execution time from 10.09 seconds to 0.17 seconds.
In the OpenRAVE environment, a single SelectScript query successfully implemented a path planner. The system identified 1,000 valid paths while simultaneously managing collision detection and distance constraints. This demonstrates that viewing a search tree as a virtual table allows complex navigation tasks to be solved through simple row filtering.
Conclusion and Future Work
SelectScript effectively separates the what (the goal) from the how (the algorithm), reducing the cognitive load required to interface with complex robotic APIs. While the current Python-based interpreter faces performance bottlenecks in massive search spaces, future work aims to port the system to C and integrate it more deeply with the Robot Operating System (ROS). Additionally, the authors plan to explore probabilistic reasoning to handle uncertainty in real-world environments.
Summary updated