24 lines
628 B
Python
24 lines
628 B
Python
import math
|
|
|
|
|
|
class Robot(object):
|
|
WHEEL_CIRCUMFERENCE_MM = 71.0 * math.pi
|
|
"""Circumference of a wheel in millimeters"""
|
|
|
|
TICKS_PER_TURN = 27.7 * 100.0
|
|
"""Ticks per 360 degree turn of a wheel"""
|
|
|
|
ARBOR_LENGTH_MM = 139.0
|
|
"""Distance between the two wheels in millimeters"""
|
|
|
|
ARBOR_LENGTH_M = ARBOR_LENGTH_MM / 1000.0
|
|
"""Distance between the two wheels in meters"""
|
|
|
|
TICKS_PER_METER = 1000.0 / WHEEL_CIRCUMFERENCE_MM * TICKS_PER_TURN
|
|
"""Ticks after driving one meter"""
|
|
|
|
LEFT_PORT = 4
|
|
"""Motor port for the left motor"""
|
|
|
|
RIGHT_PORT = 1
|
|
"""Motor port for the right motor"""
|