frc2399 / 2023-Season

Other
2 stars 2 forks source link

Is the elevator top height correct? #93

Closed wmarshall closed 1 year ago

wmarshall commented 1 year ago

Possibly related to #92.

The MAX_ELEVATOR_HEIGHT constant is currently set to 0.75 meters, or approximately 29.5 inches. This doesn't make sense given the physical constraints of the lift.

According to the CAD:

  1. Our immobile stage is 37 inches long.
  2. Our mobile stage is 38 inches long.
  3. Our mobile stage has a 1 inch cross-member at the top.
  4. Our mobile stage has a 1 inch cross-member at the bottom.
  5. When fully extended, the stages overlap by 10 inches.
  6. Our carriage is 8 inches long.

Math gives our full travel (how far the bottom of the carriage moves in total) in this case as 37 + 38 - 1 - 1 - 10 - 8 = 55 inches. Pulling around the lift in CAD gives the same measurement.

I'd have expected this constant to be calculated as Units.inchesToMeters(37 + 38 - 1 - 1 - 10 - 8) which would be 1.397m. Each of those constraints I called out could be specified as its own constant to make the math clearer.

I suspect this number came about due to a miscommunication - 37 + 38 = 75 which looks mighty suspicious next to the stated value of 0.75m.

Is there something I'm missing about how this was calculated?

edf42001 commented 1 year ago

This is probably because I like editing messages instead of creating new ones but I don't think those edits show up in the emails that github sends so you might have missed it, but did you see my theory that:

now that I think about it, isn't that for the first stage carriage? So the final elevator height is twice that?

Which would line up perfectly with the cone high node setpoint being 0.71, about half of 1.397.

Regardless, MAX_ELEVATOR_HEIGHT and MIN_ELEVATOR_HEIGHT are only used in the simulation and don't get any use on the real robot (which is why min height is still 0.05 but on the robot the "min height" is 0).

I actually now know this to be true because I remember herb and alice measuring the carriage distance when they calibrated it, because it had a nice flat edge to measure exact distances from. You can ask them to confirm :+1:

hschilling commented 1 year ago

This is probably because I like editing messages instead of creating new ones but I don't think those edits show up in the emails that github sends so you might have missed it, but did you see my theory that:

now that I think about it, isn't that for the first stage carriage? So the final elevator height is twice that?

Which would line up perfectly with the cone high node setpoint being 0.71, about half of 1.397.

Regardless, MAX_ELEVATOR_HEIGHT and MIN_ELEVATOR_HEIGHT are only used in the simulation and don't get any use on the real robot (which is why min height is still 0.05 but on the robot the "min height" is 0).

I actually now know this to be true because I remember herb and alice measuring the carriage distance when they calibrated it, because it had a nice flat edge to measure exact distances from. You can ask them to confirm 👍

I remember doing that

hschilling commented 1 year ago

Having said that, it is definitely worth doing again

alicelin27 commented 1 year ago

only in sim smiley face :)