Author Topic: Algorithm for climbing  (Read 5546 times)

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Algorithm for climbing
« on: January 27, 2016, 11:46:15 PM »
I talked to Anthony and Ed today to pick their brain. Here's how the climber will work. There are still some details to iron out but it's pretty complete.
  • Driver drives up onto Batter
  • Driver presses Auto-Climb button
  • Software locks out Auto-Climb button until last 20 seconds of match (safety feature)
  • Turn on sonar. If we are not within 24 inches  (?) of the tower, we are out of range. Turn off sonar, get out of Auto-Climb mode. This is also a safety feature and prevents the robot from activating the climber when we're way out of reach of the tower.
  • ASSUME - that the distance to the tower we're looking for is 12 inches +/- 0.25 inches. Actual margin will depend on the sensor we use. Actual distance will depend on where the sensor is mounted.
  • QUESTION - can we still use the sonar if we're climbing on the left/right side where there's a low goal opening? Will the opening mess up our reading?
  • Take over drivetrain. Drive forwards until both left and right side sonar tell us we're touching the wall. If the robot needs to be rotated to be perpendicular to the tower do that first. Drive up to the wall.
  • Stop wheels.
  • If cradle sensor detects a ball, fire the shot to unload the spring. Do this after we square ourselves to tower so we don't cause a ball bounce that may affect an alliance partner or cause a penalty.
  • Check distance to wall again in case the shot moved us.
  • Raise scissor lift. This will also automatically deploy the Wall Brace.
  • Wait for sensor that says we've reached the desired height. This is two series-wired limit switches that will ride with the hooks that will shut down the motor when the right position is reached.
  • Also check the encoder on the motor. If the limit switch fails to trip, software needs to stop the lift before it gets damaged (do we need this or will the lift mechanism have a built-in safety limit switch on the linear motion track for that purpose?)
  • Start winch
  • Wait until desired height is reached. A bead or knot on the rope will trip a limit switch to stop the motor. (Do we have a backup mechanism?)
  • Stop winch if necessary (perhaps based on time?) if the limit switch fails.
« Last Edit: February 12, 2016, 02:16:31 PM by Louis L »

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: Algorithm for climbing
« Reply #1 on: January 31, 2016, 04:56:53 PM »
Updated to remove swinging the intake arm. A new mechanism will be made to aid in climbing and added to the climbing algorithm. When that's defined, we'll update above.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: Algorithm for climbing
« Reply #2 on: February 06, 2016, 07:41:58 PM »
Here's an update on climbing.
  • Driver drives up onto Batter
  • Driver presses Auto-Climb button
  • Software locks out Auto-Climb button until last 20 seconds of match (safety feature)
  • Sample sonars. If we are not within 24 inches (*) of the tower, we are out of range. Get out of Auto-Climb mode. This is a safety feature and prevents the robot from activating the climber when we're way out of reach of the tower.
  • The minimum distance that the MB-1023 sonars can measure is just under 12 inches (30 cm). The sonars need to be mounted such that we can touch the bumper to the tower and still get good readings. Each sonar must be able to detect the tower surface even if they are pointed at the two tower faces that have an opening for the low goal.
  • Take over the drivetrain. If the sonar readings indicate a need to rotate the robot, do so. This puts the robot perpendicular to the tower wall.
  • Drive forwards until both left and right side sonar tell us we're touching the wall and can go no closer.
  • Stop wheels.
  • If cradle sensor detects a ball, fire the shot to unload the spring. This is a safety feature to prevent us from having stored energy when the match is over.
  • Raise scissor lift via motor.
  • Wait for sensor that says we've reached the desired height. There are two switches, one per side, on the hooks, that are wired in series. There is also a limit switch that detects when the lift has reached its maximum height and can't go higher. Raising the scissor lift will also deploy bracing that will allow the climb to happen.
  • Lower scissor lift a little to remove slack on the lift mechanism as the bottom. Limit switches will stop the motor when done.
  • Short pause. Do this because we don't know when the limit switches will trip and it's best to have the lift taken care of before starting the winch. Alternatively we can wire the limit switch to the roboRio.
  • Start winch.
  • Wait until desired height is reached. There will be a limit switch that will trip when the desired height is reached. This will stop the motor. Alternatively we can send this signal to the roboRio or use either a downward pointing sonar.
  • Stop winch if necessary.
