For full documentation visit Docs.
|
|
---|---|
|
|
[][][][][][]
- possible 6 command signals and to control motors
[]
- every cell could be1
or0
That means we have2
x2
x2
x2
x2
x2
= 64 cases
Rl
Ll
[0][0][0][0]
: R - right IR signal, L- left IR signal for lane detection[0][0]
Ro
Lo
[0][0]
: Ro - right IR signal, Lo- left IR signal for obstacle detection[0][0][0][0]
Rc
Lc
: Rc - lane curve right, Lo- lane curve left by camera image processing
All the set of cases goForward, turnRight, turnLeft, backAndLeft, backAndRight in allcases.py
forward = "000000"
camera_right = "000010"
camera_left = "000001"
right = {
"001000",
"001001",
"001010",
"100000",
"100001",
"100010",
"101000",
"101001",
"101010",
# "111000",
# "111001",
# "111010"
}
left = {
"010010",
"000100",
"000101",
"000110",
"010001",
"010100",
"010000",
"010101",
"010110",
# "110100",
# "110101",
# "110110"
}
double_line = {
#right
"111000",
"111001",
"111010"
#left
"110100",
"110101",
"110110"
}
back_right = {
"001100",
"001101",
"001110"
"011100",
"011101",
"011110",
}
back_left = {
"101100",
"101101",
"101110",
}
back_turn_left = {
"100100"
"100101",
"100110"
}
back_turn_right = {
"011000"
"011001",
"011010"
}
We decide to make different turning modes for different commands
-
When IR sensor send turn righ/left signal that mean ahead Obstacle, it requires radical turn
-
When Camera Image Processing send turn right/left command that mean ahead
curved turn
then turn smoothly we use for smooth turn different PWM values for two different sides motors
python3 main.py
- Run the project.
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
unit_tests/
line-obstacle-ir-sensors.py # The unit test script.
test.md # The documentation unit tests.
xml_signs/
cascade_girl_pedestrian # The documentation homepage.
... # Other trained xml files.