This commit is contained in:
Your Name
2024-05-14 03:17:23 -05:00
parent 9404ae4f1f
commit 6efe858dfc
28 changed files with 601 additions and 32 deletions

8
openpilot/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"files.exclude": {
"third_party": true
},
"search.exclude": {
"third_party": true
}
}

View File

@@ -0,0 +1,34 @@
- disable changing lanes notices (tiny indicator is fine)
- speed limit display / over speed display
- hack the buttons so we can press them
- auto set speed limit
- conditional experimenal mode
- auto set hvac
- fix gps data
- disable cc on start if already enabled
- chirp on stoplight
- resume when lead moving away
- hold down button to turn off screen, remember setting
- package up lateral pause lane change feature for merge into frogpilot
- bluetooth dummy device
- dash cam
- put dev logo in repo
- better detection of if logo is installed even without it generated (md5 in persistant dirs?)
- define forced settings
- define default settings
- update dash symbols logic
- fix webview
- write hello world new settings menu
- new settings for turn assist - no turn assist, or disable lateral when turn started
- new setting for always on lateral - reduced torque when cruise off and hands on wheel
- show wheel icon on display when hands on wheel
- event log - things like 'engaged op', 'lane change', etc.
- these events get fed to clearpilot event automator (state machine)
- record timestamp

View File

@@ -0,0 +1,85 @@
Goals:
Tasks:
Buttons:
- Cruise: Standard
- Up: If below limit, set speed to limit, else std
- Stop / Res: Standard
- Down: If above limit, set speed to limit, else std
- Distance: Std
Primary:
- Vastly simplified and opinionated settings
- - force stock long
- Privledged mode for specifically enabled dongles
- - option for relaxed babysitter / no babysitter (privledged)
- - Light warning at 6 seconds / Loud at 12, relaxed model light 15 / Loud 25
- -
- - Override if hands on wheel
- change dash icon statuses to be more useful
- test canbus capture
- capture buttons, car inputs
- custom button press emulation
- custom experimental mode emulation
- disable all lane change stuff except pause lat on turn signal under 30
- disable all non alert sounds, force alert sounds on
- fix cruise control engage so it still activates always on lat even when breaking
- ideally it fakes the cruise hud as well, and activates cruise when brakes released
- System for abstracting out automation events so it can be ported to other car types
- On screen speed limit should show current virtual set speed
- Conditionally display speed limit when out of range of speed limit
- Speed green when set to speed limit
- Increase speed up to 2 mph w lead and set to speed limit
Canbus goals:
- Detect if HVAC on
- Set hvac auto
- Detect if sunroof open
- Set sunroof closed
- Button spam cruise
- Auto resume from stop
- Get dash speed limit
- Set drive mode to 'smart'
- Radar based distance to lead (compare value to vision)
Maybe not possible but nice to have:
- change dash info display to mph
Secondary:
- auto enable ssh
- stealth mode (screen off)
- Custom icon, overridable
- dash cam feature
- warn on red light
- warn on green light
- weather report on idle
- resume when lead car driving away on cruise
- capture hyundai speed limit correctly
- auto cruise control speed setting (press button to change speed, obvious indicator speed is wrong)
- UI changes - more obvious when engaged / always on lat / conditional / off for passengers
Stretch goals:
- port to GM
- Here maps API for location (cache location)
- Here maps API for traffic - warn if heavy traffic
- Auto set dash display to MPH
- Auto set smart drive mode
- Detect or ideally close sunroof on off
- Auto enter carplay on boot
- Weather report on steering star button
Release notes inre safety:
- Dont ever fully disengage openpilot but if the user hits termination threshold, force
user to use wheel with lots of bitching until they stop and restart
- Allow user to enter a url that can go to a dockerized instance of a clearpilot managment server.
The server allows for:
- Tracking of current location
- Tracking of route history
- Customize logo
- Reverse ssh
- Execute scripts on start (this is where people can hack the safety file)

View File