* The "24" is a placeholder. The idea is that if we're too far out from a surface, we don't want to deploy the climbing mechanism.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: Algorithm for climbing
« Reply #3 on: February 12, 2016, 02:18:36 PM »
Another update. Actually I updated the first message in this thread by accident so I copy/paste it here.
  • Driver drives up onto Batter
  • Driver presses Auto-Climb button
  • Software locks out Auto-Climb button until last 20 seconds of match (safety feature)
  • Turn on sonar. If we are not within 24 inches  (?) of the tower, we are out of range. Turn off sonar, get out of Auto-Climb mode. This is also a safety feature and prevents the robot from activating the climber when we're way out of reach of the tower.
  • ASSUME - that the distance to the tower we're looking for is 12 inches +/- 0.25 inches. Actual margin will depend on the sensor we use. Actual distance will depend on where the sensor is mounted.
  • QUESTION - can we still use the sonar if we're climbing on the left/right side where there's a low goal opening? Will the opening mess up our reading?
  • Take over drivetrain. Drive forwards until both left and right side sonar tell us we're touching the wall. If the robot needs to be rotated to be perpendicular to the tower do that first. Drive up to the wall.
  • Stop wheels.
  • If cradle sensor detects a ball, fire the shot to unload the spring. Do this after we square ourselves to tower so we don't cause a ball bounce that may affect an alliance partner or cause a penalty.
  • Check distance to wall again in case the shot moved us.
  • Raise scissor lift. This will also automatically deploy the Wall Brace.
  • Wait for sensor that says we've reached the desired height. This is two series-wired limit switches that will ride with the hooks that will shut down the motor when the right position is reached.
  • Also check the encoder on the motor. If the limit switch fails to trip, software needs to stop the lift before it gets damaged (do we need this or will the lift mechanism have a built-in safety limit switch on the linear motion track for that purpose?)
  • Start winch
  • Wait until desired height is reached. A bead or knot on the rope will trip a limit switch to stop the motor. (Do we have a backup mechanism?)
  • Stop winch if necessary (perhaps based on time?) if the limit switch fails.

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Re: Algorithm for climbing
« Reply #4 on: February 13, 2016, 11:49:46 PM »
Another update; this time after a game play/strategy meeting.
  • Driver drives up onto Batter
  • Driver presses Auto-Climb button
  • Software locks out Auto-Climb button until last 20 seconds of match (safety feature)
  • Turn on sonar. If we are not within 24 inches  (?) of the tower, we are out of range. Turn off sonar, get out of Auto-Climb mode. This is also a safety feature and prevents the robot from activating the climber when we're way out of reach of the tower.
  • ASSUME - that the distance to the tower we're looking for is 12 inches +/- 0.25 inches. Actual margin will depend on the sensor we use. Actual distance will depend on where the sensor is mounted.
  • QUESTION - can we still use the sonar if we're climbing on the left/right side where there's a low goal opening? Will the opening mess up our reading?
  • Take over drivetrain. Drive forwards until both left and right side sonar tell us we're touching the wall. If the robot needs to be rotated to be perpendicular to the tower do that first. Drive up to the wall.
  • Stop wheels.
  • If cradle sensor detects a ball, fire the shot to unload the spring. Do this after we square ourselves to tower so we don't cause a ball bounce that may affect an alliance partner or cause a penalty.
  • Check distance to wall again in case the shot moved us.
  • Raise scissor lift. This will also automatically deploy the Wall Brace.
  • Wait for sensor that says we've reached the desired height. This is two series-wired limit switches that will ride with the hooks that will shut down the motor when the right position is reached.
  • Also check the encoder on the motor. If the limit switch fails to trip, software needs to stop the lift before it gets damaged. There is also a pair of limit switches on the lift's linear rail that will trip at both ends of its travel. In total there are 3 ways to stop the lift. This is important to prevent the lift from self-destruction.
  • Lower the lift. Rely on the limit switch to stop the motor. As a backup, we can also rely on a timer as a backup.
  • Start winch.
  • Wait until desired height is reached. A bead or knot on the rope will trip a limit switch to stop the motor.
  • Stop winch if necessary (perhaps based on time?) if the limit switch fails.

Saty E

  • Guest
Re: Algorithm for climbing
« Reply #5 on: March 08, 2016, 08:27:56 PM »
Climber & Scissorlift values:

Scissor lift up speed: -0.9
Scissor lift down speed: 0.6 (To be tuned with actual robot)
Scissor lift timeout for up: 15 seconds (Also to be tuned)
Scissor lift timeout for down: none
Winch up speed: -0.75 (needs to be tuned)
Winch up timeout: 10 seconds (also may change with winch up speed)