Author Topic: Climber logic  (Read 2118 times)

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Climber logic
« on: February 04, 2017, 11:10:12 AM »
Just a note on climber software.

Our UI has a very simple definition - hold the button to climb, release and it stops climbing. On top of this we'll have an interlock to prevent climbing before the last 30 seconds and also stop the motor if we detect a motor stall.

The easy implementation here is to run the motor whenever we enter the teleop loop. But we also need to check to make sure the motor is not stalling. So we should check for stall BEFORE we turn on the motor - don't turn it on if it's stalling.

The other question is whether we should turn the motor back on if it has already been shut off due to stall. Do we want the motor to oscillate on/stall/off, on/stall/off, <repeat> ? I don't think we want this - not a good idea to stall the motor repeatedly. This means we need some history; you need a state machine of some sort.