|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The speed server does engine, braking, and transmission management for the Overbot. IN PROGRESS Messages understood by the SPEED serverThe speed server, with ID SPEED, accepts the following message types, which are defined in "speedservermsg.h". A version of the speed server, written by Achut Reddy, already exists, but was written for the MicroMo controllers. It will be revised for the new controllers. Message SPSS ("Set speed") Specifies a speed and an acceleration. This is the main message to the speed server. An SPSS message shouild be sent to the speed server every 100ms. Failure to send one for 200ms will result in an emergency stop. Reply is with a speed state message. Names here are approximate; see the include file for the exact format.
Reply:
Speed states
From the move server's perspective, all the above states can be seen, but only parked, pause, idle, and run can be requested. At power up, the state is parked. The move server should request paused to start the engine. The move server should then see the states progress from parked to reset to starting to paused, possibly with a detour through startwait if more than one start attempt is needed. The move server should just wait for paused. To change gears, go to idle, and specify a new gear. The state will then progress from idle to shifting and back to idle, with the new gear set. It is then permissible to go to run, with the current gear specified. Trying to change gears without going through idle will cause a fault. Available gears are NEUTRAL, LOW6WD, LOW, HIGH, and REVERSE. When ready to start motion from idle, request run, specifying a gear. Gear selection only matters for run. The state will then progress from idle to runwait to shifting to run. The move server should just wait for run. Note that there's a five second DARPA-required safety delay in runwait state, with the horn sounding but no vehicle movement. If a pause signal is received, reduce speed to 0, then request paused. The move server must receive the DARPA pause signal and request paused. To come out of pause, request idle. The state will change to runwait for the required five second delay, then go to idle. Sending a nonzero fault code will change the state to idle, if the previous state was run, or reset, if the previous state was not run. This is the proper way to force an emergency stop because of some problem of which the move server is aware. The brakes will slam on and the throttle will be cut to zero. We will have to define a set of fault codes and messages. Sending a nonzero fault code will result in a message being displayed in the LED sign. Failure to send a message to the move server for 200ms will result in a fault. Making an invalid request will result in a fault. After about ten minutes in paused,the state will change to parked, and the engine will stop, to save fuel.
HintsThe speed server provides some "hints" to the move server, indicating how things are going. These are
The general idea is that the move server, upon seeing a "hint", should gracefully take corrective action as indicated. This usually means finishing the current move, coming to a stop, requesting a gear change, and restarting. But because gear changing requires a stop, it's not worth doing unless you intend to spend some time in that gear. Low gear is limited to about 17MPH. "LOW6WD" is low gear with six wheel drive engaged. Stay below 10MPH in that gear. On slippery or tilted surfaces, go to LOW6WD. |