Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/coralator-tuning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Coralator Tuning

The coralator essentially has three degrees of freedom.
Those are height (from the elevator), arm angle, and wrist angle.
Not all of these can be adjusted independently - certain configurations can result in the robot colliding with itself.
We can model the various valid configurations to create what's called a configuration space.
To move our end effector from one position to another, we must ensure that we stay within the confines of the configuration space.

To define this configuration space, we must consider the bounds of each mechanism.
We'll start with the individual components - the arm and the wrist.
Let's say the arm has a lower limit of -10 degrees and an upper limit of 90 degrees, while the wrist can rotate a full 360 degrees.
The arm is constrained by the drivetran and the elevator, while the wrist isn't constrained.
However, the wrist does have a constraint, but it's dependent on the arms position.
We can use the following diagram to determine the relative angle bettween the arm and the wrist:

![angle diagram](./imgs/angle-diagram.jpg)

Doing some trig, we find that the wrist's relative angle to the arm can be found with the following equation:

$$
\theta_r = 180-\theta_a-\theta_w
$$

Let's say this angle, $\theta_r$, is constrained to the bound \[-120,160\] degrees.
If we graph all of these constraints, this is the result:

![configuration space](./imgs/configuration-space.png)

In this graph, the x-axis represents the wrist angle while the y-axis represents the arm angle.
The white space represents all possible valid configurations.
When performing path planning for the coralator, we must ensure that it's path never drifts outside of this configuration space.

For more details on condiguration spaces and motion planning, check out chapter 16 of [Controls Engineering in FRC](https://file.tavsys.net/control/controls-engineering-in-frc.pdf).

## Appendix

**Wrist Angle Diagram:**

![wrist angle diagram](./imgs/wrist-diagram.jpg)

**Arm Angle Diagram:**

![arm angle diagram](./imgs/arm-diagram.jpg)
Binary file added docs/imgs/angle-diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/arm-diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/configuration-space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/wrist-diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.