Flow Chart
Designing a flow chart of the whole automated process of the vehicle is the first step of software design.
A hierarchical state machine is applied in the flow chart design, with several layers of sub-states, which could interpret the whole process more concisely. A *.pdf version of the flow chart is provided here.
A hierarchical state machine is applied in the flow chart design, with several layers of sub-states, which could interpret the whole process more concisely. A *.pdf version of the flow chart is provided here.
Forward(V1) - Set the both the motors to go forward with speed V1;
Rotate() - Set the speed of the left motor to be V1, the right motor to be -V1, where V1 is a default value;
Brake() - Set the speed of both motors to be zero;
L(V1,V2) - Set the speed of the left and right motor to be (V1 + V2) and (V1 - V2) respectively;
R(V1,V2) - Set the speed of the left and right motor to be (V1 - V2) and (V1 + V2) respectively.
An illustration of how functional regions are chosen is shown below.
Rotate() - Set the speed of the left motor to be V1, the right motor to be -V1, where V1 is a default value;
Brake() - Set the speed of both motors to be zero;
L(V1,V2) - Set the speed of the left and right motor to be (V1 + V2) and (V1 - V2) respectively;
R(V1,V2) - Set the speed of the left and right motor to be (V1 - V2) and (V1 + V2) respectively.
An illustration of how functional regions are chosen is shown below.