Code Monkey home page Code Monkey logo

sshane / openpilot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from commaai/openpilot

220.0 220.0 88.0 2.34 GB

DOES NOT SUPPORT COMMA 3X - Stock Additions (0.8.14): 3/automatic following distance profiles, customizable fork params with opEdit, and a smoother longitudinal experience for TSS2 Toyotas

License: MIT License

Makefile 0.58% C 15.96% Python 53.46% Shell 0.87% C++ 26.73% HTML 0.30% Emacs Lisp 0.01% Cython 0.94% MATLAB 0.90% Kaitai Struct 0.21% QML 0.03% Dockerfile 0.03%

openpilot's People

Contributors

adeebshihadeh avatar arne182 avatar avolmensky avatar briskspirit avatar csouers avatar cydia2020 avatar deanlee avatar efinilan avatar erichmoraga avatar geohot avatar gregjhogan avatar grekiki2 avatar haraschax avatar hewers avatar iejmac avatar jafaral avatar jwooning avatar jyoung8607 avatar martinl avatar mitchellgoffpc avatar nuwandavek avatar pd0wm avatar rbiasini avatar robbederks avatar sshane avatar sunnyhaibin avatar tecandrew avatar vanillagorillaa avatar virtuallychris avatar zwx1616 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openpilot's Issues

vw j533 integration

Hi this fork doesnt work on VAG group cars that have their panda integrated at J533, any chance you could merge the code from Dragon pilot or Jyoung Repo that enables J533 integration for VAG group cars.

looking fwd to trying your fork soon.

Put back red speed when braking

In sa_additions we had the speed turn red when braking, In the latest releases of sa_master it dropped out please put it back.

Thank you

Request to add finger print for 2021 Highlander

