nnspike.unit.mode_manager
Classes
|
Manages the current mode of the robot unit based on image analysis and sensor data. |
- class nnspike.unit.mode_manager.ModeManager(course)[source]
Manages the current mode of the robot unit based on image analysis and sensor data.
This class is responsible for determining and transitioning between different behavior modes including edge following, obstacle avoidance, and various bottle carrying phases. Mode transitions are determined based on motor position thresholds, image processing results (color detection), and sensor readings.
The class uses toggle flags to prevent repeated transitions and ensures each mode change occurs only once when conditions are met.