mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-30 03:24:03 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5966b94504 | |||
| 64bce9668c |
@@ -194,7 +194,7 @@ jobs:
|
||||
find . -name '__pycache__' -type d -exec rm -rf {} +
|
||||
find . -name 'SConstruct' -delete
|
||||
find . -name 'SConscript' -delete
|
||||
rm -rf .sconsign.dblite Jenkinsfile tools/release/ release/
|
||||
rm -rf .sconsign.dblite tools/release/ release/
|
||||
rm -f openpilot/selfdrive/modeld/models/*.onnx*
|
||||
rm -f openpilot/sunnypilot/modeld*/models/*.onnx*
|
||||
find openpilot/third_party/ -name '*x86*' -exec rm -r {} +
|
||||
|
||||
@@ -3,8 +3,6 @@ name: Build dev
|
||||
env:
|
||||
DEFAULT_SOURCE_BRANCH: "master"
|
||||
DEFAULT_TARGET_BRANCH: "master-dev"
|
||||
LFS_URL: 'https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs'
|
||||
LFS_PUSH_URL: 'ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git'
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -66,15 +64,6 @@ jobs:
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Set up SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Add GitLab public keys
|
||||
run: |
|
||||
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -167,13 +156,6 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update LFS Config
|
||||
run: |
|
||||
echo '[lfs]' > .lfsconfig
|
||||
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
|
||||
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
|
||||
echo ' locksverify = false' >> .lfsconfig
|
||||
|
||||
- name: Restore workflows from source
|
||||
run: |
|
||||
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[lfs]
|
||||
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
|
||||
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
|
||||
locksverify = false
|
||||
@@ -52,7 +52,13 @@ std::vector<std::string> PandaSafety::fetchCarParams() {
|
||||
if (!params_.getBool("ControlsReady")) {
|
||||
return {};
|
||||
}
|
||||
return {params_.get("CarParams"), params_.get("CarParamsSP")};
|
||||
|
||||
std::string car_params = params_.get("CarParams");
|
||||
std::string car_params_sp = params_.get("CarParamsSP");
|
||||
if (car_params.empty() || car_params_sp.empty()) {
|
||||
return {};
|
||||
}
|
||||
return {car_params, car_params_sp};
|
||||
}
|
||||
|
||||
// TODO-SP: Use structs instead of vector
|
||||
|
||||
@@ -18,6 +18,7 @@ class LatControlTorqueExt(NeuralNetworkLateralControl, LatControlTorqueExtOverri
|
||||
desired_lateral_accel, actual_lateral_accel, lateral_accel_deadzone, gravity_adjusted_lateral_accel,
|
||||
desired_curvature, actual_curvature, steer_limited_by_safety, output_torque):
|
||||
self._ff = ff
|
||||
self._pid = pid
|
||||
self._pid_log = pid_log
|
||||
self._setpoint = setpoint
|
||||
self._measurement = measurement
|
||||
|
||||
@@ -63,7 +63,7 @@ class LatControlTorqueExtBase:
|
||||
self.torque_params = lac_torque.torque_params
|
||||
|
||||
self._ff = 0.0
|
||||
self._pid = PIDController(KP, KI, pos_limit=lac_torque.steer_max, neg_limit=-lac_torque.steer_max, rate=1 / lac_torque.dt)
|
||||
self._pid = PIDController(KP, KI)
|
||||
self._pid_log = log.ControlsState.LateralTorqueState.new_message()
|
||||
self._setpoint = 0.0
|
||||
self._measurement = 0.0
|
||||
|
||||
@@ -4,7 +4,6 @@ Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors.
|
||||
This file is part of sunnypilot and is licensed under the MIT License.
|
||||
See the LICENSE.md file in the root directory for more details.
|
||||
"""
|
||||
import math
|
||||
import numpy as np
|
||||
|
||||
from openpilot.cereal import log, messaging
|
||||
@@ -60,9 +59,9 @@ def _make_model_v2():
|
||||
return model
|
||||
|
||||
|
||||
def _run_update(controller, VM, v_ego=30, desired_curvature=0.5):
|
||||
def _run_update(controller, VM):
|
||||
CS = car.CarState.new_message()
|
||||
CS.vEgo = v_ego
|
||||
CS.vEgo = 30
|
||||
CS.steeringPressed = False
|
||||
lp = generate_deviceMotion()
|
||||
pose = Pose.from_device_motion(lp.deviceMotion)
|
||||
@@ -70,7 +69,7 @@ def _run_update(controller, VM, v_ego=30, desired_curvature=0.5):
|
||||
model_v2 = _make_model_v2().modelV2
|
||||
controller.extension.update_model_v2(model_v2)
|
||||
controller.extension.update_lateral_lag(0.2)
|
||||
return controller.update(True, CS, VM, params, False, desired_curvature, pose, False, 0.2)
|
||||
return controller.update(True, CS, VM, params, False, 0.5, pose, False, 0.2)
|
||||
|
||||
|
||||
class TestLatControlTorqueExt(OpenpilotTestCase):
|
||||
@@ -108,12 +107,3 @@ class TestLatControlTorqueExt(OpenpilotTestCase):
|
||||
controller, VM, _ = _make_controller(enhanced=True, nnlc=True)
|
||||
output_torque, _, pid_log = _run_update(controller, VM)
|
||||
assert pid_log.active
|
||||
|
||||
def test_low_speed_gain_bounded(self):
|
||||
for kwargs in ({"nnlc": True}, {"enhanced": True}):
|
||||
controller, VM, _ = _make_controller(**kwargs)
|
||||
one_degree = -VM.calc_curvature(math.radians(1.0), 2.0, 0.0)
|
||||
output_torque, _, _ = _run_update(controller, VM, v_ego=2.0, desired_curvature=one_degree)
|
||||
assert controller.extension._nnlc_enabled or controller.extension._jerk_aware_enabled
|
||||
assert controller.extension._pid is not controller.pid
|
||||
assert abs(output_torque) < 0.3, kwargs
|
||||
|
||||
@@ -102,7 +102,7 @@ def generate_model(driving_pkl: Path) -> dict:
|
||||
artifact_data = {
|
||||
"file_name": driving_pkl.name,
|
||||
"download_uri": {
|
||||
"url": "https://gitlab.com/sunnypilot/public/docs.sunnypilot.ai/-/raw/main/",
|
||||
"url": "",
|
||||
"sha256": tinygrad_hash
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user