mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
Remove laika submodule (#30453)
* Remove laika submodule * Remove laika check for minimal builds * Fix minimal build check * Bring back exclude for opendbc in codespell * Fix typo * Copy GNSS indices from laika * Delete laika dependencies old-commit-hash: 2de13bea91d7c095491d9f3f21cb71d995c63bb4
This commit is contained in:
@@ -4,9 +4,6 @@
|
||||
[submodule "opendbc"]
|
||||
path = opendbc
|
||||
url = ../../commaai/opendbc.git
|
||||
[submodule "laika_repo"]
|
||||
path = laika_repo
|
||||
url = ../../commaai/laika.git
|
||||
[submodule "cereal"]
|
||||
path = cereal
|
||||
url = ../../commaai/cereal.git
|
||||
|
||||
@@ -26,7 +26,7 @@ repos:
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
exclude: '^(third_party/)|(body/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(selfdrive/ui/translations/.*.ts)|(poetry.lock)'
|
||||
exclude: '^(third_party/)|(body/)|(cereal/)|(panda/)|(opendbc/)|(rednose/)|(rednose_repo/)|(selfdrive/ui/translations/.*.ts)|(poetry.lock)'
|
||||
args:
|
||||
# if you've got a short variable name that's getting flagged, add it here
|
||||
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints
|
||||
@@ -39,12 +39,12 @@ repos:
|
||||
language: system
|
||||
types: [python]
|
||||
args: ['--explicit-package-bases']
|
||||
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
|
||||
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.5
|
||||
hooks:
|
||||
- id: ruff
|
||||
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
|
||||
exclude: '^(third_party/)|(cereal/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: cppcheck
|
||||
|
||||
@@ -13,8 +13,6 @@ COPY SConstruct ${OPENPILOT_PATH}
|
||||
COPY ./openpilot ${OPENPILOT_PATH}/openpilot
|
||||
COPY ./third_party ${OPENPILOT_PATH}/third_party
|
||||
COPY ./site_scons ${OPENPILOT_PATH}/site_scons
|
||||
COPY ./laika ${OPENPILOT_PATH}/laika
|
||||
COPY ./laika_repo ${OPENPILOT_PATH}/laika_repo
|
||||
COPY ./rednose ${OPENPILOT_PATH}/rednose
|
||||
COPY ./tools ${OPENPILOT_PATH}/tools
|
||||
COPY ./release ${OPENPILOT_PATH}/release
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ AddOption('--pc-thneed',
|
||||
AddOption('--minimal',
|
||||
action='store_false',
|
||||
dest='extras',
|
||||
default=os.path.islink(Dir('#laika/').abspath),
|
||||
default=os.path.islink(Dir('#rednose/').abspath), # minimal by default on release branch (where rednose is not a link)
|
||||
help='the minimum build to run openpilot. no tests, tools, etc.')
|
||||
|
||||
## Architecture name breakdown (arch)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ clean:
|
||||
|
||||
@echo "Building rst files..."
|
||||
sphinx-apidoc -o "$(DOCSBUILDDIR)" ../ \
|
||||
../xx ../laika_repo ../rednose_repo ../notebooks ../panda_jungle \
|
||||
../xx ../rednose_repo ../notebooks ../panda_jungle \
|
||||
../third_party \
|
||||
../panda/examples \
|
||||
../scripts \
|
||||
|
||||
@@ -18,14 +18,6 @@ cereal
|
||||
cereal/README.md
|
||||
cereal/messaging/msgq.md
|
||||
|
||||
laika
|
||||
=========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
laika_repo/README.md
|
||||
|
||||
models
|
||||
=========
|
||||
|
||||
|
||||
-1
Submodule laika_repo deleted from 8861844c9b
Generated
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f131dbbf295ce7584d9df3768254a5ea8c486ca008b84c5437bbdfc90261bbc8
|
||||
size 451773
|
||||
oid sha256:fe928d22a4b219d099d51d732ca7b1d017e0f94295cc0901b31553182cc6bbff
|
||||
size 439894
|
||||
|
||||
+1
-6
@@ -1,6 +1,6 @@
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=laika_repo/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
|
||||
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
|
||||
cpp_files = "test_*"
|
||||
python_files = "test_*.py"
|
||||
#timeout = "30" # you get this long by default
|
||||
@@ -38,8 +38,6 @@ exclude = [
|
||||
"cereal/",
|
||||
"opendbc/",
|
||||
"panda/",
|
||||
"laika/",
|
||||
"laika_repo/",
|
||||
"rednose/",
|
||||
"rednose_repo/",
|
||||
"tinygrad/",
|
||||
@@ -82,7 +80,6 @@ crcmod = "*"
|
||||
cryptography = "*"
|
||||
Cython = "*"
|
||||
future-fstrings = "*" # for acados
|
||||
hatanaka = "==2.4"
|
||||
hexdump = "*"
|
||||
Jinja2 = "*"
|
||||
json-rpc = "*"
|
||||
@@ -159,7 +156,6 @@ sphinx-sitemap = "*"
|
||||
tabulate = "*"
|
||||
tenacity = "*"
|
||||
types-atomicwrites = "*"
|
||||
types-certifi = "*"
|
||||
types-pycurl = "*"
|
||||
types-PyYAML = "*"
|
||||
types-requests = "*"
|
||||
@@ -187,7 +183,6 @@ target-version="py311"
|
||||
exclude = [
|
||||
"panda",
|
||||
"opendbc",
|
||||
"laika_repo",
|
||||
"rednose_repo",
|
||||
"tinygrad_repo",
|
||||
"third_party",
|
||||
|
||||
@@ -448,7 +448,6 @@ scripts/stop_updater.sh
|
||||
|
||||
rednose/.gitignore
|
||||
rednose/**
|
||||
laika/**
|
||||
|
||||
body/.gitignore
|
||||
body/board/SConscript
|
||||
|
||||
@@ -1,19 +1,35 @@
|
||||
import numpy as np
|
||||
from laika.raw_gnss import GNSSMeasurement
|
||||
|
||||
|
||||
# source: GNSSMeasurement (https://github.com/commaai/laika/blob/master/laika/raw_gnss.py)
|
||||
class RawGNSSMeasurementIndices:
|
||||
PRN = 0
|
||||
RECV_TIME_WEEK = 1
|
||||
RECV_TIME_SEC = 2
|
||||
GLONASS_FREQ = 3
|
||||
|
||||
PR = 4
|
||||
PR_STD = 5
|
||||
PRR = 6
|
||||
PRR_STD = 7
|
||||
|
||||
SAT_POS = slice(8, 11)
|
||||
SAT_VEL = slice(11, 14)
|
||||
|
||||
|
||||
def parse_prr(m):
|
||||
sat_pos_vel_i = np.concatenate((m[GNSSMeasurement.SAT_POS],
|
||||
m[GNSSMeasurement.SAT_VEL]))
|
||||
R_i = np.atleast_2d(m[GNSSMeasurement.PRR_STD]**2)
|
||||
z_i = m[GNSSMeasurement.PRR]
|
||||
sat_pos_vel_i = np.concatenate((m[RawGNSSMeasurementIndices.SAT_POS],
|
||||
m[RawGNSSMeasurementIndices.SAT_VEL]))
|
||||
R_i = np.atleast_2d(m[RawGNSSMeasurementIndices.PRR_STD]**2)
|
||||
z_i = m[RawGNSSMeasurementIndices.PRR]
|
||||
return z_i, R_i, sat_pos_vel_i
|
||||
|
||||
|
||||
def parse_pr(m):
|
||||
pseudorange = m[GNSSMeasurement.PR]
|
||||
pseudorange_stdev = m[GNSSMeasurement.PR_STD]
|
||||
sat_pos_freq_i = np.concatenate((m[GNSSMeasurement.SAT_POS],
|
||||
np.array([m[GNSSMeasurement.GLONASS_FREQ]])))
|
||||
pseudorange = m[RawGNSSMeasurementIndices.PR]
|
||||
pseudorange_stdev = m[RawGNSSMeasurementIndices.PR_STD]
|
||||
sat_pos_freq_i = np.concatenate((m[RawGNSSMeasurementIndices.SAT_POS],
|
||||
np.array([m[RawGNSSMeasurementIndices.GLONASS_FREQ]])))
|
||||
z_i = np.atleast_1d(pseudorange)
|
||||
R_i = np.atleast_2d(pseudorange_stdev**2)
|
||||
return z_i, R_i, sat_pos_freq_i
|
||||
|
||||
|
||||
Reference in New Issue
Block a user