openpilot
openpilot copied to clipboard
Steering torque units for Subaru DBC signals
Find ratios for following signals (Nm units):
- Driver steering torque: ["Steering_Torque"]['Steer_Torque_Sensor']
- EPS steering torque: ["Steering_Torque"]['Steer_Torque_Output']
analyzing SSM4 logs vs screen recording may provide some hints
SSM4, in NM. Field is called "Torque Sensor Main"
In cabana:
Nice, can you get some numeric values so we can figure out the conversion formula for dbc
Nice, can you get some numeric values so we can figure out the conversion formula for dbc
Yea I’ll try and get a combined dataset with the can data and the ssm4 logs synced up
Here's a csv where i synced up the ssm4 data and the can data to the best of my ability. I'm not 100% sure if "Torque Sensor" in ssm4 is torque output or driver input, but it seemed to align better with our current "Torque Sensor" values in the dbc, which would give -0.012 as the factor.
Thanks, I'll create opendbc and openpilot PR-s if you have not done it already
Looks like EPS Steer_Torque_Output already has -10 scaling factor:
SG_ COUNTER : 8|4@1+ (1,0) [0|15] "" XXX
SG_ Steer_Torque_Output : 13|11@1- (-10,0) [0|255] "" XXX
SG_ Signal1 : 24|8@1+ (1,0) [0|511] "" XXX
- SG_ Steer_Torque_Sensor : 45|11@1- (-1,0) [0|255] "" XXX
+ SG_ Steer_Torque_Sensor : 45|11@1- (-0.012,0) [0|255] "Nm" XXX
SG_ Steering_Active : 61|1@0+ (1,0) [0|1] "" XXX
SG_ Steering_Disabled : 63|1@1+ (1,0) [0|1] "" XXX
https://github.com/commaai/opendbc/pull/901