Skip to content

Commit

Permalink
QoL changes, added Why Radians section (had to do some research first)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArushYadlapati committed Jul 29, 2024
1 parent 3a8b027 commit 2be3309
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/roadrunner_10/BuilderReference.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Robot waits for the specified time in seconds
// Robot waits for the specified time in seconds (NOT MILLISECONDS!)
// This is a simple wait segment that is useful for running actions in between trajectories.

.waitSeconds(5)
Expand Down
14 changes: 9 additions & 5 deletions src/roadrunner_10/complete_trajectorybuilder_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

### Ingredients

1. A fully tuned Road Runner 1.0 setup _**or**_ [MeepMeep for Road Runner 1.0](https://github.com/acmerobotics/MeepMeep)
1. A fully tuned [Road Runner 1.0](https://rr.brott.dev/docs/) setup _**or**_ [MeepMeep for Road Runner 1.0](https://github.com/acmerobotics/MeepMeep)

### The Problem

The current [TrajectoryBuilder Reference](https://rr.brott.dev/docs/v1-0/builder-ref/) in
the official Road Runner 1.0 docs only has a few TrajectoryBuilder methods, and does
not explain them very well in depth. This is a complete reference for more methods in
the TrajectoryBuilder class for Road Runner 1.0.
The current [TrajectoryBuilder Reference](https://rr.brott.dev/docs/v1-0/builder-ref/) in the official [Road Runner 1.0](https://rr.brott.dev/docs/) docs only has a few TrajectoryBuilder methods, and does not explain them very well in depth. This is a complete reference for more methods in the TrajectoryBuilder class for [Road Runner 1.0](https://rr.brott.dev/docs/).

---

Expand Down Expand Up @@ -115,6 +112,13 @@ The begin pose is the origin `(0,0)` with a heading of \\( \frac{\pi}{6} \\), wi
}
</style>

> **Why Radians?**
> You may have noticed that we are turning by \\( \frac{\pi}{6} \\) degrees instead of degrees.
> This is because Road Runner 1.0's units are inches and radians by default. To use degrees, we can convert degrees to radians by using Java's `Math.toRadians(degrees)`
>
> Example:
> `Math.toRadians(90)` converts 90 degrees to radians. 90 degrees is the same as \\( \frac{\pi}{2} \\) radians.
---

#### `turnTo(Math.toRadians(double: heading))`
Expand Down

0 comments on commit 2be3309

Please sign in to comment.