task_competition module

task_competition.py

Cooperative scheduler task that drives a Romi robot through a multi-leg line-following competition course. Manages state transitions, motor commands, and sensor arbitration across all course segments from start to finish.

class task_competition.task_competition(competitionGo, lineFollowGo, lineFollowSetPoint, lineFound, lineFollowKff, lineCentroid, observerGoFlag, reflectanceMode, observerCenterDistance, observerHeading, leftMotorGo, leftMotorSetPoint, rightMotorGo, rightMotorSetPoint, ultrasonicDistance)[source]

Bases: object

Cooperative scheduler task that sequences the Romi robot through each leg of the competition course using a finite state machine.

run()[source]

Cooperative task for scheduler

task_competition.wheel_speeds(radius_mm, center_speed_mms, half_track=70.5)[source]

Return (v_left, v_right) in mm/s. Positive radius = right turn.