diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41e72cf7d..fd2dba50c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,13 @@ name: Build on: - # Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder + # Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder push: - branches: [ master ] + branches: [ main ] tags: - 'v*' pull_request: - branches: [ master ] + branches: [ main ] merge_group: jobs: diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 90ca5ae14..393d66b4a 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -1,13 +1,13 @@ name: Lint and Format on: - # Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder + # Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder push: - branches: [ master ] + branches: [ main ] tags: - 'v*' pull_request: - branches: [ master ] + branches: [ main ] merge_group: concurrency: @@ -24,7 +24,7 @@ jobs: run: | git fetch --prune --unshallow git checkout -b pr - git branch -f master origin/master + git branch -f main origin/main - name: Set up Python 3.8 uses: actions/setup-python@v4 with: @@ -84,6 +84,6 @@ jobs: run: | git fetch --prune --unshallow git checkout -b pr - git branch -f master origin/master + git branch -f main origin/main - name: Check index.html not changed - run: git --no-pager diff --exit-code origin/master photon-server/src/main/resources/web/index.html + run: git --no-pager diff --exit-code origin/main photon-server/src/main/resources/web/index.html diff --git a/.github/workflows/photon-code-docs.yml b/.github/workflows/photon-code-docs.yml index a3c2202e0..d5e3bfab3 100644 --- a/.github/workflows/photon-code-docs.yml +++ b/.github/workflows/photon-code-docs.yml @@ -1,13 +1,13 @@ name: Photon Code Documentation on: - # Run on pushes to master and pushed tags, and on pull requests against master, but ignore the docs folder + # Run on pushes to main and pushed tags, and on pull requests against main, but ignore the docs folder push: - branches: [ master ] + branches: [ main ] tags: - 'v*' pull_request: - branches: [ master ] + branches: [ main ] merge_group: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -78,7 +78,7 @@ jobs: - run: find . - name: copy file via ssh password - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: appleboy/scp-action@v0.1.7 with: host: ${{ secrets.WEBMASTER_SSH_HOST }} diff --git a/README.md b/README.md index 7d37c6ef2..75aa4efc5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PhotonVision -[![CI](https://github.com/PhotonVision/photonvision/workflows/CI/badge.svg)](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/PhotonVision/photonvision/branch/master/graph/badge.svg)](https://codecov.io/gh/PhotonVision/photonvision) [![Discord](https://img.shields.io/discord/725836368059826228?color=%23738ADB&label=Join%20our%20Discord&logo=discord&logoColor=white)](https://discord.gg/wYxTwym) +[![CI](https://github.com/PhotonVision/photonvision/workflows/CI/badge.svg)](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/PhotonVision/photonvision/branch/main/graph/badge.svg)](https://codecov.io/gh/PhotonVision/photonvision) [![Discord](https://img.shields.io/discord/725836368059826228?color=%23738ADB&label=Join%20our%20Discord&logo=discord&logoColor=white)](https://discord.gg/wYxTwym) PhotonVision is the free, fast, and easy-to-use computer vision solution for the *FIRST* Robotics Competition. You can read an overview of our features [on our website](https://photonvision.org). You can find our comprehensive documentation [here](https://docs.photonvision.org). @@ -67,7 +67,7 @@ sudo apt install libcholmod3 liblapack3 libsuitesparseconfig5 PhotonVision was forked from [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/). Thank you to everyone who worked on the original project. -* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv). +* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/main/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/main/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/main/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv). * [Apache Commons](https://commons.apache.org/) - Specifically [Commons Math](https://commons.apache.org/proper/commons-math/), and [Commons Lang](https://commons.apache.org/proper/commons-lang/) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8de2d4414..7682ea5bf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -45,7 +45,7 @@ extensions = [ ogp_site_url = "https://docs.photonvision.org/en/latest/" ogp_site_name = "PhotonVision Documentation" -ogp_image = "https://raw.githubusercontent.com/PhotonVision/photonvision-docs/master/source/assets/RectLogo.png" +ogp_image = "https://raw.githubusercontent.com/PhotonVision/photonvision-docs/main/source/assets/RectLogo.png" # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/docs/source/docs/advanced-installation/prerelease-software.md b/docs/source/docs/advanced-installation/prerelease-software.md index 1122ff968..c99032351 100644 --- a/docs/source/docs/advanced-installation/prerelease-software.md +++ b/docs/source/docs/advanced-installation/prerelease-software.md @@ -1,12 +1,12 @@ # Installing Pre-Release Versions -Pre-release/development version of PhotonVision can be tested by installing/downloading artifacts from Github Actions (see below), which are built automatically on commits to open pull requests and to PhotonVision's `master` branch, or by {ref}`compiling PhotonVision locally `. +Pre-release/development version of PhotonVision can be tested by installing/downloading artifacts from Github Actions (see below), which are built automatically on commits to open pull requests and to PhotonVision's `main` branch, or by {ref}`compiling PhotonVision locally `. :::{warning} If testing a pre-release version of PhotonVision with a robot, PhotonLib must be updated to match the version downloaded! If not, packet schema definitions may not match and unexpected things will occur. To update PhotonLib, refer to {ref}`installing specific version of PhotonLib`. ::: -GitHub Actions builds pre-release version of PhotonVision automatically on PRs and on each commit merged to master. To test a particular commit to master, navigate to the [PhotonVision commit list](https://github.com/PhotonVision/photonvision/commits/master/) and click on the check mark (below). Scroll to "Build / Build fat JAR - PLATFORM", click details, and then summary. From here, JAR and image files can be downloaded to be flashed or uploaded using "Offline Update". +GitHub Actions builds pre-release version of PhotonVision automatically on PRs and on each commit merged to main. To test a particular commit to main, navigate to the [PhotonVision commit list](https://github.com/PhotonVision/photonvision/commits/main/) and click on the check mark (below). Scroll to "Build / Build fat JAR - PLATFORM", click details, and then summary. From here, JAR and image files can be downloaded to be flashed or uploaded using "Offline Update". ```{image} images/gh_actions_1.png :alt: Github Actions Badge diff --git a/docs/source/docs/apriltag-pipelines/2D-tracking-tuning.md b/docs/source/docs/apriltag-pipelines/2D-tracking-tuning.md index 3a00e3d5f..d715ffd00 100644 --- a/docs/source/docs/apriltag-pipelines/2D-tracking-tuning.md +++ b/docs/source/docs/apriltag-pipelines/2D-tracking-tuning.md @@ -21,7 +21,7 @@ AprilTag pipelines come with reasonable defaults to get you up and running with ### Target Family -Target families are defined by two numbers (before and after the h). The first number is the number of bits the tag is able to encode (which means more tags are available in the respective family) and the second is the hamming distance. Hamming distance describes the ability for error correction while identifying tag ids. A high hamming distance generally means that it will be easier for a tag to be identified even if there are errors. However, as hamming distance increases, the number of available tags decreases. The 2024 FRC game will be using 36h11 tags, which can be found [here](https://github.com/AprilRobotics/apriltag-imgs/tree/master/tag36h11). +Target families are defined by two numbers (before and after the h). The first number is the number of bits the tag is able to encode (which means more tags are available in the respective family) and the second is the hamming distance. Hamming distance describes the ability for error correction while identifying tag ids. A high hamming distance generally means that it will be easier for a tag to be identified even if there are errors. However, as hamming distance increases, the number of available tags decreases. The 2024 FRC game will be using 36h11 tags, which can be found [here](https://github.com/AprilRobotics/apriltag-imgs/tree/main/tag36h11). ### Decimate diff --git a/docs/source/docs/calibration/calibration.md b/docs/source/docs/calibration/calibration.md index e4e9fb3b3..d280d38d2 100644 --- a/docs/source/docs/calibration/calibration.md +++ b/docs/source/docs/calibration/calibration.md @@ -83,7 +83,7 @@ More info on what these parameters mean can be found in [OpenCV's docs](https:// Below these outputs are the snapshots collected for calibration, along with a per-snapshot mean reprojection error. A snapshot with a larger reprojection error might indicate a bad snapshot, due to effects such as motion blur or misidentified chessboard corners. -Calibration images can also be extracted from the downloaded JSON file using [this Python script](https://raw.githubusercontent.com/PhotonVision/photonvision/master/devTools/calibrationUtils.py). This script will unpack calibration images, and also generate a VNL file for use [with mrcal](https://mrcal.secretsauce.net/). +Calibration images can also be extracted from the downloaded JSON file using [this Python script](https://raw.githubusercontent.com/PhotonVision/photonvision/main/devTools/calibrationUtils.py). This script will unpack calibration images, and also generate a VNL file for use [with mrcal](https://mrcal.secretsauce.net/). ``` python3 /path/to/calibrationUtils.py path/to/photon_calibration.json /path/to/output/folder diff --git a/docs/source/docs/examples/aimandrange.md b/docs/source/docs/examples/aimandrange.md index 62abe0269..86a2d3173 100644 --- a/docs/source/docs/examples/aimandrange.md +++ b/docs/source/docs/examples/aimandrange.md @@ -1,6 +1,6 @@ # Combining Aiming and Getting in Range -The following example is from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/master/photonlib-java-examples/aimandrange)/[C++](https://github.com/PhotonVision/photonvision/tree/master/photonlib-cpp-examples/aimandrange)). +The following example is from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/main/photonlib-java-examples/aimandrange)/[C++](https://github.com/PhotonVision/photonvision/tree/main/photonlib-cpp-examples/aimandrange)). ## Knowledge and Equipment Needed diff --git a/docs/source/docs/examples/aimingatatarget.md b/docs/source/docs/examples/aimingatatarget.md index b152af0e2..1217c2ff6 100644 --- a/docs/source/docs/examples/aimingatatarget.md +++ b/docs/source/docs/examples/aimingatatarget.md @@ -1,6 +1,6 @@ # Aiming at a Target -The following example is from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/master/photonlib-java-examples/aimattarget)). +The following example is from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/main/photonlib-java-examples/aimattarget)). ## Knowledge and Equipment Needed diff --git a/docs/source/docs/examples/poseest.md b/docs/source/docs/examples/poseest.md index 27ed51a7c..4648dc988 100644 --- a/docs/source/docs/examples/poseest.md +++ b/docs/source/docs/examples/poseest.md @@ -1,6 +1,6 @@ # Using WPILib Pose Estimation, Simulation, and PhotonVision Together -The following example comes from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/master/photonlib-java-examples/poseest)/[C++](https://github.com/PhotonVision/photonvision/tree/master/photonlib-cpp-examples/poseest)/[Python](https://github.com/PhotonVision/photonvision/tree/master/photonlib-python-examples/poseest)). Full code is available at that links. +The following example comes from the PhotonLib example repository ([Java](https://github.com/PhotonVision/photonvision/tree/main/photonlib-java-examples/poseest)/[C++](https://github.com/PhotonVision/photonvision/tree/main/photonlib-cpp-examples/poseest)/[Python](https://github.com/PhotonVision/photonvision/tree/main/photonlib-python-examples/poseest)). Full code is available at that links. ## Knowledge and Equipment Needed diff --git a/docs/source/docs/objectDetection/about-object-detection.md b/docs/source/docs/objectDetection/about-object-detection.md index 70b951279..d9ecdf87b 100644 --- a/docs/source/docs/objectDetection/about-object-detection.md +++ b/docs/source/docs/objectDetection/about-object-detection.md @@ -47,6 +47,6 @@ Coming soon! PhotonVision currently ONLY supports YOLOv5 models trained and converted to `.rknn` format for RK3588 CPUs! Other models require different post-processing code and will NOT work. The model conversion process is also highly particular. Proceed with care. ::: -Our [pre-trained NOTE model](https://github.com/PhotonVision/photonvision/blob/master/photon-server/src/main/resources/models/note-640-640-yolov5s.rknn) is automatically extracted from the JAR when PhotonVision starts, only if a file named “note-640-640-yolov5s.rknn” and "labels.txt" does not exist in the folder `photonvision_config/models/`. This technically allows power users to replace the model and label files with new ones without rebuilding Photon from source and uploading a new JAR. +Our [pre-trained NOTE model](https://github.com/PhotonVision/photonvision/blob/main/photon-server/src/main/resources/models/note-640-640-yolov5s.rknn) is automatically extracted from the JAR when PhotonVision starts, only if a file named “note-640-640-yolov5s.rknn” and "labels.txt" does not exist in the folder `photonvision_config/models/`. This technically allows power users to replace the model and label files with new ones without rebuilding Photon from source and uploading a new JAR. Use a program like WinSCP or FileZilla to access your coprocessor's filesystem, and copy the new `.rknn` model file into /home/pi. Next, SSH into the coprocessor and `sudo mv /path/to/new/model.rknn /opt/photonvision/photonvision_config/models/note-640-640-yolov5s.rknn`. Repeat this process with the labels file, which should contain one line per label the model outputs with no training newline. Next, restart PhotonVision via the web UI. diff --git a/docs/source/docs/programming/photonlib/getting-target-data.md b/docs/source/docs/programming/photonlib/getting-target-data.md index 1d14088cf..7729f43b7 100644 --- a/docs/source/docs/programming/photonlib/getting-target-data.md +++ b/docs/source/docs/programming/photonlib/getting-target-data.md @@ -60,7 +60,7 @@ Use the `getLatestResult()`/`GetLatestResult()` (Java and C++ respectively) to o ``` :::{note} -Unlike other vision software solutions, using the latest result guarantees that all information is from the same timestamp. This is achievable because the PhotonVision backend sends a byte-packed string of data which is then deserialized by PhotonLib to get target data. For more information, check out the [PhotonLib source code](https://github.com/PhotonVision/photonvision/tree/master/photon-lib). +Unlike other vision software solutions, using the latest result guarantees that all information is from the same timestamp. This is achievable because the PhotonVision backend sends a byte-packed string of data which is then deserialized by PhotonLib to get target data. For more information, check out the [PhotonLib source code](https://github.com/PhotonVision/photonvision/tree/main/photon-lib). ::: ## Checking for Existence of Targets diff --git a/docs/source/docs/quick-start/quick-install.md b/docs/source/docs/quick-start/quick-install.md index 1b8e9cae6..236a30cbd 100644 --- a/docs/source/docs/quick-start/quick-install.md +++ b/docs/source/docs/quick-start/quick-install.md @@ -29,7 +29,7 @@ Limelights have a different installation processes. Simply connect the limelight Unless otherwise noted in release notes or if updating from the prior years version, to update PhotonVision after the initial installation, use the offline update option in the settings page with the downloaded jar file from the latest release. :::{note} -Limelight 2, 2+, and 3 will need a [custom hardware config file](https://github.com/PhotonVision/photonvision/tree/master/docs/source/docs/advanced-installation/sw_install/files) for lighting to work. Currently only limelight 2 and 2+ files are available. +Limelight 2, 2+, and 3 will need a [custom hardware config file](https://github.com/PhotonVision/photonvision/tree/main/docs/source/docs/advanced-installation/sw_install/files) for lighting to work. Currently only limelight 2 and 2+ files are available. ::: :::{note} diff --git a/photon-lib/py/setup.py b/photon-lib/py/setup.py index b72d1932c..7cfb98fcc 100644 --- a/photon-lib/py/setup.py +++ b/photon-lib/py/setup.py @@ -29,7 +29,7 @@ if m: split = gitDescribeResult.split("-") if len(split) == 3: year, commits, sha = split - # Chop off leading v from "v2024.1.2", and use "post" for commits to master since + # Chop off leading v from "v2024.1.2", and use "post" for commits to main since versionString = f"{year[1:]}post{commits}" print("using dev release " + versionString) else: diff --git a/scripts/install.sh b/scripts/install.sh index 73226791e..aa751c4da 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # The install script is now in photon-image-modifier # this downloads and runs that install script for people using the old short URL -wget -q https://raw.githubusercontent.com/PhotonVision/photon-image-modifier/master/install.sh -O ./real_install.sh +wget -q https://raw.githubusercontent.com/PhotonVision/photon-image-modifier/main/install.sh -O ./real_install.sh chmod +x ./real_install.sh ./real_install.sh "$@" rm ./real_install.sh