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
9 changes: 7 additions & 2 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ following components on your laptop and devices.
This includes all motors, CANivore, Pigeon 2.0, and all CANcoders!
* Rev Hardware Client `2.0`, with the PDH and all SparkMax's, and other devices
running firmware `26.1` or newer.
* Vivid Hosting Radio firmware `2.0` or newer is required for competition this
* Vivid Hosting Radio firmware `2.0.1` or newer is required for competition this
year.
* Photon Vision ([Orange Pi or other device](https://docs.photonvision.org/en/latest/docs/quick-start/quick-install.html))
**running `26.1` or newer** (make sure you are **not** acidentially running
Expand All @@ -22,6 +22,8 @@ following components on your laptop and devices.

It is highly recommmended to update all you devices, and label what can id's or ip adresses and firmware versions they are running. This helps your team, and the FRC field staff quickly identify issues.

If you are running a RoboRIO 1.0 (no sd card) you also neeed to disable the web server ([Instructions Here](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/roborio-team-number-setter/index.html))

--------

### Getting Az-RBSI
Expand Down Expand Up @@ -118,7 +120,10 @@ steps you need to complete:
https://github.com/CrossTheRoadElec/Phoenix6-Examples/blob/1db713d75b08a4315c9273cebf5b5e6a130ed3f7/java/SwerveWithPathPlanner/src/main/java/frc/robot/generated/TunerConstants.java#L171-L175).
Before removing them, both lines will be marked as errors in VSCode.

5. In `TunerConstants.java`, change `kSteerInertia` to `0.004` and
5. In `TunerConstants.java`, change `kSlipCurrent` to `60` amps. This will
keep your robot from tearing holes in the carpet at competition!

6. In `TunerConstants.java`, change `kSteerInertia` to `0.004` and
`kDriveInertia` to `0.025` to allow the AdvantageKit simulation code to
operate as expected.

Expand Down
Binary file added doc/PV_Cameras.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 doc/PV_Network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion doc/RBSI-GSG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ modifications to extant RBSI code will be done to files within the

### Tuning constants for optimal performance

**It cannot be overemphasized the importance of tuning your drivetrain for
smooth and consistent performance, battery longevity, and not tearing up the
field.**

4. Over the course of your robot project, you will need to tune PID parameters
for both your drivebase and any mechanisms you build to play the game.
AdvantageKit includes detailed instructions for how to tune the various
Expand Down Expand Up @@ -128,7 +132,22 @@ section of [each release](https://github.com/AZ-First/Az-RBSI/releases).

See the [PhotonVision Wiring documentation
](https://docs.photonvision.org/en/latest/docs/quick-start/wiring.html) for
more details.
more details. DO NOT put the orange pi's (or any devices that cannnot loose power) on port 23 of the PDH. It is a mechanical switch, and if the robot is hit, it briefly will loose power.

Mounting the case to the robot requires 4x #10-32 nylock nuts (placed in the
hex-shaped mounts inside the case) and 4x #10-32 bolts.

Order of addembly of the Orange Pi Double Case matters given tight clearances:
1. Super-glue the nylock nuts into the hex mounting holes.
2. Intall the fans and grates into the case side.
3. Assemble the Pi's into the standoffs outside the box.
4. Solder / mount the Voltage Regular solution of your choice.
5. Connect the USB-C power cables to the Pi's.
6. Connect the fan power to the 5V (red) and GND (black) pins in the Pi's.
7. Install the Pi/standoff assembly into the case using screws at the bottom,
be careful of the tight clearance between the USB sockets and the case opening.
8. Tie a knot in the incoing power line _to be placed inside the box
for strain relief_, and pass the incoming power line through the notch
in the lower case.
9. Install the cover on the box using screws.
10. Mount the case to your robot using the #10-32 screws.
80 changes: 80 additions & 0 deletions doc/RBSI-Vision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Az-RBSI Vision Integration

This page includes detailed steps for integrating robot vision for your
2026 REBUILT robot.

--------

### PhotonVision

The preferred method for adding vision to your robot is with [PhotonVision](
https://photonvision.org/). This community-developed open-source package
combines coprocessor-based camera control and analysis with a Java library
for consuming the processed targeting information in the robot code.

#### Recommended Setup with Az-RBSI

We recommend using Arducam [OV9281](https://www.amazon.com/dp/B096M5DKY6)
(black & white) and/or [OV9782](https://www.amazon.com/dp/B0CLXZ29F9) (color)
cameras for robot vision due to their Global Shutter, Low Distortion, and USB
connection. In addition to the lens delivered with the camera, supplementary
lenses may be purchased to vary the FOV available to the detector for various
robot applications, such as [Low-Distortion](
https://www.amazon.com/dp/B07NW8VR71) or [General Purpose](
https://www.amazon.com/dp/B096V2NP2T).

For the coprocessor that controls the cameras and analyzes the images for
AprilTag and gamepiece detection, we recommend using one or two Orange Pi 5
single-board computers -- although PhotonVision does support a number of
[different coprocessor options](
https://docs.photonvision.org/en/latest/docs/quick-start/quick-install.html).
As decribed in the [Getting Started Guide](RBSI-GSG.md), we include a 3D print
for a case that can hold one or two of these computers.

#### Setting up PhotonVision on the Coprocessor

Download the appropriate [disk image](
https://github.com/PhotonVision/photonvision/releases/tag/v2026.2.1) for your
coprocessor and burn it to an SD card using the [Raspberry Pi Imager](
https://www.raspberrypi.com/software). Connect the powered-on coprocessor
to the Vivivid radio (port 2 or 3) via ethernet, or connect to a network switch connected to the radio via ethernet, and connect to the PhotonVision software
at the address ``http://photonvision.local:5800``.

Before you connect the coprocessor to your robot, be sure to set your team
number, set the IP address to "Static" and give it the number ``10.TE.AM.11``,
where "TE.AM" is the approprate parsing of your team number into IP address,
as used by your robot radio and RoboRIO. If desired, you can also give your
coprocessor a hostname.

![PhotonVision Network Settings](PV_Network.png)

We suggest you give your first coprocessor the static IP address
``10.TE.AM.11``, and your second coprocessor (if desired) ``10.TE.AM.12``.
The static address allows for more stable operation, and the these particular
addresses do not conflict with other devices on your robot network.

Plug in cameras (two or three per coprocessor) and navigate to the Camera
Configs page (see below). Activate the cameras.

![PhotonVision Camera Configs](PV_Cameras.png)

#### Configuring and Calibrating your Cameras

This is the most important part!

Instructions are in the [PhotonVision Documentation](
https://docs.photonvision.org/en/latest/docs/calibration/calibration.html).

You should consider calibrating your cameras early and often, including daily
during a competition to ensure that the cameras are reporting as accurate a
pose as possible for your odometry. Also, double-check your calibration by
using a measuring tape to compare the reported vision-derived distance from
each camera to one or more AprilTags with reality.


#### Using PhotonVision for vision simulation

This is an advanced topic, and is therefore in the Restricted Section. (More
information about vision simulation to come in a future release.)

![Restricted Section](restricted_section.jpg)
Binary file added doc/restricted_section.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.