openpilot v0.4.3.2 release

old-commit-hash: 78df63a6af
This commit is contained in:
Vehicle Researcher
2018-03-31 07:33:16 +00:00
parent 1596d63134
commit cd558d30d1
36 changed files with 378 additions and 394 deletions
+1 -4
View File
@@ -224,10 +224,7 @@ def state_control(plan, CS, CP, state, events, v_cruise_kph, v_cruise_kph_last,
for b in CS.buttonEvents:
# button presses for rear view
if b.type == "leftBlinker" or b.type == "rightBlinker":
if b.pressed and rear_view_allowed:
rear_view_toggle = True
else:
rear_view_toggle = False
rear_view_toggle = b.pressed and rear_view_allowed
if (b.type == "altButton1" and b.pressed) and not passive:
rear_view_toggle = not rear_view_toggle
@@ -45,25 +45,29 @@ int main( )
auto angle_r = atan(3*r_poly_r0*xx*xx + 2*r_poly_r1*xx + r_poly_r2);
auto angle_p = atan(3*p_poly_r0*xx*xx + 2*p_poly_r1*xx + p_poly_r2);
auto c_left_lane = exp(-(poly_l - yy));
auto c_right_lane = exp(poly_r - yy);
// given the lane width estimate, this is where we estimate the path given lane lines
auto l_phantom = poly_l - lane_width/2.0;
auto r_phantom = poly_r + lane_width/2.0;
auto r_phantom = poly_l - lane_width/2.0;
auto l_phantom = poly_r + lane_width/2.0;
auto path = lr_prob * (l_prob * r_phantom + r_prob * l_phantom) / (l_prob + r_prob + 0.0001)
// best path estimate path is a linear combination of poly_p and the path estimate
// given the lane lines
auto path = lr_prob * (l_prob * l_phantom + r_prob * r_phantom) / (l_prob + r_prob + 0.0001)
+ (1-lr_prob) * poly_p;
auto angle = lr_prob * (l_prob * angle_l + r_prob * angle_r) / (l_prob + r_prob + 0.0001)
+ (1-lr_prob) * angle_p;
// instead of using actual lane lines, use their estimated distance from path given lane_width
auto c_left_lane = exp(-(path + lane_width/2.0 - yy));
auto c_right_lane = exp(path - lane_width/2.0 - yy);
// Running cost
Function h;
// Distance errors
h << path - yy;
h << l_prob * c_left_lane;
h << r_prob * c_right_lane;
h << lr_prob * c_left_lane;
h << lr_prob * c_right_lane;
// Heading error
h << (v_ref + 1.0 ) * (angle - psi);
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6f0966261166f2380ad7e37389060bd4011428e8f0ef0edaa6f2d439dc1de1e6
oid sha256:f1d93e7b412f1573e2b6b22b11587bbed076d59a1c1c6d8f6d69eddc3998518c
size 8823
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5b42642b33d01c204d8093bee36923e59f284fae90629c584e1fb6e4369cc2c
size 393169
oid sha256:31bac678a145034c0f43020059ef4e77c128a4fbe734cfbf1fe65325dbec77cd
size 398689
+2 -1
View File
@@ -41,6 +41,7 @@ class Track(object):
def update(self, d_rel, y_rel, v_rel, d_path, v_ego_t_aligned, measured, steer_override):
if self.initted:
# pylint: disable=access-member-before-definition
self.dPathPrev = self.dPath
self.vLeadPrev = self.vLead
self.vRelPrev = self.vRel
@@ -117,7 +118,7 @@ if platform.machine() == 'aarch64':
if os.path.isfile(os.path.join(pp, "_hierarchy.so")):
sys.path.append(pp)
break
import _hierarchy
import _hierarchy #pylint: disable=import-error
else:
from scipy.cluster import _hierarchy