Compare commits
No commits in common. "04c1f51b882c62f2955f55fd851ca86ab34ed6b2" and "a56c4621a0ebc675a665189879d47756602f8f98" have entirely different histories.
04c1f51b88
...
a56c4621a0
|
@ -79,7 +79,7 @@ def getLaneCurve(img, display = 2):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
cap = cv2.VideoCapture(0)
|
cap = cv2.VideoCapture(0)
|
||||||
initialTrackBarVals = [96, 139, 15, 218]
|
initialTrackBarVals = [96, 139, 48, 218]
|
||||||
utils.initializeTrackbars(initialTrackBarVals)
|
utils.initializeTrackbars(initialTrackBarVals)
|
||||||
frameCounter = 0
|
frameCounter = 0
|
||||||
curveList = []
|
curveList = []
|
||||||
|
|
|
@ -88,22 +88,6 @@ class motion:
|
||||||
self.motor_write(MOTOR_RL_F, MOTOR_RL_R, lm_speed)
|
self.motor_write(MOTOR_RL_F, MOTOR_RL_R, lm_speed)
|
||||||
self.motor_write(MOTOR_RR_F, MOTOR_RR_R, rm_speed)
|
self.motor_write(MOTOR_RR_F, MOTOR_RR_R, rm_speed)
|
||||||
|
|
||||||
def skt_drive(self, speed: float, turn: float, t=0):
|
|
||||||
speed *=100
|
|
||||||
turn *=100
|
|
||||||
leftSpeed = speed - turn
|
|
||||||
rightSpeed = speed + turn
|
|
||||||
if leftSpeed>100: leftSpeed=100
|
|
||||||
elif leftSpeed<-100: leftSpeed= -100
|
|
||||||
if rightSpeed>100: rightSpeed=100
|
|
||||||
elif rightSpeed<-100: rightSpeed= -100
|
|
||||||
|
|
||||||
self.motor_write(MOTOR_FL_F, MOTOR_FL_R, speed)
|
|
||||||
self.motor_write(MOTOR_FR_F, MOTOR_FR_R, speed)
|
|
||||||
self.motor_write(MOTOR_RL_F, MOTOR_RL_R, speed)
|
|
||||||
self.motor_write(MOTOR_RR_F, MOTOR_RR_R, speed)
|
|
||||||
|
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.leds.set_left_signal_led(False)
|
self.leds.set_left_signal_led(False)
|
||||||
self.leds.set_right_signal_led(False)
|
self.leds.set_right_signal_led(False)
|
||||||
|
|
Loading…
Reference in New Issue