OpenSource-Hub

openpilot

애플리케이션

commaai/openpilot

오픈소스 로봇 운영체제, 300여 개 차종의 운전 보조 기능 업그레이드.

개요

openpilot은 오픈소스 로봇 운영 체제로, 현재 300개 이상의 차종에서 운전 보조 기능을 향상시킬 수 있습니다. 이는 comma.ai와 커뮤니티가 공동으로 개발한 고급 운전 보조 기능을 제공합니다.

README 미리보기

\n\nopenpilot\n\n\n  openpilot is an operating system for robotics.\n  \n  Currently, it upgrades the driver assistance system in 300+ supported cars.\n\n\n\n  Docs\n   · \n  Roadmap\n   · \n  Contribute\n   · \n  Community\n   · \n  Try it on a comma four\n\n\nQuick start: `bash \n\n\n  \n    \n    \n    \n  \n\n\n\nUsing openpilot in a car\n------\n\nTo use openpilot in a car, you need four things:\n1. **Supported Device:** a comma four, available at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four).\n2. **Software:** The setup procedure for the comma four allows users to enter a URL for custom software. Use the URL `openpilot.comma.ai` to install the release version.\n3. **Supported Car:** Ensure that you have one of [the 300+ supported cars](docs/CARS.md).\n4. **Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma four to your car.\n\nWe have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup). Note that it's possible to run openpilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play.\n\n\n### Branches\n\nRunning `master` and other branches directly is supported, but it's recommended to run one of the following prebuilt branches:\n\n| comma four branch      | comma 3X branch        | URL                                    | description                                                                         |\n|------------------------|------------------------|----------------------------------------|-------------------------------------------------------------------------------------|\n| `release-mici`         | `release-tizi`         | openpilot.comma.ai                     | This is openpilot's release branch.                                                 |\n| `release-mici-staging` | `release-tizi-staging` | openpilot-test.comma.ai                | This is the staging branch for releases. Us

FAQ (5)

문제 해결
Tesla에서 콜드 부팅 후 openpilot selfdrived 초기화 타임아웃 및 DI_cruiseState 오류를 해결하는 방법

이 문제는 modeld가 실시간 우선순위로 실행되는 동안 콜드 페이지 캐시에서 773 MB 빅 모델을 로드할 때 발생합니다. 로더는 modeld의 실시간 스케줄링을 상속받아 메모리 회수(memory reclaim) 중에 controlsd/selfdrived를 기아 상태로 만들어, 6 s 초기화 타임아웃, carControl not alive, 차단된 DAS_control, 그리고 크루즈 결함을 유발합니다.

[PR #39007](https://github.com/commaai/openpilot/pull/39007) "modeld: set realtime scheduling after model load"가 포함된 openpilot 빌드로 업데이트하여 수정하세요. 백포팅 시:

1. config_realtime_process() 호출/실시간 스케줄링 설정 전에 빅 모델을 로드하세요.
2. 이전에 config_realtime_process() 내부에서 수행되었던 것처럼, 로드 중에는 가비지 컬렉션을 비활성화 상태로 유지하세요(예: gc.disable() 사용).
3. 모델 로드가 완료된 후에만 modeld를 실시간 우선순위로 전환하세요.

이 변경은 측정 가능한 모델 로딩 성능 영향이 없으며 controlsd 시작이 기아 상태가 되는 것을 방지합니다. 모델이 이미 페이지 캐시에 있는 상태에서 두 번째로 시작하면 결함을 피할 수 있지만, 실제 수정은 우선순위 변경입니다.

원본 Issue #39001
문제 해결
차량이 방치된 후 comma four가 bootkick에 실패하고 Toyota LKAS/카메라 계기판 결함을 유발하는 이유는 무엇입니까?

이 문제는 panda의 STM32가 brown-out/NMI 상태로 진입할 때 발생할 수 있습니다. NMI 핸들러가 리셋하는 대신 무한 루프에 머물러 GPIO/릴레이 및 CAN 버스 상태가 비정상적인 상태로 남게 됩니다. 임시 해결 방법: comma 기기의 연결을 뽑았다가 다시 연결하세요. 이후 정상적으로 부팅되어 작동할 것입니다. 영구적 해결 방법: NMI/하드 폴트 발생 시 STM을 리셋하고 로깅을 추가하는 PR #38737 "Handle and report NMI/hardfaults"가 포함된 빌드로 openpilot/panda 펌웨어를 업데이트하세요. night-dev에서는 수정 사항이 머지된 후 업데이트를 확인하세요. 고급 사용자는 테스트 브랜치를 플래시할 수 있습니다. 문제가 반복되면 comma 전원과 공급 전압을 점검하세요.

원본 Issue #38488
문제 해결
dm_warp_1344x760_tinygrad.pkl 파일 누락으로 인해 comma four에서 dmonitoringmodeld가 실행되지 않고 운전자 모니터링 캘리브레이션이 0%에서 멈추는 문제를 해결하는 방법은?

이 문제는 PR #38684 이후의 nightly 빌드에 영향을 미치며, comma ARM64 포터블 빌드가 TICI 및 MICI 해상도 모두가 아닌 빌드 디바이스용 카메라 warp 파일만 생성합니다. comma four/MICI에는 selfdrive/modeld/models/dm_warp_1344x760_tinygrad.pkl이 필요합니다.

즉시 적용 가능한 해결 방법: comma four를 정상 작동이 확인된 release-chestnut 빌드로 재플래시하거나 전환하세요:
- AGNOS: 19.6
- 브랜치: release-chestnut
- 커밋: 053d9c446800df38aca42b69bb99197aefbea77b

openpilot 디렉터리에서 파일이 존재하는지 확인하세요:

ls -l selfdrive/modeld/models/dm_warp_1344x760_tinygrad.pkl

해당 빌드에는 dm_warp_1928x1208_tinygrad.pkl도 포함되어 있으며, 운전자 모니터링 캘리브레이션이 정상적으로 진행됩니다.

포터블 nightly/release 빌드의 경우, comma ARM64 프리빌드가 두 카메라 구성을 모두 포함하도록 SConscript를 수정하세요:
- TICI: _ar_ox_fisheye의 1928x1208
- MICI/comma four: _os_fisheye의 1344x760

단일 카메라 최적화는 디바이스 로컬 빌드에만 유지하세요. 재빌드한 후 배포 전에 두 파일이 모두 존재하는지 확인하세요:

ls -l selfdrive/modeld/models/dm_warp_1344x760_tinygrad.pkl \
       selfdrive/modeld/models/dm_warp_1928x1208_tinygrad.pkl

그런 다음 재부팅하거나 openpilot을 다시 시작하세요.

원본 Issue #38762
문제 해결
2019 Kia Niro PHEV에서 32 MPH 이하 주행 시 openpilot 조향이 해제되거나 덜컹거리는 문제를 어떻게 해결하나요?

2019 Kia Niro PHEV의 EPS 펌웨어는 약 32 MPH(14 m/s)의 최소 조향 속도를 강제합니다. 해당 EPS에서는 openpilot이 차량을 0 MPH에서 조향하도록 만들 수 없습니다.

사용하신 포크에는 이 제한이 선언되어 있지 않았기 때문에, openpilot이 계속 조향을 요청했고 실제 속도가 32 MPH를 넘는 순간 조향이 갑자기 다시 적용될 수 있었습니다.

해결 방법: hkg_085 또는 Donfyffe와 같은 v0.8.5 포크 대신 공식 HKG 2019 Kia Niro PHEV 지원/PR이 포함된 업스트림 openpilot 빌드를 사용하세요. 포크를 직접 유지 관리하는 경우 selfdrive/car/hyundai/interface.py에 차량을 추가하고, 2019 Niro PHEV에 대해 ret.minSteerSpeed = 14.0을 설정하여 기존 2019 Hyundai Ioniq 처리 방식과 동일하게 맞추세요. 이렇게 하면 openpilot이 EPS와 충돌하지 않고 임계값 전후에서 조향을 깔끔하게 억제하고 다시 활성화할 수 있습니다.

업그레이드하기 전까지는 정체 구간(stop-and-go)이나 속도가 32 MPH 부근을 오르내릴 수 있는 상황에서는 시스템을 사용하지 마시고, 언제든 수동으로 조향할 준비를 하세요. LKAS 오류 경고가 표시되지 않는 문제는 별도의 문제이며, 해당 문제가 발생한 주행 구간의 로그가 필요합니다.

원본 Issue #21479
문제 해결
왜 openpilot logmessaged는 dmonitoringmodeld와 같이 새로 시작된 프로세스의 첫 로그 메시지를 드롭하나요?

이것은 시작 순서에 따른 경합(race) 문제입니다. 프로세스들이 loggerd/logmessaged가 ZeroMQ subscriber를 연결하기 전에 초기 로그를 발행(publish)하므로, 이러한 초기 PUB 메시지는 폐기되며 복구할 수 없습니다.

해결 방법:
1. 다음 두 PR이 모두 포함된 버전으로 openpilot을 업데이트하세요:
- logmessaged: avoid dropping messages
- manager: start loggerd before other processes
2. 수동으로 백포팅하는 경우, selfdrive/manager/process_config.py를 편집하여 loggerd를 dmonitoringd, dmonitoringmodeld, modeld 및 시작 로그를 출력하는 다른 프로세스들보다 앞으로 이동하세요.
3. 다시 빌드하고 manager를 재시작하거나, 기기를 재부팅하세요:

cd /data/openpilot
   scons -j$(nproc)
   sudo reboot

4. 초기 로그가 이제 캡처되는지 확인하세요:
./selfdrive/debug/filter_log_message.py "" 0 | grep modeld

핵심 요구 사항은 클라이언트 프로세스가 로깅을 시작하기 전에 loggerd가 실행 중이고 구독(subscribe)된 상태여야 한다는 것입니다.

원본 Issue #29086