commaai / commaai/opendbc

Tesla: car does not follow light braking command through DAS_control

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

Description

### Describe the car bug

Tesla sporadically does follow slight braking commands between -0.4 m/s^2 and 0.

The route c0fe59cc1ebbd1b3/00000005--052ecce665/380/390 shows this behavior:

Image

The car follows the deceleration command only after openpilot commands below -0.4 m/s^2 deceleration.

I suspect that this behavior is caused by create_longitudinal_command() in teslacan.py. Tesla longitudinal command uses an acceleration envelope and a set speed. As set speed teslacan.py uses the current speed minus the desired deceleration. For small deceleration this value differs too little from the current speed and the car does follow the desired deceleration.

### Provide a route where the issue occurs

c0fe59cc1ebbd1b3/00000005--052ecce665/380/390

### openpilot version

968fd3c989b993cf03187aa0e05cd2088e275551

### Additional info

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in teslacan.py at create_longitudinal_command() and compare its acceleration-envelope and set-speed handling for commands between -0.4 m/s^2 and 0. Reproduce the behavior using route c0fe59cc1ebbd1b3/00000005--052ecce665/380/390; done means the car follows the slight braking command without requiring a value below -0.4 m/s^2.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.