GwhsRobotics3 / Team-5507-2018

1 stars 2 forks source link

Improve Gripper "Closed" position #24

Closed gregmarra closed 6 years ago

gregmarra commented 6 years ago

Our Gripper "Closed" position has a few issues:

  1. The amount of closed-ness we need for a POWER CUBE on its side is more than we need for a POWER CUBE in the standard orientation. How can we make "Closed" decide when it is "done closing"?
  2. If the desired "Closed" position of the gripper arms is further in than the arms can reach due to a box being gripped, the arms keep trying to drive further in. In particular, the Integral part of our PID loop "winds up", increasing more and more over time (since there is still "error" in the position). This squeezes boxes harder and harder over time, which is not desired.
  3. Also as a side effect of the Integral wind-up, when the arms actually release the box, they then over-shoot inwards, hitting into each other. We do not want them to ever hit each other, as that risks damage.

A few things we can do:

  1. Set Talon SoftLimits for the Gripper positions that do not allow them to over-extend closed. (see #14)
  2. Figure out how to use the Talon Current Limiting features (see #25). 2a. If the current limit applies to the position control mode (I don't see why it wouldn't), then we can set the "closed" position to be tight enough to grab any width box. 2b. If we set a current limit, we can just "drive gripper arms inwards" open-loop, and the current limit will let us squeeze the box.

Note that this will be easiest to do after completing #23 to have separate Talon configuration per subsystem.

gregmarra commented 6 years ago

We could also consider using the Talon's "current closed-loop control mode" to squeeze boxes, so rather than controlling position, we control how much force is being applied.

gregmarra commented 6 years ago

We set a conservative current limit and close to a more-than-closed position.

We need to work out the "enclosed in the robot" position we expect the arms to start with and measure the angle needed from there. The current positions assume the arms are starting standing straight out to the side.