SCJ and EV3 Robots Leadership Election Project Overview

Slide Note
Embed
Share

Explore the implementation of a Leadership Election Algorithm for SCJ and EV3 Robots. Learn about the safety critical Java programming model, the EV3 Mindstorms Lego Robot, and the distributed systems algorithm for electing a stable leader. The project involves layers for robot control, network facilities, and protocol implementation, with a focus on different software architecture solutions. Dive into the code explanations, connector, listener, and elector components, and witness a demonstration of the sequential architecture with three robots.


Uploaded on Sep 09, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. SCJ and EV3 Robots Leadership Election

  2. Background Safety Critical Java A safety critical programming model in Java EV3 mindstorms Lego Robot A robot toy that has a Linux running on it. Leadership Election Algorithm An algorithm that applies to distributed systems and aims to elect a stable leader.

  3. To implement the algorithm, we need A Robot Layer (provided by icecap) Contains a set of interfaces to control the robot i.e. the motors. A Network Layer (we implemented it) One or more sets (e.g. TCP and UDP) of interfaces to provide the network facilities. A protocol layer Contains the implementation of the leader election protocol.

  4. Implementation We carried out: 2 soft architecture solutions Sequential Concurrent 2 network protocols TCP (connection oriented, reliable network) UDP (connectionless) 3 programming models Single mission Multi missions Nested missions

  5. Different Software Architecture Solutions Sequential Architecture Application consists of a single periodic event handler to implement the protocol But needs multiple managed threads to handle the network connection Single Mission TCP Concurrent Architecture Each thread is responsible for a specific task (e.g. send/receive state, execute the election protocol). Multi missions and nested missions. TCP and UDP

  6. Sequential Architecture Code Explanation

  7. Connector

  8. Listener

  9. Elector The Sequential election procedure

  10. Demonstration 1 The Sequential Architecture with 3 robots Robot Behavior: Step forward if a robot becomes a leader Step backward if a robot becomes a follower or be turned off Do nothing if its state is not changed Shut down (a simulation of turn off) the program if its Back button is pressed

  11. However, the robots looks like zombies in Such movements )-:

  12. EV3 Command and Follow Feature A EV3 command protocol is introduced A command decoder is implemented. Each robot has a EV3 command decoder The leader will send commands to followers Followers decode the commands and then execute them. Two Architectures are implemented with this feature The concurrent single mission architecture The sequential architecture

  13. Demonstration 2 The Concurrent Architecture with command and follow feature Mission: Imitate the leader Each robot may have a heart of leader . Robot Behavior: The leader has a set of movements. After each movement, all the followers will move exactly as the leader did.

  14. Thank you!

Related


More Related Content