mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
Compare commits
8 Commits
v2021.1.2-
...
v2021.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5298de0f64 | ||
|
|
2330b72451 | ||
|
|
69d2499e1a | ||
|
|
0a4dcd17e0 | ||
|
|
15c687655a | ||
|
|
839f959681 | ||
|
|
0b2de7d9f1 | ||
|
|
5d139e0a4e |
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@@ -7,6 +7,8 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
@@ -104,11 +106,6 @@ jobs:
|
|||||||
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
|
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
|
||||||
pip install -r requirements.txt
|
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
|
- name: Check the docs
|
||||||
run: |
|
run: |
|
||||||
make linkcheck
|
make linkcheck
|
||||||
@@ -124,7 +121,6 @@ jobs:
|
|||||||
name: built-docs
|
name: built-docs
|
||||||
path: build/html
|
path: build/html
|
||||||
|
|
||||||
|
|
||||||
build-package:
|
build-package:
|
||||||
needs: [build-client, build-server, build-offline-docs]
|
needs: [build-client, build-server, build-offline-docs]
|
||||||
|
|
||||||
@@ -211,3 +207,16 @@ jobs:
|
|||||||
chmod +x gradlew
|
chmod +x gradlew
|
||||||
./gradlew spotlessCheck
|
./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
|
# 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.
|
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.
|
||||||
|
|
||||||
# Roadmap
|
|
||||||
|
|
||||||
Our roadmap is publicly available on [Trello](https://trello.com/photonvision).
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
@@ -18,6 +14,8 @@ A list of contributors is available in our documentation on ReadTheDocs.
|
|||||||
|
|
||||||
|
|
||||||
## Acknowledgments
|
## 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).
|
* [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)
|
* [FasterXML](https://github.com/FasterXML) - Specifically [jackson](https://github.com/FasterXML/jackson)
|
||||||
|
|
||||||
## License
|
## 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: () => ({
|
data: () => ({
|
||||||
// Used so that we can switch back to the previously selected pipeline after camera calibration
|
// Used so that we can switch back to the previously selected pipeline after camera calibration
|
||||||
previouslySelectedIndex: undefined,
|
previouslySelectedIndices: [],
|
||||||
timer: undefined,
|
timer: undefined,
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
@@ -240,15 +240,23 @@ import Logs from "./views/LogsView"
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
switchToDriverMode() {
|
switchToDriverMode() {
|
||||||
this.previouslySelectedIndex = this.$store.getters.currentPipelineIndex;
|
if (!this.previouslySelectedIndices) this.previouslySelectedIndices = [];
|
||||||
this.handleInputWithIndex('currentPipeline', -1)
|
|
||||||
},
|
for (const [i, cameraSettings] of this.$store.state.cameraSettings.entries()) {
|
||||||
rollbackPipelineIndex() {
|
this.previouslySelectedIndices[i] = cameraSettings.currentPipelineIndex;
|
||||||
if (this.previouslySelectedIndex !== null) {
|
this.handleInputWithIndex('currentPipeline', -1, i);
|
||||||
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndex || 0);
|
|
||||||
}
|
}
|
||||||
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() {
|
switchToSettingsTab() {
|
||||||
this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
|
this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
localValue: {
|
localValue: {
|
||||||
get() {
|
get() {
|
||||||
return Object.values(this.value);
|
return Object.values(this.value || [0, 0]);
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$emit("input", value);
|
this.$emit("input", value);
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ export const dataHandleMixin = {
|
|||||||
let msg = this.$msgPack.encode({[key]: value});
|
let msg = this.$msgPack.encode({[key]: value});
|
||||||
this.$socket.send(msg);
|
this.$socket.send(msg);
|
||||||
},
|
},
|
||||||
handleInputWithIndex(key, value) {
|
handleInputWithIndex(key, value, cameraIndex = this.$store.getters.currentCameraIndex) {
|
||||||
let msg = this.$msgPack.encode({
|
let msg = this.$msgPack.encode({
|
||||||
[key]: value,
|
[key]: value,
|
||||||
["cameraIndex"]: this.$store.getters.currentCameraIndex
|
["cameraIndex"]: cameraIndex,
|
||||||
});
|
});
|
||||||
this.$socket.send(msg);
|
this.$socket.send(msg);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -260,7 +260,7 @@
|
|||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="snack"
|
v-model="snack"
|
||||||
width="500px"
|
width="500px"
|
||||||
persistent="true"
|
:persistent="true"
|
||||||
>
|
>
|
||||||
<v-card
|
<v-card
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class Main {
|
|||||||
logger.error("Failed to parse command-line options!", e);
|
logger.error("Failed to parse command-line options!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
CVMat.enablePrint(true);
|
CVMat.enablePrint(false);
|
||||||
PipelineProfiler.enablePrint(false);
|
PipelineProfiler.enablePrint(false);
|
||||||
|
|
||||||
var logLevel = printDebugLogs ? LogLevel.TRACE : LogLevel.DEBUG;
|
var logLevel = printDebugLogs ? LogLevel.TRACE : LogLevel.DEBUG;
|
||||||
|
|||||||
@@ -86,9 +86,16 @@ public class SocketHandler {
|
|||||||
users.remove(context);
|
users.remove(context);
|
||||||
|
|
||||||
if (users.size() == 0) {
|
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(
|
dcService.publishEvent(
|
||||||
new IncomingWebSocketEvent<>(
|
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) {
|
if (event instanceof IncomingWebSocketEvent) {
|
||||||
var wsEvent = (IncomingWebSocketEvent<?>) event;
|
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);
|
logger.trace("Got PSC event - propName: " + wsEvent.propertyName);
|
||||||
|
|
||||||
var propName = wsEvent.propertyName;
|
var propName = wsEvent.propertyName;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ gradle.allprojects {
|
|||||||
String tagIsh
|
String tagIsh
|
||||||
try {
|
try {
|
||||||
exec {
|
exec {
|
||||||
commandLine 'git', 'describe', '--tags'
|
commandLine 'git', 'describe', '--tags', '--exclude="Dev"'
|
||||||
standardOutput = stdout
|
standardOutput = stdout
|
||||||
}
|
}
|
||||||
tagIsh = stdout.toString().trim().toLowerCase()
|
tagIsh = stdout.toString().trim().toLowerCase()
|
||||||
|
|||||||
Reference in New Issue
Block a user