|
Systematic and Automated Development with Reuse |
|
|
By using our tool, we have developed a set of component-based systems to control a LEGO Mindstorms NTX educational robot. The first system is one in which the sensed information from an Ultrasonic Sensor is utilised to drive the robot around searching to avoid obstacles. As depicted below, its architecture involves: (i) one Bluetooth , two Wheels and one Ultrasonic Sensor components and (ii) three Sequencer, one Control Loop and one Chain of Responsibility connectors. |
|
|
|
|
|
This second system is an extension of the former where a Sound Sensor component is added in order to stop the robot when a sound is detected. As depicted below, its architecture involves: (i) one Bluetooth, two Wheels, Ultrasonic Sensor and one Sound Sensor components and (ii) five Sequencer, one Control Loop, one Chain of Responsibility, one Condition Based Loop and one Delay connectors. |
|
![]() |
|
|
In this architecture, the execution of the system starts with the connector at the highest level: the Sequencer. First, this connector executes a service in the Bluetooth component to activate the Bluetooth transceiver. Later on, the Sequencer connector calls the Control Loop connector that will drive the behaviour of the robotics system. First, the Control Loop calls the Sequencer which, by executing the services getDistance and getDecibels, retrieves the data from the connected sensors, i.e. the UtrasonicSensor and the SoundSensor sensors. Once these executions are completed, the Control Loop connector calls the Chain of Responsibility connector. Based on the values received, this connector determines the actions to perform on the wheels of the robot. Three actions are possible: (i) if the distance value is greater than 35 centimeters then the robot wheels are moved forward –this is achieved via one of the Sequencers connector connected by the Chain of Responsibility ; (ii) if the distance value is lower than 35 centimeters then the robot wheels are rotated and moved forward again –note how this behaviour is achieved by using the other Sequencer connector connected by the Chain of Responsibility (iii) if the decibels value is grater then 60 then the wheels are stopped until this value decreases –this behaviour is archived by using the Condition Controlled Loop, Delay and Sequencer connectors. |
|