Commit Graph

41 Commits

Author SHA1 Message Date
Matt Morley
abbf3f2820 Use normalized pixels in cPNP problem formulation (#1816)
## Description

instead of using camera calibration, the CasADi problem formulation now
expect the caller to provide "normalized pixel coordinates". This
reduces the number of floating point operations we need to perform (and
reduces total LOC by 6%). `casadi_wrapper.cpp` now converts from (u, v)
coordinates to normalized (x'', y'') coordinates with:

x'' = (u - c_x) / f_x
y'' = (u - c_y) / f_y

Which is the inverse of this (from [opencv
docs](https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html), and
assuming no distortion):

![image](https://github.com/user-attachments/assets/41ca657d-af42-4cdf-9c25-6a4f04d20940)

In my testing, this is ~16% faster on my x86 laptop. Would love some rio
benchmarks.

## Meta

Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [~] If this PR changes behavior or adds a feature, user documentation
is updated
- [~] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [~] If this PR touches configuration, this is backwards compatible
with settings back to v2024.3.1
- [~] If this PR addresses a bug, a regression test for it is added
2025-03-19 00:34:56 -04:00
Matt Morley
533f8c97fd Add constrained solvePNP strategy (#1682)
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Co-authored-by: Jade Turner <spacey-sooty@proton.me>
2025-02-19 14:15:27 +08:00
Jade
ffc4e06ac6 Move to main over master (#1642)
Resolves https://github.com/PhotonVision/photonvision/issues/251

---------

Signed-off-by: Jade Turner <spacey-sooty@proton.me>
2024-12-20 09:24:52 -08:00
Jade
d8de4a7863 [build] Update wpiformat to 2024.45 (#1545)
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
2024-11-10 13:42:16 +08:00
Craig Schardt
58a0597c86 Make install.sh run the version from photon-image-modifier. (#1531)
We've moved the install script to photon-image-modifier. This updates
the install script in photonvision to just download and run the
install.sh from photon-image-modifier.
2024-11-06 23:00:11 -06:00
Jade
75e2498f53 Fix typos (#1508)
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
2024-11-01 23:51:16 -04:00
Emmy Chow
6f52267c26 Install script improvements (#1456) 2024-10-27 15:07:28 -07:00
Matt
f33218c49c Add message UUID and type names to hash and message defintion (#1409) 2024-09-22 22:27:13 -04:00
Craig Schardt
dbe566cb55 Update install.sh for OPi5 Ubuntu 24.04 (#1390)
This updates the install script to work correctly on Ubuntu 24.04
versions of the Orange Pi 5 images.

Changes include:
- installing libatomic1
- disabling networkd-wait-online if using Network Manager
- using systemctl instead of service to detect if photonvision is
running
- detecting if this is a RK3588 cpu and enabling all cores
2024-08-13 10:54:26 -04:00
Craftzman7
9e58f5ed02 Disable Arm32 Builds (#1325)
Disables Arm32 builds and removes mention of the build option in the README.
2024-05-19 20:35:40 -04:00
Matt
560f379109 Bump libcamera to fix picam v1, remove duplicate opencv (#1263) 2024-05-10 11:09:01 -05:00
Vasista Vovveti
4a3200d0c0 Run apt update and install sqlite3 (#1247) 2024-02-19 21:37:55 -05:00
Gautam
c7508fea46 Add v4l-utils to install script (#1201)
adds about 2kb to our image
2024-01-27 09:46:50 -05:00
Judson James
354dd15620 Rewrite ARM builds to use arm-runner-action to resolve OrangePi5 images (#1143) 2024-01-12 20:52:39 -08:00
Matt
e71ce899d6 Add mrcal packges to install script (#1128)
Closes #1124

Also bumps opencv to 4.6 to match our libcamera driver
2024-01-07 20:18:48 -05:00
Craig Schardt
b8a6a5d56a Install NetworkManager on Ubuntu distributions (fixes #1052) (#1070)
Add the following args to the install script:

Syntax: sudo ./install.sh [-h|m|n|q]
  options:
  -h        Display this help message.
  -m        Install and configure NetworkManager (Ubuntu only).
  -n        Disable networking. This will also prevent installation of NetworkManager.
  -q        Silent install, automatically accepts all defaults. For non-interactive use.
2024-01-06 09:45:56 -05:00
Matt
cba70d47ff Use photon-image-modifier for Pi images (#1081)
Upgrades to Debian 12 as the base for our Pi images and adds an orange pi 5 build.

This uses the latest stable libcamera, which has weird AWB bugs with the OV5647/pi camera v1.
2024-01-04 09:57:45 -05:00
Paul Rensing
54840f0420 Fix typo in systemd parameter (#1099) 2024-01-01 12:51:02 -05:00
Matt
0356eeeb50 Install script use Java 17 2023-12-19 19:38:55 -05:00
Craig Schardt
24a0c9c270 Use correct package name (#891) 2023-07-27 07:24:12 -07:00
Matt
454f8a1773 Install JRE instead of JDK in install script (#883)
Should reduce the size of packages needed to be downloaded
2023-07-21 06:13:36 -07:00
smoser-frc
a985c6cf3a Fix #748 - add libopencv-core4.5 for aarch64 systems. (#749)
* Add and use a function in install.sh to determine if package is installed.

Move the "is a package installed" code into a function.

* Install libopencv-core4.5 on aarch64, which is likely raspberry pi.

The libphotonvision.so on Raspberry pi depends on libopencv-core4.5.
The code here installs that package on all aarch64 systems, as
there was not an obvious way to install on only Raspberry pi systems.

Fixes #748.

Co-authored-by: Scott Moser <smoser@brickies.net>
2023-01-18 09:25:10 -05:00
Matt
971b471f92 Make install script auto-detect arch (#679)
* Make install script auto-detect arch #679

Tested on linux x64 and aarch64

* Fix arm32 uname string

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2023-01-02 09:12:10 -06:00
Mohammad Durrani
eedbfe3d49 Generate limelight + Photon images (#669)
* change to 64 bit image generation

* Generate LL and Pi images in workflow

* Update main.yml

* Update main.yml

* Update main.yml

* REVERTME yeet publish

* Update main.yml

* Add archive suffix to generator

* Bump base images to beta 3

* Add more error prints to image gen

* Fix image base URL

* Bump pi/LL base images

* Update main.yml

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-12-31 19:24:37 -05:00
Matt
7ff630dc44 Replace MMAL driver with Libcamera (#491)
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-12-28 14:21:41 -05:00
Matt
14d263a567 Fix dev release artifact path (#654) 2022-12-27 15:55:59 -05:00
Paul Rensing
4382b8ea3f Cpu performance mode & BIG.little tweaks (#633)
* Add nice value to service file, and give example CPU selection for those who need it.

* Use cpufrequtils package to set CPUs into performance mode

* Add comment about nice value

* Need to say "yes" to installing cpufrequtils, and safer to do so for all installs.

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2022-12-26 23:04:46 -05:00
shueja-personal
bb63af601d Update to wpilib 2023 beta 7 (#607)
We now need platform specific jars -- reworks actions to support that. Currently only generates 32 bit pi images.
2022-12-16 20:05:23 -05:00
Mohammad Durrani
da1aabae3a Add avahi daemon to install script (#625) 2022-12-08 19:23:02 -05:00
Mohammad Durrani
b72f4ca2a9 Update heap size for install script (#622) 2022-12-01 18:25:29 -06:00
Mohammad Durrani
ffd741ec0a Add curl (#618)
* Add curl

* goofy wording

Co-authored-by: shueja-personal <32416547+shueja-personal@users.noreply.github.com>
2022-12-01 18:24:57 -06:00
Matt
0f99044468 Update pi image generation zip/xz confusion (#555)
* Add prints to image generation

* Make xz multithreaded

* More rename copypasta
2022-10-31 11:27:57 -04:00
Chris Gerth
aff163fc6a Pull latest pi image and updates for .xz (previously .zip) (#506) 2022-10-21 20:50:45 -04:00
Matt
8b079d9b20 Add pi-only JAR createion (#362) 2021-12-18 12:53:08 -05:00
Tyler Veness
5ca39e7f84 Upgrade to Gradle 7.2 and WPILib 2022 (#316) 2021-11-21 20:22:56 -05:00
Banks T
0b20111824 Add update script (#248) 2021-02-01 11:00:29 -08:00
Banks T
125cd35557 Fix curl error, update service unit file (#129) 2020-09-18 21:37:56 -04:00
Prateek Machiraju
7bf92a9db3 Fix spelling error in install script (#113) 2020-09-05 16:28:17 -04:00
Prateek Machiraju
61ab1b2bd2 Add uninstall script (#78) 2020-08-07 22:40:22 -04:00
Prateek Machiraju
74f20a3150 Remove photonvision service if it already exists (#76) 2020-08-06 12:52:54 -07:00
Prateek Machiraju
e2768eaee8 Add install script (#67) 2020-08-01 22:52:19 -04:00