GithubHelp home page GithubHelp logo

neokii / op4 Goto Github PK

View Code? Open in Web Editor NEW
18.0 12.0 81.0 1.19 GB

License: MIT License

Python 16.17% Cap'n Proto 0.79% C 70.88% C++ 10.06% Cython 0.69% Makefile 0.13% Shell 0.15% Assembly 0.69% HTML 0.11% QML 0.01% MATLAB 0.33%

op4's Introduction

이 브랜치는 콤마3 전용입니다. 콤마2/이온 은 hkg_0814_c2 브랜치를 이용하세요.

This branch is comma3 only. For comma2/eon, use hkg_0814_c2.

This is based on xx979xx for Hyundai, Kia, Genesis.

https://github.com/xx979xx/openpilot

It is open source and inherits MIT license. By installing this software you accept all responsibility for anything that might occur while you use it. All contributors to this fork are not liable. Use at your own risk.


Table of Contents


What is openpilot?

openpilot is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of supported car makes, models, and model years. In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about the vehicle integration and limitations.

Running on a dedicated device in a car

To use openpilot in a car, you need four things

  • A supported device to run this software: a comma three.
  • This software. The setup procedure of the comma three allows the user to enter a URL for custom software. The URL, openpilot.comma.ai will install the release version of openpilot. To install openpilot master, you can use installer.comma.ai/commaai/master, and replacing commaai with another GitHub username can install a fork.
  • One of the 200+ supported cars. We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run openpilot.
  • A car harness to connect to your car.

We have detailed instructions for how to mount the device in a car.

Running on PC

All openpilot services can run as usual on a PC without requiring special hardware or a car. You can also run openpilot on recorded or simulated data to develop or experiment with openpilot.

With openpilot's tools, you can plot logs, replay drives, and watch the full-res camera streams. See the tools README for more information.

You can also run openpilot in simulation with the CARLA simulator. This allows openpilot to drive around a virtual car on your Ubuntu machine. The whole setup should only take a few minutes but does require a decent GPU.

A PC running openpilot can also control your vehicle if it is connected to a webcam, a black panda, and a harness.

Community and Contributing

openpilot is developed by comma and by users like you. We welcome both pull requests and issues on GitHub. Bug fixes and new car ports are encouraged. Check out the contributing docs.

Documentation related to openpilot development can be found on docs.comma.ai. Information about running openpilot (e.g. FAQ, fingerprinting, troubleshooting, custom forks, community hardware) should go on the wiki.

You can add support for your car by following guides we have written for Brand and Model ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. Join our Discord to discuss car ports: most car makes have a dedicated channel.

Want to get paid to work on openpilot? comma is hiring.

And follow us on Twitter.

User Data and comma Account

By default, openpilot uploads the driving data to our servers. You can also access your data through comma connect. We use your data to train better models and improve openpilot for everyone.

openpilot is open source software: the user is free to disable data collection if they wish to do so.

openpilot logs the road-facing cameras, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs. The driver-facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.

By using openpilot, you agree to our Privacy Policy. You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.

Safety and Testing

  • openpilot observes ISO26262 guidelines, see SAFETY.md for more details.
  • openpilot has software-in-the-loop tests that run on every commit.
  • The code enforcing the safety model lives in panda and is written in C, see code rigor for more details.
  • panda has software-in-the-loop safety tests.
  • Internally, we have a hardware-in-the-loop Jenkins test suite that builds and unit tests the various processes.
  • panda has additional hardware-in-the-loop tests.
  • We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.

Directory Structure

.
├── cereal              # The messaging spec and libs used for all logs
├── common              # Library like functionality we've developed here
├── docs                # Documentation
├── opendbc             # Files showing how to interpret data from cars
├── panda               # Code used to communicate on CAN
├── third_party         # External libraries
├── pyextra             # Extra python packages
└── system              # Generic services
    ├── camerad         # Driver to capture images from the camera sensors
    ├── clocksd         # Broadcasts current time
    ├── hardware        # Hardware abstraction classes
    ├── logcatd         # systemd journal as a service
    └── proclogd        # Logs information from /proc
└── selfdrive           # Code needed to drive the car
    ├── assets          # Fonts, images, and sounds for UI
    ├── athena          # Allows communication with the app
    ├── boardd          # Daemon to talk to the board
    ├── car             # Car specific code to read states and control actuators
    ├── controls        # Planning and controls
    ├── debug           # Tools to help you debug and do car ports
    ├── locationd       # Precise localization and vehicle parameter estimation
    ├── loggerd         # Logger and uploader of car data
    ├── manager         # Daemon that starts/stops all other daemons as needed
    ├── modeld          # Driving and monitoring model runners
    ├── monitoring      # Daemon to determine driver attention
    ├── navd            # Turn-by-turn navigation
    ├── sensord         # IMU interface code
    ├── test            # Unit tests, system tests, and a car simulator
    └── ui              # The UI

