290 likes | 416 Views
Team 12 - SUPER TANK. Software Narrative: Brawns AND Brains. Overview. Project Refresher Software Architecture Overview The High Level – LRVC Protocol The Low Level – Main Embedded System Summary. Project Refresher. Long Range Vehicle (Tank) Control over wireless network
E N D
Team 12 - SUPER TANK Software Narrative: Brawns AND Brains
Overview • Project Refresher • Software Architecture Overview • The High Level – LRVC Protocol • The Low Level– Main Embedded System • Summary
Project Refresher • Long Range Vehicle (Tank) Control over wireless network • Operate from anywhere in the world (Website/Android App) • Collaboration with HKUST • Shared Server • Customizable for new vehicle features
PSSCs • An ability to send/receive/decode commands from a controller wirelessly • An ability to control direction/firing capability of a vehicle • An ability to autonomously avoid obstacles encountered by the tank • An ability to provide sensor feedback to a wireless controller • An ability to monitor a battery and prevent unexpected signal loss by alerting operator
Software Architecture LRV Lion Battery Main Embedded System (ASM) Bat Man. PCB LRV Micro Virtual Controller (Android Tablet/Phone) UART UART Receiver (ASM) UART Receiver (ASM) Android Virtual Controller App (Android) RTSP UART VLC Server (Script) Serial Server (Python) HKUST Server LRVC Server (Java) TCP/IP Stack Pandaboard TCP MPEG4v TCP USB Cam Virtual Controller Selection Website (Php) Web Browsing
The High Level – LRVC Protocol Overview The LRVC Protocol provides a framework for communications between a Virtual Controller and an LRV. The LRVC Protocol has been designed to be flexible enough to accommodate a diverse set of functionalities in an LRV yet structured enough to yield a fair amount of code re-use between LRV implementations.
The High Level – LRVC Protocol Properties • Android Compatible • Extendable • Robust UI Support • Video Streaming • Multiple Users • Secure
The High Level – LRVC Protocol LRV Lion Battery Main Embedded System (ASM) Bat Man. PCB LRV Micro Virtual Controller (Android Tablet/Phone) UART Receiver (ASM) UART Receiver (ASM) Android Virtual Controller App (Android) VLC Server (Script) Serial Server (Python) HKUST Server LRVC Server (Java) TCP/IP Stack Pandaboard USB Cam Virtual Controller Selection Website (Php) THE LRVC Protocol
LRVC Protocol - The Phases • Connection Phase - This phase is responsible for the security and resource allocation of the LRVC Server along with providing services for the Virtual Controller to provide a User with a selection screen of LRV options. • Configuration Phase - This phase is responsible for the configuration of a Virtual Controller. It populates the Virtual Controller with a standard interface of Standard Objects and a unique set of custom objects called Non-Standard Objects. These objects all have a known interface. • Control Phase - This phase is responsible for synchronously distributing opcodes (aka commands) to an LRV at the rate of 10Hz. Additionally, it wraps and transports the LRV’s feedback as Status Messages back to the Virtual Controller at a rate of 10Hz. Lastly, it facilitates a video feed from the LRV back to the Virtual Controller at a target rate of 20Hz.
LRVC Protocol - Configuration LRV Lion Battery Main Embedded System (ASM) Bat Man. PCB LRV Micro Virtual Controller (Android Tablet/Phone) UART Receiver (ASM) UART Receiver (ASM) Android Virtual Controller App (Android) VLC Server (Script) Serial Server (Python) HKUST Server LRVC Server (Java) TCP/IP Stack Pandaboard USB Cam Virtual Controller Selection Website (Php) Web Browsing
LRVC Protocol - Configuration • Web Repository of Apps for Download • Standard App, With Extension Scheme
LRVC Protocol – Web Repository Web Browse To This Webpage LRV #1 LRV #1 Description Download LRV #2 LRV #2 Description Download
LRVC Protocol – Extension Scheme Custom Objects Standard Objects Obj.class Obj1.class Obj.class Obj1.class Obj1.class Obj.class Obj.class FIRE
Controller Objects CustomLRVCObject Interface getOpcode() giveResponse() Obj.class 0xA3 “Speed 8mph” public booleanwasActivated() Used internally to aggregate activated objects
Controller Objects 0x06 0x0A 0x10 0x0C 0x01 Command Msg 0x07 0x11 FIRE NOTE: Opcodes are made up
Controller Objects Video Stream 0x2F Status Msg (3ft, 2ft) “No Events” FIRE NOTE: Responses are made up
The Big Picture The basic idea is that the protocol allows extension and custom implementation through creating custom GUI objects (Java objects that contain a known “CustomLRVCObjects” interface), serializing them through the standard Java library, and interfacing them through the controllers GUI. Thus, the custom implementation is achieved not by modifying the LRVC Protocol but by adjusting the bindings of these GUI components.
LRVC Protocol – Connection and Command • Comprehensive 22 Page Document. • 2 Collaborating Teams • Sequence Diagrams • Message Schemas
The Low Level – Embedded System LRV Lion Battery Main Embedded System (ASM) Bat Man. PCB LRV Micro Virtual Controller (Android Tablet/Phone) UART Receiver (ASM) UART Receiver (ASM) Android Virtual Controller App (Android) VLC Server (Script) Serial Server (Python) HKUST Server LRVC Server (Java) TCP/IP Stack Pandaboard USB Cam Virtual Controller Selection Website (Php) Internal Communications
Embedded System Constraints • 96K SRAM • Currently <1K Vars • ~ 1K Instructions • Not using Flash • Critical Spots • 128 B Trig Tables • 256-288B Send and Receive Buffers
Embedded System Send Status Messages Buffer OpCodesAsync. Receive Buffer (256) Command Flags Status Messages 8 Commands (8 Bytes) 8 Messages 1. Past Movements And Obstacles Bat. Algo Variables Command Process 3. Obstacle Detection Alg. Obstacle Avoid Alg. Battery Level Alg. 10 Hz Timer Interrupt Code 36 Byte Max Msg Size 2. Construct Response Functions Execution Functions Obstacle Avoid. Process 50 Hz Timer Interrupt Code Trig Tables Battery Management ObstDet IRs (10)
Power Supply Left Drive Motor JTAG (ULinkMe) External Oscillation Bat Management Comm (UART) Reset Fire Ledge Det. Right Drive Motor Power Supply Turret Drive Motor Panda Comm (UART) Power Supply Obstacle Det. Power Supply