wip
This commit is contained in:
@@ -31,15 +31,14 @@ def calculate_lane_width(lane, current_lane, road_edge):
|
||||
|
||||
return min(distance_to_lane, distance_to_road_edge)
|
||||
|
||||
# Clearpilot added default value 0
|
||||
def calculate_road_curvature(modelData, v_ego):
|
||||
predicted_velocities = np.array(modelData.velocity.x)
|
||||
# clearpilot fix
|
||||
# /data/openpilot/openpilot/selfdrive/frogpilot/controls/lib/frogpilot_functions.py:36: RuntimeWarning: divide by zero encountered in divide
|
||||
# curvature_ratios = np.abs(np.array(modelData.acceleration.y)) / (predicted_velocities**2)
|
||||
curvature_ratios = np.abs(np.array(modelData.acceleration.y)) / (predicted_velocities**2)
|
||||
# /data/openpilot/openpilot/selfdrive/frogpilot/controls/lib/frogpilot_functions.py:37: RuntimeWarning: invalid value encountered in multiply
|
||||
# return np.amax(curvature_ratios * (v_ego**2))
|
||||
return np.amax(curvature_ratios * (v_ego**2))
|
||||
try:
|
||||
predicted_velocities = np.array(modelData.velocity.x)
|
||||
curvature_ratios = np.abs(np.array(modelData.acceleration.y)) / (predicted_velocities**2)
|
||||
return np.amax(curvature_ratios * (v_ego**2))
|
||||
except:
|
||||
return 0
|
||||
|
||||
class MovingAverageCalculator:
|
||||
def __init__(self):
|
||||
@@ -141,6 +140,10 @@ class FrogPilotFunctions:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def prune_recordings():
|
||||
return
|
||||
|
||||
@classmethod
|
||||
def setup_frogpilot(cls):
|
||||
remount_cmd = ['sudo', 'mount', '-o', 'remount,rw', '/persist']
|
||||
|
||||
Reference in New Issue
Block a user