openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Steering torque units for Subaru DBC signals

Open martinl opened this issue 2 years ago • 9 comments

Find ratios for following signals (Nm units):

  • Driver steering torque: ["Steering_Torque"]['Steer_Torque_Sensor']
  • EPS steering torque: ["Steering_Torque"]['Steer_Torque_Output']

martinl avatar Apr 22 '22 05:04 martinl

analyzing SSM4 logs vs screen recording may provide some hints

martinl avatar Jun 02 '23 04:06 martinl

SSM4, in NM. Field is called "Torque Sensor Main" test In cabana: image

jnewb1 avatar Jun 07 '23 00:06 jnewb1

test image

jnewb1 avatar Jun 07 '23 00:06 jnewb1

Nice, can you get some numeric values so we can figure out the conversion formula for dbc

martinl avatar Jun 08 '23 03:06 martinl

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

jnewb1 avatar Jun 08 '23 03:06 jnewb1

test

test1.csv

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.

jnewb1 avatar Jun 09 '23 02:06 jnewb1

Thanks, I'll create opendbc and openpilot PR-s if you have not done it already

martinl avatar Jul 15 '23 19:07 martinl

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

martinl avatar Jul 18 '23 06:07 martinl

https://github.com/commaai/opendbc/pull/901

martinl avatar Jul 18 '23 06:07 martinl