@@ -0,0 +1,137 @@
- test that lkas button crashes controlsd, it should
- test that lkas button creates an alert, it should
- hyundai clsc https://github.com/garrettpall/openpilot/commit/5528198aa73d3d017d16ec4ca38306b11e5da0a8
- test tools/replay to get UI working offline
- add debug elements to ui with a boolean at top of onroad.cc to enable/disable:
- curviture
- current speed limit
- current cruise speed
- current experimental mode speed
- current distance to lead based on radar
- current distance to lead based on model draw distance
- current speed of lead
- make side lanes 10% wider and the disengage mode 10% brighter
- make 25% of side lanes 50% darker than base
- hello world alert triggered by lkas btn
- hello world bootstrap dashboard
- button stuff:
- read paddle left (for full nudgeless lane change + blinker, reset to drive)
- read paddle right ("")
- read current drive mode, reset paddle mode to drive
- write pause, res, accel, mode, drive
wishlist: read / write info switcher, hvac, windows
wishlist: allow lane assist (not lane keep) on disengage
test:
- disable all canbus
- set speed limit during stock long
OP -> Oscar
- oscar - global clearpilot state var
- oscar.cs - clearpilot car state (populated by op variables for cp.planner)
- oscar.ce - clearpilot car event queue (array that can be pushed to from car)
- oscar.ceh - event queue history (for debug)
- oscar.clog - error and console.log style one off messages to transmit to logs or watching consoles
Oscar -> OP
- oscar.ps - clearpilot planner state (data from cp)
- oscar.pe - clearpilot planner event (one time events from planner to be processed by openpilot)
- oscar.peh - planner event history (for debug)
- oscar.plog - retransmits clog as well as additional data for UI based log consoles
- oscar - clearpilot's planner - nodejs process that synchronizes state between all processes and makes decisions
- settings menu
- - branch selector - release, stage, dev. Stage is my personal release branch. Should always be able to easilly switch to stage while im in a development state.
- unfuck the directory structure. new structure:
-
-------
- make functions
--- get_curvature
--- get_wheel_angle
--- get_distance_to_left_lane
--- get_distance_to_right_lane
--- are hands on wheel
--- distance traveled for lane change
--- distance to lead
- put these on a debug.
- Design alternate settings webview
- get speed limit display working
- get calculated experimental speed display working
- get button press emulation working
- get experimental mode working
- get speed limit set working
- dev enable lateral on blinker but no wheel pressure or no wheel presence
- bluetooth dummy device
- Test if activation fix works for op long, submit to frog maintain
- (test) disable all turn signal output commands - they are causing issues
- test "create_acc_cancel" on canfd on cc engaged on boot
- Create clearpilot process. manages behaviors.
- experiment with reduced jerk values
- test toggle stop all canbus output
- check if acc_cancel events are being made on idle in stock long, if so, its a bug.
- Warn if significantly slower traffic
behaviors:
- lane change wrong way reenable lateral
- blinker signal wheel angle minor enable lateral
- wheel angle sharp only engage lateral if over lane edge unless hands not on wheel
- no lateral on turn signal - only enforce if model curvature > 10 degrees, hands on wheel, or wheel override (maybe curve not necessary?)
- debug mode activated bu lkas
- See where disk free is going with NCDU and add smarter log rotation
- Maybe this has logs where it could show what happened to frogpilot process?
- Test supress cruise icon on long paused
- increase center lane brightness 50% and make it blueish
- make drive mode color much brighter and 30% more white
- maintain lateral on icon on stop on dash
- prevent engagement if disengaged and brakes are applied, just enable lateral
- edit manager to log all stderr output
- find a way to disable all logging unless debug mode enabled (screen setting)
- set up dash cam recordings
- disable dash cam and record in real logger mode if debug mode is entered
- Integrate here maps api for traffic data
- maybe even speed limit data? and location data?
- write a debug function for python that cats data to a screen terminal and optionally a log file
- if cruise already engaged when boot, just enable lateral
- reengage lateral if changing lanes and changing the wrong way
- speed limit display / over speed display / trigger set
- hack the buttons so we can press them
- auto set speed limit
- conditional experimenal mode
- ui conditional experimental mode, orange lines, show large font of desired speed in lower left
- hold down button to turn off screen, remember setting
- bluetooth dummy device
- dash cam
- change disk used on sidebar to disk free / percent used
-
- warn if lead is going more than 30 under my speed or 20 if auto mode is off
- mark os version different than release, forcing a os reinstall
- no prompt on os reinstall
Test features wizard:
- read paddles
- read speed
- adjust speed
- cancel / resume
- reset drive mode
- read radar distance
- activate blinkers

View File

@@ -0,0 +1,10 @@
- Pause lateral on lane change
- Updated color scheme
- Updated boot / ready logo
- Go straight to settings from drive
- Show full screen splasn on offroad until tapped
- Updated LFA icons on dashboard
- Removed a lot of icons from UI
- Monitor never fully fatals
- Engage / Disengage sounds silenced
-

View File

