Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Input states is provided by centre_console and pedal CAN messages:

drive_output: (from centre_console)
  target_velocity: uint32_t (m/s)
  drive_state: uint8_t (DRIVE, NEUTRAL, REVERSE)
  cruise_control: uint8_t (bool)
  regen_braking: uint8_t(bool)
  precharge: uint8_t(unused)
pedal_output: (from pedal)
  throttle_output: float32 (0 to 1)
  brake_output: float32 (0 to 1)

The expected output is a can message to the wavesculptor from MCP2515

message_id: 0x01
  current: float32
  velocity: float32

Message Behaviour

Input state

Drive state

Expected

Notes

throttle 0, brake 0

regen off, cruise off

Drive/Reverse/Neutral

current 0

velocity 0

throttle >0, brake 0

regen off, cruise off

Drive

current [throttle_outputl]

velocity 20,000

Neutral

current 0

velocity 0

Reverse

current [throttle_outputl]

velocity -20,000

throttle any, brake >0

regen off, cruise off,

Drive/Reverse/Neutral

current 0

velocity 0

throttle 0, brake 0

regen on, cruise off

Drive/Reverse

current 1

velocity 0

Neutral

current 1

velocity 0

Should this be

current 0

velocity 0?

throttle >0, brake 0

regen on, cruise off

Drive

current [throttle_outputl]

velocity 20,000

Neutral

current 0

velocity 0

Reverse

current [throttle_outputl]

velocity -20,000

throttle any, brake >0

regen on, cruise off

Drive/Reverse

current 1

velocity 0

Neutral

current 1

velocity 0

throttle 0, brake 0

regen on, cruise on

Drive

current 1

velocity [target_velocity]

Neutral

current 1

velocity 0

Should this be

current 0

velocity 0?

Reverse

current 1

velocity 0

throttle >0, brake 0

regen on, cruise on

Drive

current [throttle_outputl]

velocity 20,000

Neutral

current 0

velocity 0

Reverse

current [throttle_output]

velocity -20,000

throttle any, brake >0

regen on, cruise on

Drive/Reverse

current 1

velocity 0

Neutral

current 1

velocity 0

throttle 0, brake 0

regen off, cruise on

Drive

current 1

velocity [target_velocity]

Neutral

current 0

velocity 0

Reverse

current 0

velocity 0

throttle >0, brake 0

regen off, cruise on

Drive

current [throttle_outputl]

velocity 20,000

Neutral

current 0

velocity 0

Reverse

current [throttle_outputl]

velocity -20,000

throttle any, brake >0

regen off, cruise on

Drive/Neutral/Reverse

current 0

velocity 0

Timing is ok

no watchdog timeouts with message every 100ms

output is ok

ooutgoing motor controller messages are ok, sent every 100ms

  • No labels