The attached image shows the RVR with the attached Propeller Flip Module. Wireless communication is established through a XBee module. A Ping/Servo combination is connected to the propeller MCU. IMHO, robot control systems programmed in python, C, etc., are complex, difficult to debug, and almost unreadable. FORTH is recognized by many to be an optimal system for programming control systems.
My approach to controlling the RVR is to establish a table in which each row is an api. Separate commands are defined to set RVR speeds and direction. In using raw data, the command GO sets the data values in the appropriate api, calculates the check sum and sends the api to the RVR. Executing the command go sends an existing api to the RVR. The same procedure is used for the heading/speed api control. The control words are DRIVE and drive.
I also believe that the action words should be restricted to no more than 3 characters. For example, F(orward), B(ackward), R(otate)R(ight), H(alt), etc. Execution of the forth defined commands takes 1-1.8 ms. The forth environment allows us to define new words, test them, discard or save them, all while operating the robot. One of the important advantages of the propeller mcu, is to run tasks in the background (no interrupts). The PING runs in a “cog”, updating its distance measurement every 50 ms.