@@ -0,0 +1,61 @@
Create a debug console. Its should log events like what buttons are pressed,
when OP starts, the fact NNFF is loaded, etc.
example of using stdin and stdout as a message buffer:
CHANGE PathEdgeWidth to 10 in defaults
selfdrive/manager/build.py
pandacan: pandacan is a user space library for talking to your car over USB or Wi-Fi from Python. It allows full read/write access to all the CAN and LIN buses. “pip install pandacan”
SocketCAN: SocketCAN is the Linux standard for CAN interfaces. The included driver allows panda to work with all SocketCAN tools, including can-utils and Wireshark.
SunnyPilot lfa btn:
class HyundaiFlagsSP(IntFlag):
SP_ENHANCED_SCC = 1
SP_CAN_LFA_BTN = 2
SP_NAV_MSG = 4
LFA_Pressed
188,47: self.lkas_enabled = cp.vl["BCM_PO_11"]["LFA_Pressed"]
Light blue colors
1:53 PM
Don't sulress cruise indicator
1:57 PM
Fix gps issue, also make gps notice less obnoxious like pay attention
2:00 PM
Suspend lateral if turn signal and nudged wheel - think this through
VAL_ 1144 DRIVE_MODE2 3 "Set Sport" 1 "Set Normal" 2 "Set Eco";
BO_ 1144 DRIVE_MODE: 8 XXX
SG_ DRIVE_MODE : 0|16@1+ (1,-61611) [0|61611] "" XXX
SG_ DRIVE_MODE2 : 28|3@1+ (1,0) [1|3] "" XXX
BO_ 1151 HVAC_TOUCH_BUTTONS: 8 XXX
SG_ AUTO_BUTTON : 8|1@0+ (1,0) [0|1] "" XXX
SG_ SYNC_BUTTON : 12|1@0+ (1,0) [0|1] "" XXX
SG_ FR_DEFROST_BUTTON : 20|1@0+ (1,0) [0|1] "" XXX
SG_ RR_DEFROST_BUTTON : 22|1@0+ (1,0) [0|1] "" XXX
SG_ FAN_SPEED_UP_BUTTON : 24|1@0+ (1,0) [0|1] "" XXX
SG_ FAN_SPEED_DOWN_BUTTON : 26|1@0+ (1,0) [0|1] "" XXX
SG_ AIR_DIRECTION_BUTTON : 28|1@0+ (1,0) [0|1] "" XXX
SG_ AC_BUTTON : 40|1@0+ (1,0) [0|1] "" XXX
SG_ DRIVER_ONLY_BUTTON : 44|1@0+ (1,0) [0|1] "" XXX
SG_ RECIRC_BUTTON : 48|1@0+ (1,0) [0|1] "" XXX
SG_ HEAT_BUTTON : 52|1@0+ (1,0) [0|1] "" XXX
BO_ 506 CLUSTER_SPEED_LIMIT: 32 XXX
SG_ SPEED_LIMIT_3 : 119|8@0+ (1,0) [0|255] "" XXX
SG_ SPEED_LIMIT_2 : 47|7@0+ (1,0) [0|255] "" XXX
SG_ SPEED_LIMIT_1 : 39|7@0+ (1,0) [0|255] "" XXX
SG_ SPEED_CHANGE_BLINKING : 129|1@1+ (1,0) [0|3] "" XXX
SG_ CHIME_2 : 122|2@1+ (1,0) [0|7] "" XXX
SG_ CHIME_1 : 133|1@0+ (1,0) [0|1] "" XXX
SG_ ARROW_DOWN : 120|1@0+ (1,0) [0|1] "" XXX
SG_ ARROW_UP : 121|1@0+ (1,0) [0|1] "" XXX
SG_ SECONDARY_LIMIT_1 : 79|8@0+ (1,0) [0|127] "" XXX
SG_ SECONDARY_LIMIT_2 : 103|8@0+ (1,0) [0|127] "" XXX
SG_ SCHOOL_ZONE : 155|1@0+ (1,0) [0|1] "" XXX

View File

