Repository navigation
Slimming down carState - #2499
adeebshihadeh wants to merge 4 commits into
Conversation
| # clutch (manual transmission only) | ||
| clutchPressed @28 :Bool; | ||
|
|
There was a problem hiding this comment.
is this used for USER_DISABLE?
There was a problem hiding this comment.
apparently not
(openpilot) 1 batman@workstation-adeeb2:~/fourpilot$ rg -i clutchpress selfdrive/
(openpilot) 1 batman@workstation-adeeb2:~/fourpilot$|
|
||
| # apply rate limits, curvature error limit, and clip to signal range | ||
| current_curvature = -CS.out.yawRate / max(CS.out.vEgoRaw, 0.1) | ||
| current_curvature = 0 # TODO: calculate from alternative source, yawRate deprecated |
There was a problem hiding this comment.
this is for the safety. just pull it from CS.yaw_rate
| # car speed | ||
| ret.vEgoRaw = cp.vl["BrakeSysFeatures"]["Veh_V_ActlBrk"] * CV.KPH_TO_MS | ||
| ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw) | ||
| ret.yawRate = cp.vl["Yaw_Data_FD1"]["VehYaw_W_Actl"] |
There was a problem hiding this comment.
self.yaw_rate = cp.vl["Yaw_Data_FD1"]["VehYaw_W_Actl"]
| # >100 degree/sec steering fault prevention (steeringRateDeg deprecated, disabling check) | ||
| self.steer_rate_counter, apply_steer_req = common_fault_avoidance(False, lat_active, |
There was a problem hiding this comment.
this is a huge downgrade...
|
I think it makes sense to start to remove unnecessary fields |
I'm good with these. Wheel speeds are obviously safety relevant, but we keep the important outcomes in the form of Weak preference to keep this. It's just a bool, and it'll be necessary later for a good OP long experience. Cars with ACC and MT tend to stay engaged for a few seconds while shifting, but we want to reject initial entry, and we'll want to freeze or even reset the gas/accel integrator. We're not doing these things yet, but I don't want to lose the prerequisite signals. Not stoked about losing convenient views of these, given their active use in safety/fault-mitigation in a few ports, but life would go on. Other fields
Other ideas
|
Removed for now. Easy enough to add back if necessary.
Potentially. There is a meaningful difference in that
So the qlogs were really just a bonus. It's more about separating the necessary vs the nice-to-haves, and at the very least, I think we need a different file if we want to bring back the nice-to-haves. |
|
Alright, pretty much done with the first pass at this. It's clear that there's lot more to do here on a per-port basis. Some examples:
|
Reasonable, and thanks for doing it standalone (#2510) so it's easy to cross that bridge when we come to it.
Been awhile, and haven't looked at all Honda, but for at least one example the wheel speed sensor signals all drop to zero below about 2mph or thereabout. Not usable for FtS/SnG purposes. It may be possible to discard the wheel speeds entirely and go with the single transmission output speed signal.
I like this idea, as a future-someday thing.
Stock ACC resume spam is conditioned on standstill (commaai/openpilot#24873) and VW don't like to be spammed with the drivetrain coordinator in the wrong state (commaai/openpilot#22176). Haven't checked other ports. |
The current car port backlog is untenable. While this isn't a magic bullet, I think the first step is to strip out anything that's not strictly necessary for openpilot. These fields may have become luxuries we can no longer afford.
Our API to the car is essentially
carstate.pyandcarcontroller.py, and the more we reduce that surface area, the easier porting, fingerprinting, and maintenance will be.@sshane @jyoung8607 Any thoughts? This is a fairly aggressive pass at
carState. As a side benefit, the smallercarStatemeans we can throw more of them in qlogs.