forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate zorropilot into master (#15)
* Use my own panda & cereal repos * 📏 Enable Toyota Distance Button to Change Distance Lines __Additions__ * Forward distance button presses to car can * Read distance_lines can message from car and use to set distance profile. * Alter T_Follow based on distance profile * Stock = 1.45 * Relaxed = 1.25 * Traffic ~= 1.05 (at low speeds closer to 1.25) * Adjust J_Cost, A_Change_Cost, and D_Cost based on distance profile * Weights for Costs need to be adjusted when T_Follow is decreased. __Tests__ * Add Longitudinal Tests for Additional Following Profiles * Copy the comma tests, with appropriate following distance for each profile. * Tweak Process_Replay Action - Ignores the new carState.distanceLines message, so that replay refs still pass. Thanks to sshane for help with this. See the tree ending with commit 73237de Repos cereal distance lines use zorropilot cereal repo wat * 🏎️ More Aggresive Start from Standstill Uses Dynamic MPC Costs which decreases the a_change and jerk costs at low speeds. Also dynamically decreases the Stop_Distance as the lead pulls away so that the long_mpc commands forward accel just a little bit sooner. Lower overall Stop_Distance slightly, since we stop a bit more assertively now with the decreased costs, the stop distance doesn't need to be as high. Add a test_accel file for testing sluggish starts. Ignore longitudinalPlan Msgs in Process Replay. Update long_mpc.py * 🔧 Tweak Toyota Long Tuning for My Tastes The Rav4 2019 TSS2 has ~1.4s lag between when accel commands are sent to the car and when they are acted upon when the car is starting from a dead stop. Stock feels fine with this limitation, so OP can too. Most of these changes are designed to fix any sluggishness caused by the Toyota Tune. Additional changes need to be made to the Long MPC in order to solve the sluggish start completely. Changes: Decrease vEgoStopping and vEgoStarting to 0.2. Car is perfectly capable of controlling at these speeds. Lower value allows for state machine to exit stopping phase just a bit faster. Double the ActuatorDelay lag to .3 so we look into the future just a bit more, seems a bit more inline with realworld experience. Halve stoppingDecelRate to match the OEM stop_accel of -.4m/s2. Makes the final jerk in stopping a bit smoother Increase the PID max accel to 1.8 m/s2 tappering back to 1.5 m/s2 at 5m/s. Increase planner max accel to 1.4 m/s2 from 1.2 m/s2 starting from a stop tapering back to 1.2 m/s2 at 10m/s. Decreased planner max accel at 55mph, seemed a little uncomfortable to me. Decrease A_Change Timescale in Long_MPC to match more closely what toyota lag is. Ignore some messages and fields in process_replay test in order to keep it working. * ⛽ Add Toggle to Enable Use of Gas Pedal While Openpilot is Engaged USE AT YOUR OWN RISK * 📄 Add Toggle to Enable Automatic Raw Log Uploading Brings back the raw log toggle that was used prior to version 8.12. Upload RLogs First then Videos This reverts in part commit 2e0c73f. * Update README.md Update README.md * bump submodules * interpolate for lower rate lateral plan interpolate for lower rate lateral plan fix should be correct now same convention as longcontrol.py * Update README.md * Try this ClockeNessMnstr@618386a * distance cost * Revert "interpolate for lower rate lateral plan" This reverts commit 5ef248d. * Squashed commit of the following: commit 8fc2566 Merge: 3168372 92e9823 Author: Ross Fisher <zorrobyte@gmail.com> Date: Sat Feb 19 13:49:13 2022 -0500 Merge branch 'master' into zorropilot commit 3168372 Author: Ross Fisher <zorrobyte@gmail.com> Date: Sat Feb 19 13:48:47 2022 -0500 Revert "interpolate for lower rate lateral plan" This reverts commit 5ef248d. commit 92e9823 Author: George Hotz <72895+geohot@users.noreply.github.com> Date: Fri Feb 18 20:15:20 2022 -0800 camerad: fast debayer on c2 cameras (commaai#23795) * fast debayer on c2 dcam * add casts * 128 local worksize on HDR debayer, 8 ms -> 3.5 ms * width instead of saving rgb_width Co-authored-by: Comma Device <device@comma.ai> * c3 no offsets * Revert "c3 no offsets" This reverts commit bde09b3. * Revert "Try this" This reverts commit 40f0781. Co-authored-by: Ross Fisher <zorrobyte@gmail.com> Co-authored-by: KRKeegan <kevin@krkeegan.com> Co-authored-by: Shane Smiskol <shane@smiskol.com>
- Loading branch information
1 parent
edc800f
commit ceb1cec
Showing
25 changed files
with
282 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,142 +1,10 @@ | ||
![](https://i.imgur.com/b0ZyIx5.jpg) | ||
This is my fork for my 2019 Rav4. Should be good for all TSS2, however, YMMV. | ||
|
||
Table of Contents | ||
======================= | ||
This adds: | ||
* TSS2 Distane Button with 3 profiles | ||
* More Aggresive Start from Standstill | ||
* Tweak Toyota Long Tuning for My Tastes | ||
* Add Toggle to Enable Use of Gas Pedal While Openpilot is Engaged | ||
* Add Toggle to Enable Automatic Raw Log and camera file Uploading | ||
|
||
* [What is openpilot?](#what-is-openpilot) | ||
* [Running in a car](#running-in-a-car) | ||
* [Running on PC](#running-on-pc) | ||
* [Community and Contributing](#community-and-contributing) | ||
* [User Data and comma Account](#user-data-and-comma-account) | ||
* [Safety and Testing](#safety-and-testing) | ||
* [Directory Structure](#directory-structure) | ||
* [Licensing](#licensing) | ||
|
||
--- | ||
|
||
What is openpilot? | ||
------ | ||
|
||
[openpilot](http://github.com/commaai/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](docs/CARS.md). In addition, while openpilot is engaged, a camera based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md). | ||
|
||
<table> | ||
<tr> | ||
<td><a href="https://youtu.be/NmBfgOanCyk" title="Video By Greer Viau"><img src="https://i.imgur.com/1w8c6d2.jpg"></a></td> | ||
<td><a href="https://youtu.be/VHKyqZ7t8Gw" title="Video By Logan LeGrand"><img src="https://i.imgur.com/LnBucik.jpg"></a></td> | ||
<td><a href="https://youtu.be/VxiR4iyBruo" title="Video By Charlie Kim"><img src="https://i.imgur.com/4Qoy48c.jpg"></a></td> | ||
<td><a href="https://youtu.be/-IkImTe1NYE" title="Video By Aragon"><img src="https://i.imgur.com/04VNzPf.jpg"></a></td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://youtu.be/iIUICQkdwFQ" title="Video By Logan LeGrand"><img src="https://i.imgur.com/b1LHQTy.jpg"></a></td> | ||
<td><a href="https://youtu.be/XOsa0FsVIsg" title="Video By PinoyDrives"><img src="https://i.imgur.com/6FG0Bd8.jpg"></a></td> | ||
<td><a href="https://youtu.be/bCwcJ98R_Xw" title="Video By JS"><img src="https://i.imgur.com/zO18CbW.jpg"></a></td> | ||
<td><a href="https://youtu.be/BQ0tF3MTyyc" title="Video By Tsai-Fi"><img src="https://i.imgur.com/eZzelq3.jpg"></a></td> | ||
</tr> | ||
</table> | ||
|
||
|
||
Running in a car | ||
------ | ||
|
||
To use openpilot in a car, you need four things | ||
* This software. It's free and available right here. | ||
* One of [the 150+ supported cars](docs/CARS.md). 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 supported device to run this software. This can be a [comma two](https://comma.ai/shop/products/two), [comma three](https://comma.ai/shop/products/three), or if you like to experiment, a [Ubuntu computer with webcams](https://github.com/commaai/openpilot/tree/master/tools/webcam). | ||
* A way to connect to your car. With a comma two or three, you need only a [car harness](https://comma.ai/shop/products/car-harness). With an EON Gold or PC, you also need a [black panda](https://comma.ai/shop/products/panda). | ||
|
||
We have detailed instructions for [how to install the device in a car](https://comma.ai/setup). | ||
|
||
Running on PC | ||
------ | ||
|
||
All of openpilot's services can run as normal on a PC, even without special hardware or a car. To develop or experiment with openpilot you can run openpilot on recorded or simulated data. | ||
|
||
With openpilot's tools you can plot logs, replay drives and watch the full-res camera streams. See [the tools README](tools/README.md) for more information. | ||
|
||
You can also run openpilot in simulation [with the CARLA simulator](tools/sim/README.md). 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. | ||
|
||
|
||
Community and Contributing | ||
------ | ||
|
||
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot). Bug fixes and new car ports are encouraged. Check out [the contributing docs](docs/CONTRIBUTING.md). | ||
|
||
Documentation related to openpilot development can be found on [docs.comma.ai](https://docs.comma.ai). Information about running openpilot (e.g. FAQ, fingerprinting, troubleshooting, custom forks, community hardware) should go on the [wiki](https://github.com/commaai/openpilot/wiki). | ||
|
||
You can add support for your car by following guides we have written for [Brand](https://blog.comma.ai/how-to-write-a-car-port-for-openpilot/) and [Model](https://blog.comma.ai/openpilot-port-guide-for-toyota-models/) ports. Generally, a car with adaptive cruise control and lane keep assist is a good candidate. [Join our Discord](https://discord.comma.ai) to discuss car ports: most car makes have a dedicated channel. | ||
|
||
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs/). | ||
|
||
And [follow us on Twitter](https://twitter.com/comma_ai). | ||
|
||
User Data and comma Account | ||
------ | ||
|
||
By default, openpilot uploads the driving data to our servers. You can also access your data through [comma connect](https://connect.comma.ai/). 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](https://comma.ai/privacy). 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](docs/SAFETY.md) for more details. | ||
* openpilot has software in the loop [tests](.github/workflows/selfdrive_tests.yaml) that run on every commit. | ||
* The code enforcing the safety model lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details. | ||
* panda has software in the loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety). | ||
* 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](https://github.com/commaai/panda/blob/master/Jenkinsfile). | ||
* 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 | ||
└── 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 | ||
├── camerad # Driver to capture images from the camera sensors | ||
├── car # Car specific code to read states and control actuators | ||
├── common # Shared C/C++ code for the daemons | ||
├── controls # Planning and controls | ||
├── debug # Tools to help you debug and do car ports | ||
├── locationd # Precise localization and vehicle parameter estimation | ||
├── logcatd # Android logcat as a service | ||
├── loggerd # Logger and uploader of car data | ||
├── modeld # Driving and monitoring model runners | ||
├── proclogd # Logs information from proc | ||
├── 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.** | ||
|
||
--- | ||
|
||
<img src="https://d1qb2nb5cznatu.cloudfront.net/startups/i/1061157-bc7e9bf3b246ece7322e6ffe653f6af8-medium_jpg.jpg?buster=1458363130" width="75"></img> <img src="https://cdn-images-1.medium.com/max/1600/1*C87EjxGeMPrkTuVRVWVg4w.png" width="225"></img> | ||
|
||
[![openpilot tests](https://github.com/commaai/openpilot/workflows/openpilot%20tests/badge.svg?event=push)](https://github.com/commaai/openpilot/actions) | ||
[![Total alerts](https://img.shields.io/lgtm/alerts/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/alerts/) | ||
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/context:python) | ||
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/commaai/openpilot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/commaai/openpilot/context:cpp) | ||
[![codecov](https://codecov.io/gh/commaai/openpilot/branch/master/graph/badge.svg)](https://codecov.io/gh/commaai/openpilot) | ||
Big thanks to https://github.com/krkeegan/openpilot |
Submodule cereal
updated
from 32eae5 to 5e1e60
Submodule laika_repo
updated
11 files
+1 −0 | .gitignore | |
+215 −167 | examples/Compute_station_pos.ipynb | |
+167 −152 | examples/Kalman.ipynb | |
+158 −198 | examples/Walkthrough.ipynb | |
+3 −3 | examples/kalman/helpers/__init__.py | |
+3 −3 | examples/kalman/kalman_helpers.py | |
+1,809 −1,820 | examples/laika_quality_check.html | |
+2 −2 | laika/gps_time.py | |
+6 −2 | laika/raw_gnss.py | |
+6 −6 | requirements_examples.txt | |
+1 −1 | tests/test_positioning.py |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.