Skip to content

Commit

Permalink
Merge pull request #210 from arne182/066-clean
Browse files Browse the repository at this point in the history
066 clean
  • Loading branch information
sshane authored Nov 22, 2019
2 parents 3129294 + b409e51 commit a28da44
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.openpilot
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN /tmp/install_capnp.sh

RUN git clone --branch v0.6.5 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools

ENV PYTHONPATH /tmp/openpilot:${PYTHONPATH}
ENV PYTHONPATH /tmp/openpilot
COPY ./.pylintrc /tmp/openpilot/.pylintrc
COPY ./common /tmp/openpilot/common
COPY ./cereal /tmp/openpilot/cereal
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), vin="", has_relay
ret.gasMaxBP = [0., 9., 55]
ret.gasMaxV = [0.2, 0.5, 0.7]
ret.longitudinalTuning.kpV = [0.50, 0.4, 0.3] # braking tune
ret.longitudinalTuning.kiV = [0.0135, 0.01]
ret.longitudinalTuning.kiV = [0.135, 0.1]
else:
ret.gasMaxBP = [0., 9., 55]
ret.gasMaxV = [0.2, 0.5, 0.7]
ret.longitudinalTuning.kpV = [0.325, 0.325, 0.325] # braking tune from rav4h
ret.longitudinalTuning.kiV = [0.001, 0.0010]
ret.longitudinalTuning.kiV = [0.1, 0.10]

if candidate not in [CAR.PRIUS, CAR.RAV4, CAR.RAV4H]: # These cars use LQR/INDI
ret.lateralTuning.init('pid')
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/long_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def get_cost(self, TR):
if abs(real_TR - TR) >= .25: # use real TR if diff is greater than x safety threshold
TR = real_TR
if self.lead_data['v_lead'] is not None and self.v_ego > 5:
factor = min(1,max(2,(self.lead_data['v_lead'] - self.v_ego)/2 + 1.5))
return min(round(float(interp(TR, x, y)), 3)/factor, 0.1)
factor = max(1,min(2,(self.lead_data['v_lead'] - self.v_ego)/2 + 1.5))
return max(round(float(interp(TR, x, y)), 3)/factor, 1.1)
else:
return round(float(interp(TR, x, y)), 3)

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def choose_solution(self, v_cruise_setpoint, enabled):
solutions['mpc2'] = self.mpc2.v_mpc

slowest = min(solutions, key=solutions.get)

self.longitudinalPlanSource = slowest
# Choose lowest of MPC and cruise
if slowest == 'mpc1':
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/mapd/mapd.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def mapsd_thread():
curvature = np.nan_to_num(curvature)



curvature = abs(curvature)
upcoming_curvature = np.amax(curvature)
dist_to_turn =np.amin(dists[np.logical_and(curvature >= np.amax(curvature), curvature <= np.amax(curvature))])

Expand Down

0 comments on commit a28da44

Please sign in to comment.