API document and software Architecture of kit 2.8


#1

Hi guys. I have failed to find a guidance of kit 2.8 for beginners. So I read the code downloaded from github and find some useful APIs and drew a software architecture of Arduino and BBB (Beaglebone Black).


API.pdf (98.0 KB)

Please be noted that when you connect the OPENROV, your browser is client where javascript runs on it. BBB connected via adapter acts like a server who receive your socket. The Arduino based kit 2.8 controls devicees like LEDs, motors, servos directly. After BBB get the socket it will make command to Arduino directly, then Arduino get the command and make some reaction.

The client (your browser) would talk to BBB first by socket. You can made it by writing a script (Python, for instance) or just pressing the keyboard as suggested in Cockpit ( 192.168.254.1:8080). The browser would send some sockets to itself, so some sockets like “rovpilot.toggleLasers” you send to the BBB would not work. Only the socket send with format like “deps.rov.on()” work.

Then BBB would write some command as C language to kit 2.8 board, which can be read by Arduino.

If you want to add some new features for OPENROV, I think you should both modify the js codes (plugins) and Arduino codes.