Under:
CAR.HIGHLANDER_TSS2: {
(Ecu.eps, 0x7a1, None): [
b'8965B48241\x00\x00\x00\x00\x00\x00',
b'8965B48310\x00\x00\x00\x00\x00\x00',
],
(Ecu.esp, 0x7b0, None): [
b'\x01F15260E051\x00\x00\x00\x00\x00\x00',
b'\x01F15260E110\x00\x00\x00\x00\x00\x00',
],
(Ecu.engine, 0x700, None): [

Can you please add:

b'\x01896630EB2200\x00\x00\x00\x00',

This is the fingerprint for my car.

Auto tune kf while driving

Use something like zorro's old curvature learner idea where it accumulates error and slowly adjusts kf until it's optimal. Either by adjusting a value slowly, or accumulating data and estimating from that

Stock Additions To-dos

  • Remove startup df alert
  • Add comment to version.py
  • Clean up dynamic follow and dynamic gas
  • Clean up dfManager and code that lies in controlsd
  • Live laneless toggle
  • Quick settings page
  • Camera offset slider
  • show latest commit msg
  • fix button window touch pass through for map

Better acceleration adaptability when driving on slight to moderate hills

When driving my 18 Honda Odyssey with a Comma Pedal, going downhill the system will brake after going 2-4 MPH over the set speed. When the vehicle goes to climb the next hill the it will wait to accelerate hard enough until it has dropped at times 5 MPH under the speed limit. You have a situation where it will brake downhill and lag acceleration going uphill

use_lqr True causes red screen of panic on 2021 Toyota RAV4 Hybrid

Comma 2 hardware running Stock Additions Update 3 (0.8.2) fork malfunctions when use_lqr toggle is set to True on 2021 Toyota RAV4 Hybrid. When enabling cruise control, the car's dash beeps and shows "CruiseControl Malfunction" error message and the Comma screen turns red with "TAKE CONTROL IMMEDIATELY - Controls Unresponsive" message showing while panic sound plays loud over the built in speaker.

Setting use_lqr to false returns normal operation. Also, use_lqr true is no problem when rav4TSS2_use_indi is also true, maybe because rav4TSS2_use_indi overrides use_lqr?

See it in action here:
https://youtu.be/2CJgXPmFHU0

ZSS Safety Fallback

Any chance we could have ZSS safety check added to this branch like on Erich's?

C2 has to boot up after less than 24 hours

Stock Openpilot keeps the C2 powered for over 24 hours which has not caused any issues with the Prius 12V battery. This fork more aggressively shuts down the C2 in far less than the 36-ish hours that stock OP does. This makes running this fork a real hassle because I have to wait for the C2 to boot up. Can we get an OP EDIT setting to go back to stock behavior for power management?

Manager failed to start - Syntax errors in values.py

I came out to the car today and found this error. It comes back on every reboot.
20200826_115849

I edited the file, there was a missing comma at the end of the line before that.

Then, on reboot, I got the following error:
20200826_125007

Not sure what is messing up the values.py

Idea: Eco Mode

It’s easier on acceleration. But concern would be hills. Something like max 25% throttle.

SA-master todos

Todo list for https://github.com/sshane/openpilot/tree/SA-master

  • Allow comments in files_release
  • Build release branch?
  • Model MPC for e2e button?
  • Do UI
  • Remove custom longitudinal delay code, use the one in stock!
  • Ensure dirty stays stock, but create sa_dirty or similar for personal Sentry
  • Clean up added controlsd code
  • Clean up changes around openpilot now in stock
  • Revert longcontrol and PID to stock and rethink/retune
  • Make sure camera_offset is correct for C3
  • Fix version in title bar

op_edit errors on comma three

Loaded SA-master on 8/23/2021 around 10:30am Eastern time
Tried running op_edit and got the following...

ccomma@tici:/data/openpilot$ python op_edit.py
Traceback (most recent call last):
File "op_edit.py", line 3, in
from common.op_params import opParams
File "/data/openpilot/common/op_params.py", line 7, in
from selfdrive.hardware import TICI
File "/data/openpilot/selfdrive/hardware/init.py", line 5, in
from selfdrive.hardware.eon.hardware import Android
File "/data/openpilot/selfdrive/hardware/eon/hardware.py", line 10, in
from cereal import log
ImportError: cannot import name 'log' from 'cereal' (unknown location)
comma@tici:/data/openpilot$

Then I tried it with sudo and got the following:
comma@tici:/data/openpilot$ sudo python op_edit.py
File "op_edit.py", line 237
print(msg, flush=True, end='\n' + end)
^
SyntaxError: invalid syntax

Detect TSS2 and set distance button param

So that on the next restart, functionality is automatically enabled for supported cars. Or alternatively make it a carParam that UI can read it after car fingerprint so we don't need to restart

Optionally support cars with supported SDSU

Feature Request - Decrease Amount of Idle Time

Shane, any interest in adjusting the amount of time that the C2 remains on after the car is turned off? I have previously used Erich's suggested changes to board.cc which change the time to 5 hours and move the battery voltages up by about .5 a volt?

I ask, because I just killed the battery on my Rav4 hybrid. Part of it was my fault, I moved the car a few times over the last week without letting it run for very long.

Anyways, I completely understand if this isn't what you want in you fork, I can go back to making the changes manually.

Quick Sound button

Have a Speaker icon revealed when full road interface (sidebar) is showing. Speaker icon is actually a toggle that lowers all OP sounds temporarily. Great for sleeping or tired passengers in a well-insulated car.

Why? I want to be able to test new OP builds or settings and not startle tired or older passengers (read: the in-laws).

Optional, possibly dangerous idea: Settings can store a custom volume (0% - 99%) so that the speaker icon can also be used to temporarily mute sounds.

I used to use DragonPilot and the custom sound setting there is what I really miss!

New op_edit for Max GAS allow

Stock OP would behave varies on different cars, but I know most cars has the long control issues.

One of my suggestion is to add a new op_edit option, which will limit the MAX Gas would allowed under any situation.
100% is full gas, 50% is half.

This would improve the OP experience with a lot smoother long control.

HTTP Error 400 when trying to pair with Connect

Hi there,

I've been using Stock Additions for a couple months without issues on my '19 Prius (comma two purchased new in late April or early May).
This past weekend, however, Connect has started to show as Offline with a yellow indicator on data (Connect comes back online only on WiFi).
Also, my device has been unpaired from my account and will not repair using the app, resulting in an HTTP 400 error code when scanning the QR code.
Are there any thoughts as to why this has stopped working suddenly?
I would like to try anything I can while on SA before switching to stock (since switching takes some time).

Thank you!

Feature Request: Turn off screen when driving

A feature that has me always running back to Dragonpilot is having the screen turn off after 30 seconds of inactivity (no user input or active alerts), even when driving. My EON has an annoying issue where it slowly drains the battery while engaged and the path indicator screen showing (about -1% every 5 minutes or so). It also quietly dodges the California device mounting requirement (dashboard, center console, or in the left lower corner of the front windshield).

Not to break when gas override is done

I got a thing that would improve driving alot.

When gas is overriding and vehicle reaches faster speed than set speed, gas release will cause OP to apply a little break to decrease speed to SET.

This is different from TOYOTA stock setting, that will let the car just slide/coast. I do prefer stock behavior for smoother driving.

FYR
BEST WISHES!

Pre Collision Malfunction on 21' Toyota Highlander after using update button on Comma2 with SA installed

I been using SA for the past few days on a 21' Highlander, it wasn't working prior to the LKA fix that was merged into SA.

I got it working with intermittent issues when turning on the device after starting the car, but if Open Pilot was running and then I started the car it was working fine.

What I noticed was that after that update button was pressed, which I did over cellular, it would always give me this Pre Collisions malfunctions that I was unable to get rid of.

Velocity and Acceleration Error Integrator is Not Used in Dynamic Follow

v_rel_dist_factor = self.dmc_v_rel.update(self.lead_data.v_lead - self.car_data.v_ego)
a_lead_dist_factor = self.dmc_a_rel.update(self.lead_data.a_lead - self.car_data.a_ego)
TR = interp(self.car_data.v_ego, x_vel, y_dist)
TR *= v_rel_dist_factor
TR *= a_lead_dist_factor
if self.car_data.v_ego > self.sng_speed: # keep sng distance until we're above sng speed again
self.sng = False
if (self.car_data.v_ego >= self.sng_speed or self.df_data.v_egos[0]['v_ego'] >= self.car_data.v_ego) and not self.sng:
# if above 15 mph OR we're decelerating to a stop, keep shorter TR. when we reaccelerate, use sng_TR and slowly decrease
TR = interp(self.car_data.v_ego, x_vel, y_dist)
else: # this allows us to get closer to the lead car when stopping, while being able to have smooth stop and go when reaccelerating
self.sng = True
x = [self.sng_speed * 0.7, self.sng_speed] # decrease TR between 12.6 and 18 mph from 1.8s to defined TR above at 18mph while accelerating
y = [self.sng_TR, interp(self.sng_speed, x_vel, y_dist)]
TR = interp(self.car_data.v_ego, x, y)
return float(clip(TR, self.min_TR, 2.7))

I noticed that the upcoming Openpilot release has redesigned the Long MPC. So I was looking through the dynamic follow code to try and understand if it would need to be adjusted for the new design.

In the process, I found the above. It looks like you created essentially an integrator for Vel and Acc error and the code uses that to modify the TR distance in lines 294 & 295. Decreasing the TR time for acceleration and increasing for deceleration. However, the code throws all this work away in the stop and go logic that starts on 300. TR gets set to a new value on either line 302 or 307 ignoring any prior calculations you made.

I am sure the code is a lot to maintain with everything else you have going on. I just wanted to point this out in case it had been overlooked.

Openpilot boots to a black screen

EON old school HTC one. EON updated recently to OP .10 worked briefly. Phone (EON) boots and goes to the comma boot screen. after the comma icon, the screen goes completely black. EON non responsive except for pushing the power button which pops up the shut down and restart options. EON does not communicate with car ('16 civic) white panda and giraffe.

Disable Charging Timer Not Initialized Until Ignition

I have a RAV4 Hybrid with a tiny 12v battery. I have had a few instances of a completely dead battery, even after setting the disable_charging parameter to 8 hours. To debug things I used a trickle charger and I think I finally caught the issue. It seems that after a reboot, the disable_charging parameter is ignored or the timer is not started. This is fixed when the ignition goes to on. If you reboot the C2 with the car off and don't turn the car on, the device will stay on for days maybe forever.

In my case, I believe the issue was caused by automatic updates. The device must have updated after the car was off, and then rebooted and sat on for days. If the device is off, and is triggered to turn on when the car starts, everything seems to work fine.

I don't know if this is something that can be fixed in your fork, or if this is a glitch from the comma master. But you may want to consider adding an extra note to the documentation or the disable_charging op_edit param.

Support for kia hyundai op long?

Hi I have op long working on my kia stinger using this fork and moving my radar onto can bus 1 using a harness is there anyway you can add the kia stinger Long control with scc harness to your fork. Your work on the adaptive cruise distance is really awesome. If you have a zelle id donate
https://github.com/oricalworks/openpilot

Create a button on GUI for a loop acc_type1

Would it be possible to create a button on the home screen? To send the message can acc_type1? Where when you touch the button a loop starts and for only after about 3 seconds or the engine is turned on?

CAN ERROR: Check Connection

I have a 2020 sonata. The normal comma.ai works fine, tried installing this and I get that error. Cables and connections are good. Any advice?

Comma 2 - Prius Prime 2020 - Panda not sensed

Describe the bug
I just bought Comma 2 and tested for few days with stock release. Then I installed sshane / openpilot but it couldn't sense panda.

How to reproduce or log data

Device/Version information (please complete the following information):

  • Device: [e.g. EON/EON Gold/comma two]
  • Dongle ID: [e.g. 77611a1fac303767, can be found in Settings -> Device -> Dongle ID or my.comma.ai/useradmin]
  • Route: [e.g. 77611a1fac303767|2020-05-11--16-37-07, can be found in my.comma.ai/useradmin]
  • Timestamp: [When in the route the bug occurs (e.g. 4min 30s into the drive)]
  • Version: [commit hash when on a non-release branch, or version number when on devel or release2 (e.g. 0.7.6)]
  • Car make/model: [e.g. Toyota Prius 2016]

Additional context

Dynamic camera offset causing significant ping-pong

On a two-lane road, the car (2018 Prius Prime Advanced), would move over when oncoming traffic was there as expected. There was a lot of oncoming traffic with significant gaps between the groups of cars. When the car should have returned to the mid-lane path, it would over compensate then would bounce back and forth until there was no oncoming traffic.
I believe this is a segment showing it: 2eacef693c0640f9|2020-08-11--16-40-07--6

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.