Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 3c6bf31

Browse files
mcm001mdurrani808
andauthored
Add more networking troubleshooting (#259)
* Banner, sidebar, networking * lint * Add troubleshooting checklist * Add static admonition * Update common-errors.rst * Update calibImgs.png * Move checklist to networking troubleshooting * Address review comments * Update calibration.rst Co-authored-by: mdurrani808 <[email protected]>
1 parent 9f5154a commit 3c6bf31

File tree

7 files changed

+71
-31
lines changed

7 files changed

+71
-31
lines changed

source/docs/getting-started/installation/networking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Digital Networking
1515
------------------
1616
PhotonVision *STRONGLY* recommends the usage of Static IPs as it increases reliability on the field and when using PhotonVision in general. To properly set up your static IP, follow the steps below:
1717

18-
.. warning:: Only use a static IP when connected to the robot radio, unless you are well versed in networking or have the relevant "know how".
18+
.. warning:: Only use a static IP when connected to the **robot radio**, and never when testing at home, unless you are well versed in networking or have the relevant "know how".
1919

2020
1. Ensure your robot is on and you are connected to the robot network.
2121
2. Navigate to ``photonvision.local:5800`` (this may be different if you are using a Gloworm / Limelight) in your browser.

source/docs/getting-started/pipeline-tuning/calibration.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@ To calibrate a camera, images of a chessboard (or grid of dots) are taken. by co
99

1010
.. note::The calibration data collected during calibration is specific to each physical camera, as well as each individual resolution.
1111
12+
Calibration Tips
13+
----------------
14+
Accurate camera calibration is required in order to get accurate pose measurements when using AprilTags and 3D mode. The tips below should help ensure success:
15+
16+
1. Practice calibration using your laptop webcam and https://www.calibdb.net/. The target can be found on the website and should be printed out if possible. Once you print it out, try to line up your target with the overlay on the screen as best as possible. The point of this practice is to notice how you are prompted to place targets in certain positions on the screen that make sure you account for all regions of the sensor. The chessboard should (in general) not be facing parallel to the camera (straight on), nor should it be aligned with any of the camera axes (ie, rotated only about an axis going left/right, up/down, or out-of-the-camera).
17+
18+
2. Ensure your the images you take have the target in different positions and angles, with as big of a difference between angles as possible. It is important to make sure the target overlay still lines up with the board while doing this. Tilt no more than 45 degrees.
19+
20+
3. Use as big of a calibration target as your printer can print.
21+
22+
4. Ensure that your printed pattern has enough white border around it.
23+
24+
5. Ensure your camera stays in one position during the duration of the calibration.
25+
26+
6. Make sure you get all 12 images from varying distances and angles.
27+
28+
7. Take at least one image that covers the total image area, and generally ensure that you get even coverage of the lens with your image set.
29+
30+
8. Have good lighting, having a diffusely lit target would be best (light specifically shining on the target without shadows).
31+
32+
9. Ensure the calibration target is completely flat and does not bend or fold in any way. It should be mounted/taped down to something flat and then used for calibration, do not just hold it up.
33+
34+
Following the ideas above should help in getting an accurate calibration.
35+
1236
Calibration Steps
1337
-----------------
1438

@@ -40,34 +64,10 @@ Now, we'll capture images of our chessboard from various angles. The most import
4064
Your browser does not support the video tag.
4165
</video>
4266

43-
Calibration Tips
44-
----------------
45-
Accurate camera calibration is required in order to get accurate pose measurements when using AprilTags and 3D mode. The tips below should help ensure success:
46-
47-
1. Practice calibration using your laptop webcam and https://www.calibdb.net/. The target can be found on the website and should be printed out if possible. Once you print it out, try to line up your target with the overlay on the screen as best as possible. The point of this practice is to notice how you are prompted to place targets in certain positions on the screen that make sure you account for all regions of the sensor. Also notice how the target is tilted when taking calibration pictures. When taking calibration pictures for PhotonVision, keep those same principles in mind.
48-
49-
2. Ensure your the images you take have the target in different positions and angles, with as big of a difference between angles as possible. It is important to make sure the target overlay still lines up with the board while doing this. Tilt no more than 45 degrees.
50-
51-
3. Use as big of a calibration target as your printer can print.
52-
53-
4. Ensure that your printed pattern has enough white border around it.
54-
55-
5. Ensure your camera stays in one position during the duration of the calibration.
56-
57-
6. Make sure you get all 12 images from varying distances and angles.
58-
59-
7. Take at least one image that covers the total image area, and generally ensure that you get even coverage of the lens with your image set.
60-
61-
8. Have good lighting, having a diffusely lit target would be best (light specifically shining on the target without shadows).
62-
63-
9. Ensure the calibration target is completely flat and does not bend or fold in any way. It should be mounted/taped down to something flat and then used for calibration, do not just hold it up.
64-
65-
Following the ideas above should help in getting an accurate calibration.
66-
67-
6867
Accessing Calibration Images
6968
----------------------------
70-
For advanced users, these calibrations can be later accessed by :ref:`exporting your config directory <docs/hardware/config:Directory Structure>` and viewing the camera's config.json file. Furthermore, the most recent snapshots will be saved to the calibImgs directory.
69+
70+
For advanced users, these calibrations can be later accessed by :ref:`exporting your config directory <docs/hardware/config:Directory Structure>` and viewing the camera's config.json file. Furthermore, the most recent snapshots will be saved to the calibImgs directory. The example images below are from `the calibdb website <https://calibdb.net>` -- focus on how the target is oriented, as the same general tips for positioning apply for chessboard targets as for ChArUco.
7171

7272
.. image:: images/calibImgs.png
7373
:width: 600
70.8 KB
Loading

source/docs/troubleshooting/common-errors.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ For now, if you are using multiple cameras, it is recommended that teams set the
2121
Commonly Seen Issues
2222
--------------------
2323

24+
2425
Networking Issues
2526
^^^^^^^^^^^^^^^^^
26-
Ensure that you have followed :ref:`all the recommendations in the networking section <docs/getting-started/installation/networking:Physical Networking>`.
27+
28+
Please refer to our comprehensive :ref:`networking troubleshooting tips <docs/troubleshooting/networking-troubleshooting:Networking Troubleshooting>` for debugging suggestions and possible causes.
2729

2830
Camera won't show up
2931
^^^^^^^^^^^^^^^^^^^^
@@ -42,6 +44,18 @@ Not getting data from PhotonLib
4244

4345
2. Ensure that you have your team number set properly.
4446

47+
3. Use Glass to verify that PhotonVision has connected to the NetworkTables server served by your robot. With Glass connected in client mode to your RoboRIO, we expect to see "photonvision" listed under the Clients tab of the NetworkTables Info pane.
48+
49+
.. image:: images/glass-connections.png
50+
:width: 600
51+
:alt: Using Glass to check NT connections
52+
53+
4. When creating a `PhotonCamera` in code, does the `cameraName` provided match the name in the upper-right card of the web interface? Glass can be used to verify the RoboRIO is receiving NetworkTables data by inspecting the `photonvision` subtable for your camera nickname.
54+
55+
.. image:: images/camera-subtable.png
56+
:width: 600
57+
:alt: Using Glass to check camera publishing
58+
4559
Unable to download PhotonLib
4660
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4761
Ensure all of your network firewalls are disabled and you aren't on a school-network.
40.3 KB
Loading
40.7 KB
Loading

source/docs/troubleshooting/networking-troubleshooting.rst

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
Networking Troubleshooting
22
==========================
33

4-
Before reading further, ensure that you follow all the reccomendations in our networking section. You must be following these guidelines in order for PhotonVision to work properly, other networking setups are not officially supported.
4+
Before reading further, ensure that you follow all the recommendations :ref:`in our networking section <docs/getting-started/installation/networking:Physical Networking>`. You should follow these guidelines in order for PhotonVision to work properly; other networking setups are not officially supported.
5+
6+
7+
Checklist
8+
^^^^^^^^^
9+
10+
A few issues make up the majority of support requests. Run through this checklist quickly to catch some common mistakes.
11+
12+
- Is your camera connected to the robot's radio through a :ref:`network switch <docs/getting-started/installation/networking:Physical Networking>`?
13+
- Ethernet straight from a laptop to a coprocessor will not work (most likely), due to the unreliability of link-local connections.
14+
- Even if there's a switch between your laptop and coprocessor, you'll still want a radio or router in the loop somehow.
15+
- The FRC radio is the *only* router we will officially support due to the innumerable variations between routers.
16+
- (Raspberry Pi & Limelight only) have you flashed the correct image, and is it up to date?
17+
- Limelights and Gloworms should be flashed using the Limelight image (eg, `photonvision-v2023.1.2-linuxarm64-image_limelight.xz`).
18+
- Raspberry Pi devices (including Pi 3, Pi 4, CM3 and CM4) should be flashed using the Limelight image (eg, `photonvision-v2023.1.2-linuxarm64-image_RaspberryPi.xz`).
19+
- This is due to Limelight-specific hardware configuration that makes the image incompatible with stock Raspberry Pi devices.
20+
- Is your robot code using a **2023** version of WPILib, and is your coprocessor using the most up to date **2023** release?
21+
- 2022 and 2023 versions of either cannot be mix-and-matched!
22+
- Your PhotonVision version can be checked on the :ref:`settings tab<docs/hardware/Settings:settings>`.
23+
- Is your team number correctly set on the :ref:`settings tab<docs/hardware/Settings:settings>`?
24+
525

626
photonvision.local Not Found
727
----------------------------
@@ -10,7 +30,7 @@ Use `Angry IP Scanner <https://angryip.org/>`_ and look for an IP that has port
1030

1131
Alternatively, you can plug your coprocessor into a display, plug in a keyboard, and run ``hostname -I`` in the terminal. This should give you the IP Address of your coprocessor, then go to your web browser and do <IP ADDRESS>:5800.
1232

13-
If nothing shows up, ensure your coprocessor has power, and you are following all of our networking reccomendations, feel free to :ref:`contact us <index:contact us>` and we will help you.
33+
If nothing shows up, ensure your coprocessor has power, and you are following all of our networking recommendations, feel free to :ref:`contact us <index:contact us>` and we will help you.
1434

1535
Can't Connect To Robot
1636
----------------------
@@ -22,4 +42,10 @@ Please check that:
2242
4. You are using the 2023 version of WPILib and RoboRIO image.
2343
5. Your robot is on.
2444

25-
If all of the above are met and you still have issues, feel free to :ref:`contact us <index:contact us>` and we will help you.
45+
If all of the above are met and you still have issues, feel free to :ref:`contact us <index:contact us>` and provide the following information:
46+
47+
- The WPILib version used by your robot code
48+
- PhotonLib vendor dependency version
49+
- PhotonVision version (from the UI)
50+
- Your settings exported from your coprocessor (if you're able to access it)
51+
- How your RoboRIO/coprocessor are networked together

0 commit comments

Comments
 (0)