60 likes | 189 Views
How to program robot hardware. Why care about?. Sascha Lange salange@uos.de. Different µ Controllers 8/16/12 bit architectures Address space Command sets Firmware / bootstrap-loaders Operating systems Proprietary programming languages Logo, c-control basic, …
E N D
How to program robot hardware Why care about? Sascha Lange salange@uos.de
Different µControllers 8/16/12 bit architectures Address space Command sets Firmware / bootstrap-loaders Operating systems Proprietary programming languages Logo, c-control basic, … Standardized programming languages Reduced/modified command sets Java, nqc Communication Programming serial/parallel ports, (Radio) LAN Protocols Packet layout Data encoding Checksums Collision detection Peer2Peer / Client-Server Interfacing Input / Output AD, DA, analog, digital, integrating, differentiating, IO-bus Common Problems one has to cope with
How to handle the “hardware problem” • Use standard techniques of abstraction • Don’t forget everything you’ve learned about good software design: • Modules / Layers / Communication • Defining and implementing interfaces • Use operating system independent techniques
Receives: s(i) Sends: action a Receives: sensor input Sends: motor control • Client has only to know • about a small part of the • server: • Used protocol • Language Client Server Client - Server Architecture • Brain is in the client (Russell and Norvig like agent) • Client depends only on language of server • Independent of hardware • Independent of used operating system / software • Independent of communication channel • Free choice of the programming language
Communication Control Layer Translation Layer Data Coding Layer Transportation Layer UDP Socket Implementation Protocol Layer Protocol Layer Transmission Layer Transmission Layer Serial Line: RxD, TxD: - TTL Pegel (0/5V) - convert for RS232 - radio transmit via BIM2 Use KEPHERA’s Mode 5 or 1 Communication via infrared light: - same protocol as REDRUM - send bytecodes directly - use SPIRIT OCX, - networking for LegOS under ongoing development Server changes with hardware Robot Side Client Side • Transmission layer: • Control / initialisation of a port • Line control (RX, TX, Select etc.) • Bi- / unidirectional Client
Transparency Sensory Server Action Server Client Simulation Server Monolithic RF Server