NOTE: If the documentation says "Tune" then that is a value you should be tuning. If it is telling you a value or setting then leave it alone unless otherwise instructed.
Pipeline (April Tags)
This is what we want the camera to detect, in this case it is April Tags.
Source Image (Camera)
We want the Limelight to use it's camera feed, not any screenshots.
Resolution (1280x960 40fps)
This setting has the higher resolution which will allow for better tracking.
LEDs & LED Power (Off & 0)
We don't want the LEDs on the Limelight to be on.
Orientation (Normal)
This will tell the camera if it is upside down or not. Being upside down will lead to a slight performance decrease so we prefer it being right side up.
Exposure (Tune)
Exposure is the total amount of light that the camera will receive. This requires to be tuned at every event due to the different lighting conditions, but it will generally be really low.
Black Level Offset (0)
This will artificially darken the camera's stream, which we don't want to do that for April Tags.
Sensor Gain (Tune)
This is the sensitivity of the camera, and will amplify the pixels to allow for better and more accurate tracking.
Red Balance & Blue Balance (1500 & 1500)
This setting deals with the red and blue colors. April Tags track in white and black so we want to set these settings to a neutral position.
Family (April Tag Classic 36h11 (587 Tags))
This is the family type of the April Tags. The different Tags have different IDs, and this the previous years April Tags are different than this years.
Marker Size (165.1)
This is telling how big the April Tags are. Similar to the previous setting, the Tags change from year to year.
Detector Downscale (2)
The higher the number, the more the Limelight will group like pixels together to increase performance.
Quality Threshold (9)
This will filter out all detections that the Limelight thinks are inaccurate.
Refine (Yes)
ID Filters
This will specifically search for specific April Tag IDs.
X-Crop & Y-Crop (-1 to 1 & 0 to 1)
This will determine which section of the screen the Limelight will detect.
Sort Mode (Closest)
This will sort the April Tags into a preferred order.
Area (0.0623 to 100)
This will sort out all tags that are not in that range (percentage of the screen).
Target Grouping (Smart Target Group)
When a Limelight sees multiple April Tags at a time, this will allow the camera to group the tags together to allow for more accurate detection.
Group Size (1 to 7)
When the Limelight sees tag(s), this will filter out if it sees to many or not enough.
Group Outlier Rejecter (Median & IQR)
This will sort out any outlier data (i.e. the extremes) to keep the data only in the median.
Horizontal Outlier Filter & Vertical Outlier Filter (1.5 & 1.5)
Full 3D Targeting (Yes)
This will allow for the robot to do full 3D tracking to update our odometry.
3D Point-of-Interest Offset (0,0,0)
This will look at specific April Tags and find an offset to detect. This setting doesn't really apply to updating our odometry.
MegaTag Field-Space Localization Setup
These 6 settings will tell the robot where it is exactly on the robot and which orientation it is in.
Snap Robot to Floor (Yes)
This will automatically snap the robot to the floor to assist in accurate odometry.
View (Robot Pose In Field Space)
This is a way for you to view the Limelight's information in multiple different ways.
NOTE: This was done with the team number 9990. use 930 or 9.30 wherever it mentions team number
Team Number (9990)
This is your team number
Stream Rate & Resolution (Normal & 320x240)
This is the resolution the Limelight relays to us, keep this value low
IP Address Assignment (Static)
This will allow us to port forward the feed so we can access the limelight while connected to the robot
IP Address: (10.99.90.12)
This is the Static IP related to the camera. These have changed on the real bot, check the code for the IPs for each of the cameras
Netmask (255.255.255.0)
This is the Subnet Mask for the camera. This tells the robot that the section of the IP address that relates to the network the robot's network
Gateway (10.99.90.2)
This is the IP address of the RoboRio
Hostname (front)
This is the
Detector Downscale (1)
Changes resolution of Limelight. The lower the number, the more precise it is
Quality Threshold (2)
`How precise it wants the Limelight's input to be, higher threshold = worse inputs
Target Grouping (Smart Grouping)
How many tags Limelight will ID. Smart Grouping IDs as many tags as possible in any given frame
Resolution (highest available)
Exposure (200)
Exposure of camera. Want the value to be bright, but not blinding
Black Level (0)
Sensor Gain (6)
We are following a similar process to what Limelight recommends and provides. We don't like this process exactly because it doesn't allow for consistent April Tag tracking and accurate/steady odometry. We slightly modified this process to follow an IQR graph, and this will allow for a more accurate rough estimation.
There are some settings that are not necessary to change due to the environments not changing, but in some cases they might need to be.
Detector Downscale
This setting will group pixels that are of a similar color (black/white) to increase performance. This on the other hand will reduce accuracy, so a setting of 2 is a good middle ground of fps and accuracy.
Quality Threshold
This setting acts like a confidence threshold, where the Limelight will rate its confidence on how well it though it detected an April Tag. Requiring high confidence will sometimes result with Tags rarely ever getting a updated. Having a really low confidence will allow for trash data to be passed through to the odometry.
These settings are required to be tuned, however the following step are a rough guideline and every field/competition will be slightly different.
Set Sensor Gain to 15 and Exposure to 0.
Slowly increase the Exposure until the detection of a group of April Tags is solid. Record this number as Q1.
Set Exposure to the Max value and slowly decrease until the detections are solid, just like step 2. Record this number as Q3.
This equation will find the middle between Q1 and the Median. This is the number that you should be using ((Q3 - Q1)/4 + Q1).
Do steps 2 through 4 for Sensor Gain instead of Exposure, but Q1 is always going to be 15.
We should have a set of files available for every single Limelight.
Limelight
Standard Deviation is meant for us to determine how much we trust the values given from the Limelight. We most likely won't have to adjust this at a competition, however we will tune it at our shop. The higher the value the longer it will take for Limelight values to override Serve Drive values. Having higher values will rely more on the swerve drive, but lower values will rely more on the Limelight. Vision being blocked, wheels sliping, and getting hit by other robots will offset the odometry so we need a good value to rely on.