This webinar, presented by AdaCore Product Manager Stephen, introduces a project that uses the Rust programming language to develop a dynamic pathfinding and rerouting system for a simulated Mars rover. The presentation begins with an overview of AdaCore's history in high-integrity software and the key safety and performance benefits of the Rust language, which have led to its growing adoption in safety-critical domains.
The core of the talk focuses on the selection and implementation of the D* Lite pathfinding algorithm, chosen for its ability to efficiently replan routes "on the fly" as new obstacles are detected. The algorithm's functionality is demonstrated through a web-based simulator built entirely in Rust using WebAssembly. The speaker provides a technical deep-dive into the Rust code, highlighting how features like traits, the borrow checker, zero-cost abstractions, and type safety were leveraged to create a robust, efficient, and modular system. The implementation notably avoids any unsafe code, a critical consideration for future certification. Finally, the webinar outlines future plans to deploy the system on a physical robot and discusses how AdaCore's GNAT Pro for Rust toolchain provides the long-term support, qualified tools, and certification materials necessary to use Rust in mission-critical industries.
Developing a Dynamic Rerouting System in Rust: A Webinar by AdaCore
00:03:32 - AdaCore's Mission: AdaCore is a high-integrity toolchain provider with a long history in safety-critical software, originating with the Ada language and now expanding to support C++, Spark, and Rust for industries like avionics, defense, and automotive.
00:05:35 - The Case for Rust: The presenter highlights Rust's key advantages, including guaranteed memory and type safety, its status as a highly "loved" language by developers, and its increasing recommendation by government agencies like the NSA for secure software development.
00:10:48 - The Rover Rerouting Project: The webinar's central project involves building a rover pathfinding algorithm in Rust that can chart an optimal path and dynamically adjust it on the fly as new obstacles are discovered.
00:16:19 - Choosing the D Lite Algorithm:* The D* Lite algorithm was selected as the ideal "middle ground" solution. It is a dynamic algorithm that can re-compute paths efficiently without the high computational cost of more complex methods like Field D*, which is used by NASA's Mars rovers.
00:17:48 - Live Demonstration with WebAssembly: A simulator, written entirely in Rust and compiled to WebAssembly for the web, demonstrates the rover in action. It successfully finds an initial path and then intelligently reroutes itself in real-time as the user adds new obstacles to its path.
00:25:34 - Leveraging Rust's Trait System: The code uses Rust's trait system to create a generic Pathfinder contract. This provides a zero-cost abstraction, allowing different algorithms (A*, D* Lite, etc.) to be swapped in and out without changing the main orchestration code.
00:28:26 - Ensuring Safety with the Borrow Checker: The borrow checker is a key feature used to guarantee that data structures like maps and heaps cannot be accidentally corrupted by multiple parts of the program at the same time, a common source of bugs in other languages.
00:29:35 - Optimizing Performance with Lazy Updates: The implementation uses a "lazy removal" technique. Instead of expensively removing nodes from the heap, it simply pushes updated states, allowing the algorithm to reuse nearly all of its previous work and save significant CPU time when replanning.
00:32:00 - Building a 100% Safe Implementation: The entire pathfinding algorithm is written in 100% safe Rust, without using any unsafe blocks. This is a major advantage for creating certifiable, safety-critical applications, as it eliminates entire classes of potential bugs related to memory management.
00:33:00 - Future Plans for the Project: The presenter plans to deploy the algorithm on a physical rover, integrate an AI camera using Rust's TensorFlow Lite bindings for real-world obstacle detection, and demonstrate the working robot at an upcoming Denver Tech Day event.
00:34:58 - GNAT Pro for Rust: The project serves as a showcase for AdaCore's commercial offering, GNAT Pro for Rust, which provides long-term support, professional engineering assistance, qualified toolchains, and upcoming features like MCDC code coverage to enable Rust for certified, mission-critical systems.
Error: value error Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. Please check the candidate.safety_ratings to determine if the response was blocked.