Craig Schardt 8ff0d93c1f Improve network management (#1478)
This PR changes the way that photonvision interacts with nmcli to control networking on the coprocessor. Instead of modifying an existing connection, Photonvision adds new connections for DHCP and Static IP configurations. It then activiates the proper one at startup and any time that the network configuration is changed.


It also now uses the interface name and not the connection name and checks that the interface is available before making any changes. If the saved interface is not found, it updates the stored interface name and applies the network settings to the current interface. This should minimize the failure to control the network if the network interface wasn't available when PhotonVision first booted.

One other benefit of not altering the default configuration is that, if PhotonVision fails to run for any reason, the device can be accessed using the original networking configuration.

The code has been tested on an OrangePi5 and and a Raspberry Pi 4.

Addresses: #1261
2024-10-20 22:23:50 -05:00
2024-10-19 01:23:23 -04:00
2024-10-20 22:23:50 -05:00
2023-06-21 08:38:30 -07:00
2020-03-21 01:00:34 +02:00
2024-06-30 16:10:12 -04:00

PhotonVision

CI codecov Discord

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. You can find our comprehensive documentation here.

The latest release of platform-specific jars and images is found here.

If you are interested in contributing code or documentation to the project, please read our getting started page for contributors and join the Discord to introduce yourself! We hope to provide a welcoming community to anyone who is interested in helping.

Authors

Documentation

Building

Gradle is used for all C++ and Java code, and NPM is used for the web UI. Instructions to compile PhotonVision yourself can be found in our docs.

You can run one of the many built in examples straight from the command line, too! They contain a fully featured robot project, and some include simulation support. The projects can be found inside the photonlib-java-examples and photonlib-cpp-examples subdirectories, respectively. Instructions for running these examples directly from the repo are found in the docs.

Gradle Arguments

Note that these are case sensitive!

  • -PArchOverride=foobar: builds for a target system other than your current architecture. Valid overrides are:
    • linuxathena
    • linuxarm64
    • arm64
    • x86-64
    • x86
  • -PtgtIP: Specifies where ./gradlew deploy should try to copy the fat JAR to
  • -Pprofile: enables JVM profiling

If you're cross-compiling, you'll need the wpilib toolchain installed. This can be done via Gradle: for example ./gradlew installArm64Toolchain or ./gradlew installRoboRioToolchain

Out-of-Source Dependencies

PhotonVision uses the following additonal out-of-source repositories for building code.

Additional packages

For now, using mrcal requires installing these additional packages on Linux systems:

sudo apt install libcholmod3 liblapack3 libsuitesparseconfig5

Acknowledgments

PhotonVision was forked from Chameleon Vision. Thank you to everyone who worked on the original project.

License

PhotonVision is licensed under the GNU General Public License.

Meeting Notes

Our meeting notes can be found in the wiki section of this repository.

Description
PhotonVision - FRC Vision Processing
Readme GPL-3.0 639 MiB
Languages
Java 56.5%
C++ 14.9%
Vue 9.2%
Python 7.9%
TypeScript 7.9%
Other 3.4%