Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

sync #93

Merged
merged 4 commits into from
Jan 11, 2021
Merged

sync #93

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ torch = "*"
torchsummary = "*"
blosc = "==1.9.2"
segmentation-models-pytorch = "==0.1.2"
pyopencl = "*"

[packages]
atomicwrites = "*"
Expand Down
191 changes: 104 additions & 87 deletions Pipfile.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ struct CarParams {
steerRateCost @33 :Float32; # Lateral MPC cost on steering rate
steerControlType @34 :SteerControlType;
radarOffCan @35 :Bool; # True when radar objects aren't visible on CAN
minSpeedCan @51 :Float32; # Minimum vehicle speed from CAN (below this value drops to 0)
stoppingBrakeRate @52 :Float32; # brake_travel/s while trying to stop
startingBrakeRate @53 :Float32; # brake_travel/s while releasing on restart

steerActuatorDelay @36 :Float32; # Steering wheel actuator delay in seconds
openpilotLongitudinalControl @37 :Bool; # is openpilot doing the longitudinal control?
Expand Down
16 changes: 8 additions & 8 deletions common/dp_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
from common.params import Params
from common.realtime import sec_since_boot
import os
import time
from math import floor
#import time
#from math import floor
params = Params()
from common.travis_checker import travis
from common.dp_conf import init_params_vals
#from common.dp_conf import init_params_vals

if travis:
PARAM_PATH = str(os.environ.get('HOME')) + "/.comma/params/d/"
else:
PARAM_PATH = "/data/params/d/"
LAST_MODIFIED = str(PARAM_PATH) + "dp_last_modified"
if not os.path.exists(LAST_MODIFIED):
os.makedirs(str(os.environ.get('HOME')) + "/.comma/params/d/", exist_ok=True)
print("dp_last_modified is " + str(floor(time.time())))
params.put('dp_last_modified',str(floor(time.time())))
init_params_vals(params)
#if not os.path.exists(LAST_MODIFIED):
# os.makedirs(str(os.environ.get('HOME')) + "/.comma/params/d/", exist_ok=True)
# print("dp_last_modified is " + str(floor(time.time())))
# params.put('dp_last_modified',str(floor(time.time())))
# init_params_vals(params)

def is_online():
try:
Expand Down
20 changes: 10 additions & 10 deletions common/op_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ def __init__(self):
#'hotspot_on_boot': Param(False, bool, 'Enable Hotspot On Boot'),
'keep_openpilot_engaged': Param(True, bool, 'True is stock behavior in this fork. False lets you use the brake and cruise control stalk to disengage as usual'),
#'lat_d': Param(9.0, VT.number, 'The lateral derivative gain, default is 9.0 for TSS2 Corolla. This is active at all speeds', live=True),
#'limit_rsa': Param(False, bool, "Switch off RSA above rsa_max_speed"),
'limit_rsa': Param(False, bool, "Switch off RSA above rsa_max_speed"),
#'ludicrous_mode': Param(False, bool, 'Double overall acceleration!'),
'mpc_offset': Param(0.0, VT.number, 'Offset model braking by how many m/s. Lower numbers equals more model braking', live=True),
#'NoctuaMode': Param(False, bool, 'Noctua Fan are super quite and they run at full speed at all time.'),
'offset_limit': Param(0, VT.number, 'Speed at which apk percent offset will work in m/s'),
'osm': Param(True, bool, 'Whether to use OSM for drives'),
'prius_pid': Param(False, bool, 'This enables the PID lateral controller with new a experimental derivative tune\nFalse: stock INDI, True: TSS2-tuned PID'),
'rolling_stop': Param(False, bool, 'If you do not want stop signs to go down to 0 kph enable this for 9kph slow down'),
#'rsa_max_speed': Param(24.5, VT.number, 'Speed limit to ignore RSA in m/s'),
'rsa_max_speed': Param(24.5, VT.number, 'Speed limit to ignore RSA in m/s'),
'smart_speed': Param(True, bool, 'Whether to use Smart Speed for drives above smart_speed_max_vego'),
'smart_speed_max_vego': Param(26.8, VT.number, 'Speed limit to ignore Smartspeed in m/s'),
#'spairrowtuning': Param(False, bool, 'INDI Tuning for Corolla Tss2, set steer_up_15 param to True and flash panda'),
Expand All @@ -118,14 +118,14 @@ def __init__(self):
#'use_virtual_middle_line': Param(False, bool, 'For roads over 4m wide, hug right. For roads under 2m wide, hug left.'),
'uniqueID': Param(None, [type(None), str], 'User\'s unique ID'),
'enable_indi_live': Param(False, bool, live=True),
'indi_inner_gain_bp': Param([0, 255, 255], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_inner_gain_v': Param([6.0, 6.0, 6.0], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_outer_gain_bp': Param([0, 255, 255], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_outer_gain_v': Param([15, 15, 15], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_time_constant_bp': Param([0, 255, 255], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_time_constant_v': Param([5.5, 5.5, 5.5], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_actuator_effectiveness_bp': Param([0, 255, 255], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_actuator_effectiveness_v': Param([6, 6, 6], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_inner_gain_bp': Param([18, 22, 26], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_inner_gain_v': Param([5, 10, 15], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_outer_gain_bp': Param([18, 22, 26], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_outer_gain_v': Param([4, 9, 14.99], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_time_constant_bp': Param([18, 22, 26], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_time_constant_v': Param([2, 4, 5.5], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_actuator_effectiveness_bp': Param([18, 22, 26], [list, float, int], live=True, depends_on='enable_indi_live'),
'indi_actuator_effectiveness_v': Param([5, 10, 15], [list, float, int], live=True, depends_on='enable_indi_live'),
'steer_limit_timer': Param(0.4, VT.number, live=True, depends_on='enable_indi_live')
}

Expand Down
Loading