Source code for soccer_strategy.ball
import numpy as np
import rospy
[docs]class Ball:
"""
Contains dynamic information about the ball based on a robot's estimate
"""
FRICTION = 1
FRICTION_COEFF = 0.8
[docs] def __init__(self, position=np.array([0, 0])):
self.position: np.ndarray = position
self.last_observed_time_stamp = rospy.Time(0)
self.velocity = np.array([0, 0])
self.kick_timeout = 0