Licensing

openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.

Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.

THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED.


openpilot tests Total alerts Language grade: Python Language grade: C/C++ codecov

op4's People

Contributors

barghe avatar boxkon avatar chanhojung avatar crwusiz avatar janpoo6427 avatar jc01rho avatar leech2000 avatar neokii avatar tenesikorea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

op4's Issues

Turn signal & blind spot indicators

Neokii thanks for this fork, I really appreciate your work. Can you put back the turn signal indicators and blind spot monitor in openpilot paint.cc. Thanks

How do I change virtual set speed?

How can I change virtual set speed or change set speed? So I can update cruise set speed with speed limit from osm? What variable and file location? Scc_smoother.py?

Port Auto Speed limit from OPKR fork

The OPKR fork gets speed limit data from HKG built-in nav, not camera, which communicates this data on the can bus. The cluster on most HKG cars has a speed limit indicator on the cluster(Like Kia Stinger). The cluster gets this information from the can bus.
Neokii could you please port this feature to your fork as well as the speed limit offset? I gave it a wack but it's above my skill level, Although I'm learning more every day.
Thanks for all your hard and great work, I and the community appreciate it!
Thanks,
John

KIA K7

67: 8, 68: 8, 127: 8, 304: 8, 320: 8, 339: 8, 356: 4, 544: 8, 593: 8, 608: 8, 688: 5, 809: 8, 832: 8, 854: 7, 870: 7, 871: 8, 872: 8, 897: 8, 902: 8, 903: 8, 916: 8, 1040: 8, 1056: 8, 1057: 8, 1078: 4, 1107: 5, 1136: 8, 1151: 6, 1156: 8, 1168: 7, 1170: 8, 1173: 8, 1265: 4, 1280: 1, 1287: 4, 1290: 8, 1292: 8, 1294: 8, 1312: 8, 1322: 8, 1342: 6, 1345: 8, 1348: 8, 1363: 8, 1369: 8, 1371: 8, 1378: 4, 1384: 8, 1407: 8, 1419: 8, 1427: 6, 1444: 8, 1456: 4, 1470: 8

Auto resume bug

Every so often auto-resume fails in stop-and-go traffic.
2018 Kia Stinger with HKG Long.

Reverse screen

When the car is in reverse gear, the reverse screen does not align, its missing most of it.

Kia stinger HKG long bug

Kia stinger HKG long bug where 1 out of 10 times it will go to stop then accelerate even closer to bumper some times it gets within inches. Tune is good too just it gets inches away some times. Where the parking sensors go nuts.

Neokii!!!! Open Street Maps Integration Done!!!!, please add to SCC smoother. Slow for curves using map data works! but not speed limit adjust.

Open Street Maps Integration Done, please add to SCC smoother. Slow for curves using map data works! but not speed limit
UI looks very good with signs and everything!
Please check it out I know you can make it even better!
https://github.com/Circuit-Pro/openpilot/tree/OSM-DEV - Works!
https://github.com/Circuit-Pro/openpilot/tree/SPAS-OSM - Works!
https://github.com/move-fast/openpilot/tree/release_0.8.7 - Sources!

Genesis G90

Can error on 0.86 while selecting the car FP.
OP doesn’t recognize the car with out select the vehicle FP

Speed sync error with cruise control

When using long-press of the cruise control buttons, the MPH increases/decreases 5mph at a time. Using op4 0.8.9, the speed is rapidly reset to where it was before. Using short-press, you can change the speed 1mph at a time successfully.

Is there a workaround for this?

If you watch the below linked video you'll see the speed jump down 5mph at a time, and then rapidly count back up - the 5mph down at a time is me via buttons, the increase is automatic from OP.

https://youtu.be/0hcEauSaEn8

Sync set speed.. mode requires MAD mode enabled in 086

Previously, in 085, I was able to use "Sync set speed on gas pressed" without MAD mode enabled. This feature allowed me to press the gas peddle to increase the speed and disengage SCC (as normal) by pressing the break.

Did the change to 086 (op4/hkg_086_dev) require MAD mode enabled to allow this to work?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UPDATE 7/19/21: Upon further testing I noticed that when setting the speed for the first time I can continue to increase the gas peddle which DOES increase the set speed. As soon as I let off the peddle and re-engage the gas peddle the system disengages as described above

Add kia Stinger 2.0L new FW Finger Print to fix controlsd from crashing on my car

Circuit-Pro@cc1478d

