mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Compare commits
8 Commits
v2021.1.2-
...
v2021.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5298de0f64 | ||
|
|
2330b72451 | ||
|
|
69d2499e1a | ||
|
|
0a4dcd17e0 | ||
|
|
15c687655a | ||
|
|
839f959681 | ||
|
|
0b2de7d9f1 | ||
|
|
5d139e0a4e |
23
.github/workflows/main.yml
vendored
23
.github/workflows/main.yml
vendored
@@ -7,6 +7,8 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
@@ -104,11 +106,6 @@ jobs:
|
||||
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Install LaTeX and other system dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-lang-greek texlive-luatex texlive-xetex texlive-fonts-extra dvipng graphviz
|
||||
|
||||
- name: Check the docs
|
||||
run: |
|
||||
make linkcheck
|
||||
@@ -123,7 +120,6 @@ jobs:
|
||||
with:
|
||||
name: built-docs
|
||||
path: build/html
|
||||
|
||||
|
||||
build-package:
|
||||
needs: [build-client, build-server, build-offline-docs]
|
||||
@@ -210,4 +206,17 @@ jobs:
|
||||
- run: |
|
||||
chmod +x gradlew
|
||||
./gradlew spotlessCheck
|
||||
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [build-package]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: jar
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: '**/*'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
16
README.md
16
README.md
@@ -1,16 +1,12 @@
|
||||
# Photon Vision
|
||||
|
||||
[](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [](https://codecov.io/gh/PhotonVision/photonvision)
|
||||
[](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [](https://codecov.io/gh/PhotonVision/photonvision) [](https://discord.gg/wYxTwym)
|
||||
|
||||
A copy of the latest development release is available [here](https://github.com/PhotonVision/photonvision/releases/tag/Dev).
|
||||
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).
|
||||
|
||||
PhotonVision is a fork of [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/), a free open-source software for FRC teams to use for vision processing on their robots. Thank you to everyone who worked on the original project.
|
||||
A copy of the latest Raspberry Pi image is available [here](https://github.com/PhotonVision/photon-pi-gen/releases). A copy of the latest standalone JAR is available [here](https://github.com/PhotonVision/photonvision/releases). If you are a Gloworm user you can find the latest Gloworm image [here](https://github.com/gloworm-vision/pi-gen/releases).
|
||||
|
||||
For information on contributing or running PhotonVision, please read our documentation on ReadTheDocs.
|
||||
|
||||
# Roadmap
|
||||
|
||||
Our roadmap is publicly available on [Trello](https://trello.com/photonvision).
|
||||
If you are interested in contributing code or documentation to the project, please [read our getting started page for contributors](https://docs.photonvision.org/en/latest/docs/other/contributing/index.html) and **[join the Discord](https://discord.gg/wYxTwym) to introduce yourself!** We hope to provide a welcoming community to anyone who is interested in helping.
|
||||
|
||||
## Authors
|
||||
|
||||
@@ -18,6 +14,8 @@ A list of contributors is available in our documentation on ReadTheDocs.
|
||||
|
||||
|
||||
## Acknowledgments
|
||||
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).
|
||||
|
||||
@@ -30,4 +28,4 @@ A list of contributors is available in our documentation on ReadTheDocs.
|
||||
* [FasterXML](https://github.com/FasterXML) - Specifically [jackson](https://github.com/FasterXML/jackson)
|
||||
|
||||
## License
|
||||
Usage of PhotonVision must fall under all terms of [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
PhotonVision is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
@@ -145,7 +145,7 @@ import Logs from "./views/LogsView"
|
||||
},
|
||||
data: () => ({
|
||||
// Used so that we can switch back to the previously selected pipeline after camera calibration
|
||||
previouslySelectedIndex: undefined,
|
||||
previouslySelectedIndices: [],
|
||||
timer: undefined,
|
||||
}),
|
||||
computed: {
|
||||
@@ -240,15 +240,23 @@ import Logs from "./views/LogsView"
|
||||
})
|
||||
},
|
||||
switchToDriverMode() {
|
||||
this.previouslySelectedIndex = this.$store.getters.currentPipelineIndex;
|
||||
this.handleInputWithIndex('currentPipeline', -1)
|
||||
},
|
||||
rollbackPipelineIndex() {
|
||||
if (this.previouslySelectedIndex !== null) {
|
||||
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndex || 0);
|
||||
if (!this.previouslySelectedIndices) this.previouslySelectedIndices = [];
|
||||
|
||||
for (const [i, cameraSettings] of this.$store.state.cameraSettings.entries()) {
|
||||
this.previouslySelectedIndices[i] = cameraSettings.currentPipelineIndex;
|
||||
this.handleInputWithIndex('currentPipeline', -1, i);
|
||||
}
|
||||
this.previouslySelectedIndex = null;
|
||||
},
|
||||
rollbackPipelineIndex()
|
||||
{
|
||||
if (this.previouslySelectedIndices !== null) {
|
||||
for (const [i] of this.$store.state.cameraSettings.entries()) {
|
||||
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndices[i] || 0, i);
|
||||
}
|
||||
}
|
||||
this.previouslySelectedIndices = null;
|
||||
}
|
||||
,
|
||||
switchToSettingsTab() {
|
||||
this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
computed: {
|
||||
localValue: {
|
||||
get() {
|
||||
return Object.values(this.value);
|
||||
return Object.values(this.value || [0, 0]);
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("input", value);
|
||||
|
||||
@@ -4,10 +4,10 @@ export const dataHandleMixin = {
|
||||
let msg = this.$msgPack.encode({[key]: value});
|
||||
this.$socket.send(msg);
|
||||
},
|
||||
handleInputWithIndex(key, value) {
|
||||
handleInputWithIndex(key, value, cameraIndex = this.$store.getters.currentCameraIndex) {
|
||||
let msg = this.$msgPack.encode({
|
||||
[key]: value,
|
||||
["cameraIndex"]: this.$store.getters.currentCameraIndex
|
||||
["cameraIndex"]: cameraIndex,
|
||||
});
|
||||
this.$socket.send(msg);
|
||||
},
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
<v-dialog
|
||||
v-model="snack"
|
||||
width="500px"
|
||||
persistent="true"
|
||||
:persistent="true"
|
||||
>
|
||||
<v-card
|
||||
color="primary"
|
||||
|
||||
@@ -140,7 +140,7 @@ public class Main {
|
||||
logger.error("Failed to parse command-line options!", e);
|
||||
}
|
||||
|
||||
CVMat.enablePrint(true);
|
||||
CVMat.enablePrint(false);
|
||||
PipelineProfiler.enablePrint(false);
|
||||
|
||||
var logLevel = printDebugLogs ? LogLevel.TRACE : LogLevel.DEBUG;
|
||||
|
||||
@@ -86,9 +86,16 @@ public class SocketHandler {
|
||||
users.remove(context);
|
||||
|
||||
if (users.size() == 0) {
|
||||
logger.info("All websocket connections are closed. Setting inputShouldShow to false.");
|
||||
|
||||
// cameraIndex -1 means the event is received by all cameras
|
||||
dcService.publishEvent(
|
||||
new IncomingWebSocketEvent<>(
|
||||
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS, "inputShouldShow", false));
|
||||
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS,
|
||||
"inputShouldShow",
|
||||
false,
|
||||
-1,
|
||||
null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,9 @@ public class VisionModuleChangeSubscriber extends DataChangeSubscriber {
|
||||
if (event instanceof IncomingWebSocketEvent) {
|
||||
var wsEvent = (IncomingWebSocketEvent<?>) event;
|
||||
|
||||
if (wsEvent.cameraIndex != null && wsEvent.cameraIndex == parentModule.moduleIndex) {
|
||||
// Camera index -1 means a "multicast event" (i.e. the event is received by all cameras)
|
||||
if (wsEvent.cameraIndex != null
|
||||
&& (wsEvent.cameraIndex == parentModule.moduleIndex || wsEvent.cameraIndex == -1)) {
|
||||
logger.trace("Got PSC event - propName: " + wsEvent.propertyName);
|
||||
|
||||
var propName = wsEvent.propertyName;
|
||||
|
||||
@@ -8,7 +8,7 @@ gradle.allprojects {
|
||||
String tagIsh
|
||||
try {
|
||||
exec {
|
||||
commandLine 'git', 'describe', '--tags'
|
||||
commandLine 'git', 'describe', '--tags', '--exclude="Dev"'
|
||||
standardOutput = stdout
|
||||
}
|
||||
tagIsh = stdout.toString().trim().toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user