commaai / commaai/opendbc

Safety - rapid torque reduction not blocked

Open
#2,399 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.4k
Forks
2.3k
Avg merge
3d 2h
Merged PRs (30d)
38

Description

### Panda Safety.

1. **Uncontrolled Rapid Torque Reduction**. Currently, `desired_torque` can drop from `.max_torque` to `0` and TX will not be blocked. Test: https://github.com/commaai/opendbc/pull/2398/files. In such scenario steering wheel will center itself which is not safe. - Ideally, when such violation is detected, the torque should be ramped down, not blocked.

2. **Misleading `.max_rate_down`**. Currently TX will be blocked only [when](https://github.com/commaai/opendbc/blob/be2e291f433549d52cb69cfed2b2c0c8b9635075/opendbc/safety/lateral.h#L18-L19) torque is unwinded with the rate **_below_** (not exceeding) the `.max_rate_down` - (when `torque_meas` or `torque_driver` limits are low).

Related:
https://github.com/commaai/opendbc/pull/3652

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the safety check in lateral.h referenced by the issue and inspect the test changes in pull request 2398. Trace how desired_torque, torque_meas, and torque_driver are handled during rapid reductions and rate checks. Done means the unsafe behavior is covered by tests and the intended TX blocking or ramp-down behavior is unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.