@@ -0,0 +1,134 @@
Try cabana
https://github.com/commaai/openpilot/tree/master/tools/cabana
Today:
- Auto SSH
- Prelaunch shell
- Custom home screen UI
- Custom settings UI
- Canbus state debugger UI
- Can I get a web ui running?
Settings Design:
Main: Basic curated settings:
- Enable openpilot
- Enable dashcam
- Driving assist when cruise control not engaged
- Reduce speed on curves
- Hold speed for auto speed limit
- Speed limit offset
- Lane change assist on / off (off = pause on lane change)
- LKAS button behavior
- Reset all other settings to defaults
- Require steering wheel Always / At Night / Never
Driving:
- Openpilot - On (D), off (all stock)
- Lane Change Assist: None, No lateral, Nudge, Nudgeless
- Op Long / Button Spam Long / Stock Long
- Always On Lat: OP, Stock, Off. OP: Pause below X mph, OP: Except when wheel not turning
- Auto Stock Lat: Cruise Off + Wheel, Off
- Reduce speed on curves: On (D) / Off
- (V2) Hold speed on lane change: On / Off
- Auto Speed Offsets - (make display green when speed matches mph)
- Resume from stop on cruise: On (D) / Off
- Increase Speed with lead when Auto
- Speed up / down - toggle match speed to limit
- LKAS button behavior tap / hold
- screen on / off
- cycle info screens
- extended info overlay on/off
Display:
- Display - On, On when engaged, Wireframe with passenger, Off with passenger, Off
- Engagement indicator: Border, small label, icon
- Parked: Weather, trip stats / map, static image, off
- Boot Icon: Comma, clearpilot, pacman, car make, custom, off'
- Info in overlay or large status bar
- Info screens (enable in transit, stopped):
- Colors for lines on display
--- Settings: Hold time (time to reset), default screen
--- Weather (hourly forecast, radar)
--- World map
--- Drive info (curvature, speed, speed to lead, etc)
--- System info (temp, space, system load, connectivity)
--- Debug info (data read from canbus, button states)
--- Generic logo
--- Screen off
Safety & Alerts:
- Attention Monitor: Strict, (D) Relaxed Daytime / No Lead / Low Traffic, Relaxed (Privledged), Off (Privledged)
- ATN: Strict on unrecognized driver
- ATN: Off on using wheel
- Require Wheel - Always, At Night, Never
- Wheel: Always on unrecognized driver
- Lane Departure Warning
- Stoplight / Stopsign Warning
- Go Warning
- Lead Departure Warning
- Over Speed Warning
- Slow Traffic Warning (set mph triggered, default 25 difference)
- Weather alerts
- Enable / Disable UI elements
--- MPH
--- Location
--- GPS, Wifi connectivity on
--- GPS, Wifi connectivity off
--- Experimental MPH
--- Distance to lead
--- Speed for lead
--- Current speed limit
Car:
- Auto set climate
- Auto close sunroof / windows
- Auto open sunroof shield night / close day
- Auto set "SMART"
- Auto set UI MPH
Recording:
- Record routes
- Record dashcam
- Show dashcam recording blinking
- Record passenger camera (requires blinking)
- Record passenger audio (requires mic, requires notice)
- Serve on wifi
- Upload on wifi
System:
- (V2) Enable OpenPilot - Always, on recognized driver, off
- (V2) Register recognized driver (requires a bt dongle)
- (V2) Settings lockout pin
- (V2) Metered Wifi Network
- (V2) High BW Wifi Network
- (V2) Hotspot (select secondary wifi)
- Clearpilot base (set a url / access token for server control)
--- Provides:
--- Settings backup / restore
--- Settings lockout
--- File overrides (beat the monitor)
--- Current location / image
--- Dashcam recordings
--- Route history
--- SSH tunnel
--- Debugger console
- Wifi Settings
-- No bandwidth limit networks
-- Bandwidth limited networks
-- Hotspot device / network (requires external dongle)
- Bluetooth setting (requires external dongle)
-- Pair a keypad
-- Emulate a device for tasker automations
- SSH Access (get rid of the github model)
- Device Shutdown Timer
- Override temp warnings
Tools:
- Reset calibration
- Update software
- Switch branches
- Reboot clearpilot
- Reset clearpilot
- Uninstall clearpilot
- Canbus tools
- Record Canbus
- Show I/O State (overrides driving UI while engaged)
- Test Output
- Test OP Canbus functionality (blinkers, disengage, etc)
Advanced:
- Selected frogpilot settings

View File

@@ -0,0 +1,16 @@
Dev:
- New behavior for lane change assist - when starting lane change, disable
lateral until .5 seconds after blinkers stop
- // Clearpilot allow leadInfo (test me)
Test:
- New colors for driving
- GPS works
Pass:
- All icons on main UI hidden
- Tap screen during drive goes to settings
- Boot goes to a splash page
- Startup message and NNFF controller messages supressed

1
openpilot/opendbc Symbolic link
View File

@@ -0,0 +1 @@
../opendbc/

1
openpilot/panda Symbolic link
View File

@@ -0,0 +1 @@
../panda/

View File