CAR.STINGER: { (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00CK__ SCC F_CUP 1.00 1.01 96400-J5100 \xf1\xa01.01', b'\xf1\x00CK__ SCC F_CUP 1.00 1.03 96400-J5100 \xf1\xa01.03', ], (Ecu.engine, 0x7e0, None): [ b'\xf1\x81606DE051\x00\x00\x00\x00\x00\x00\x00\x00', b'\xf1\x81640E0051\x00\x00\x00\x00\x00\x00\x00\x00', b'\xf1\x82CKJN3TMSDE0B\x00\x00\x00\x00', b'\xf1\x82CKKN3TMD_H0A\x00\x00\x00\x00', ], (Ecu.eps, 0x7d4, None): [ b'\xf1\x00CK MDPS R 1.00 1.04 57700-J5200 4C2CL104', b'\xf1\x00CK MDPS R 1.00 1.04 57700-J5220 4C2VL104', b'\xf1\x00CK MDPS R 1.00 1.04 57700-J5420 4C4VL104', b'\xf1\x00CK MDPS R 1.00 1.06 57700-J5420 4C4VL106', ], (Ecu.fwdCamera, 0x7c4, None): [ b'\xf1\x00CK MFC AT USA LHD 1.00 1.03 95740-J5000 170822', b'\xf1\x00CK MFC AT USA LHD 1.00 1.04 95740-J5000 180504', ], (Ecu.transmission, 0x7e1, None): [ b'\xf1\x87VCJLE17622572DK0vd6D\x99\x98y\x97vwVffUfvfC%CuT&Dx\x87o\xff{\x1c\xf1\x81E21\x00\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 E21\x00\x00\x00\x00\x00\x00\x00SCK0T33NB0\x88\xa2\xe6\xf0', b'\xf1\x87VDHLG17000192DK2xdFffT\xa5VUD$DwT\x86wveVeeD&T\x99\xba\x8f\xff\xcc\x99\xf1\x81E21\x00\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 E21\x00\x00\x00\x00\x00\x00\x00SCK0T33NB0\x88\xa2\xe6\xf0', b'\xf1\x87VDHLG17000192DK2xdFffT\xa5VUD$DwT\x86wveVeeD&T\x99\xba\x8f\xff\xcc\x99\xf1\x89E21\x00\x00\x00\x00\x00\x00\x00\xf1\x82SCK0T33NB0', b'\xf1\x87VDHLG17034412DK2vD6DfVvVTD$D\x99w\x88\x98EDEDeT6DgfO\xff\xc3=\xf1\x81E21\x00\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 E21\x00\x00\x00\x00\x00\x00\x00SCK0T33NB0\x88\xa2\xe6\xf0', b'\xf1\x87VDHLG17118862DK2\x8awWwgu\x96wVfUVwv\x97xWvfvUTGTx\x87o\xff\xc9\xed\xf1\x81E21\x00\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 E21\x00\x00\x00\x00\x00\x00\x00SCK0T33NB0\x88\xa2\xe6\xf0', b'\xf1\x87VDKLJ18675252DK6\x89vhgwwwwveVU\x88w\x87w\x99vgf\x97vXfgw_\xff\xc2\xfb\xf1\x89E25\x00\x00\x00\x00\x00\x00\x00\xf1\x82TCK0T33NB2', b'\xf1\x87WAJTE17552812CH4vfFffvfVeT5DwvvVVdFeegeg\x88\x88o\xff\x1a]\xf1\x81E21\x00\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 E21\x00\x00\x00\x00\x00\x00\x00TCK2T20NB1\x19\xd2\x00\x94', ], },

CAN Error: Check Connections

Connections are fine but the device gives the error listed above. The device is getting information from my car such as the brakes, so I know it is communication on some level, but I cannot engage OP.

Cancel lane change on detection of car mid lane change

Op currently doesn't cancle the lanechange if a car pops up in blindspot after lane change has started and it's a struggle to fight the steering wheel let's add a feature to cancle lane change if car suddenly pops up in blindspot.

2018 kia stinger SCC KPH bug

Hi, my 2018 Kia Stinger is experiencing this weird issue where op thinks the SCC set speed is in KPH. For example, I have too set SCC to 96 mph to go 60MPH.
In the 2 pictures, you can see that 34 mph is 54kph and 47 mph is 75 kph.
Not really sure how to fix it but, I love your fork and work!
https://linksharing.samsungcloud.com/tRkMsyaZXPQ0
Thanks for your help in advance!
20210508_050911
20210508_051531

Hyundai Kona EV 2019

When engaging open pilot, the car gives an
error message to check the forward collision sensor. And gives a few orange error symbols on the car dashboard. (see attached image)

Device: Comma 2

Car make/model: HYUNDAI KONA EV 2019

I use oricalworks without radar harness

108501396-8325c300-72b1-11eb-950f-0e247f42994f

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.