Controlling Lego Mindstorms® robots by several UML diagrams demonstrates the real power of UML and perfectly shows how model-driven engineering processes can be applied for hardware-centric solutions. It’s a showcase that demonstrates how you can unfold the full power of UML supported by AMUSE – a UML execution environment for the Enterprise Architect from Sparx Systems.

A video can be found here: UMl Sumo with AMUSE

Objective: Let the robots run inside a predefined arena by avoiding crossing its borders and try to move each other out of this arena.

Solution: For controlling the robots, UML State Machines and UML Activity Diagrams have been created. Using AMUSE, the behaviors defined by diagrams can be executed. These control the motors and sensors of the robot. The measured values of the different sensors (e.g., light sensor) are computed by these UML behaviors and trigger the appropriate actions of the robot. For remote controlling the Lego Mindstorms® NXT via Bluetooth, a .Net library called MindSqualls (http://mindsqualls.net/) is used. For getting the MindSqualls library into a UML environment, it was reverse engineered with Enterprise Architect.