How makkima16/line_follower_vatr works
This is a classical-vision line-following robot with a phone-camera/PC/robot feedback loop, plus a closed-loop track simulator and a small standalone Bluetooth-control demo. The main runtime captures frames, analyzes line and traffic signals, computes navigation commands, translates them to the robot protocol, and sends them asynchronously. The README also documents junction mapping and DFS exploration. Some wiring is supported only by documented behavior or module references; uncertain simulator and phone-page links are omitted or marked unverified.
Main entry points: main.py Runtime entry · simulador.py Closed-loop simulator · control.py PD and state machine · robot.py Command sender
Components 20
Video capture
- Phone stream server
code/phone_camera.py - Camera page
code/templates/camera.html - Runtime entry
code/main.py
Perception and navigation
- Line vision
code/vision.py - Signal detection
code/senales.py - PD and state machine
code/control.py - Odometry and DFS map
code/mapa.py
Control and actuation
- Runtime parameters
code/config.py - Command drivers
code/drivers.py - Command sender
code/robot.py - Robot transport
code/robot.py
Simulation
- Closed-loop simulator
code/simulador.py - Virtual camera
code/simulador.py - Motion preview
code/sim.py
Standalone demo
- Manual camera demo
master_pc/main.py - Bluetooth robot
master_pc/Robot.py
Other components
- Operator
- Phone camera
- Track image
- mBot
Connections 24
- Operator → Runtime entry: starts
README.md - Phone camera → Phone stream server: streams frames
README.md - Phone stream server → Camera page: serves page
README.md - Runtime entry → Phone stream server: selects capture
code/main.py - Runtime entry → Line vision: processes frames
code/main.py - Runtime entry → Signal detection: detects signs
code/main.py - Runtime entry → PD and state machine: updates state
code/main.py - PD and state machine → Odometry and DFS map: uses navigation
code/control.py - PD and state machine → Command drivers: requests commands
code/control.py - Runtime entry → Command sender: starts sender
code/main.py - Command sender → PD and state machine: gets commands
code/robot.py - Command sender → Robot transport: sends messages
code/robot.py - Robot transport → mBot: connects Bluetooth
README.md - Runtime entry → Motion preview: shows motion
code/main.py - Closed-loop simulator → Track image: loads map image
README.md - Closed-loop simulator → Virtual camera: creates camera
code/simulador.py - Closed-loop simulator → Line vision: reuses vision
README.md - Closed-loop simulator → PD and state machine: reuses control
README.md - Closed-loop simulator → Odometry and DFS map: uses map logic
code/simulador.py - Closed-loop simulator → Motion preview: shows trajectory
- Manual camera demo → Bluetooth robot: sends motion calls
master_pc/main.py - Bluetooth robot → mBot: connects Bluetooth
master_pc/Robot.py - Runtime parameters → PD and state machine: sets parameters
code/control.py - Runtime parameters → Command drivers: sets parameters
code/drivers.py