|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: How does your team architect its codebase?
Our code design always falls along functional lines, with the code modules closely following the moving pieces of the robot and communications channels. Most of the robotic projects I do at work turn out the same way. This year the different pieces include:
main - starts all other tasks and services comms with the driver station auto - autonomous/hybrid behavior, reads and execs a custom script language wheels - starts and monitors all drive wheel servos, crab, spin, measured movements gatherer - runs the 4 ball gathering systems and the elevator shooter - runs the servos for turret position, wheel speed and the feeder targeting - runs the camera and processes images dashboard - collects and sends dashboard data monitor - monitors the health and status of the other modules Each piece/module is in a separate task, all derived from a common class. Each spins in an endless loop reading a message queue and performing the duties requested. It makes debugging easier, it is like 8 different smaller less complex programs. Since they are in separate tasks we can adjust their relative priorities using the operating system (taskPrioritySet/Get). HTH |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|