TeamOpenFIRE / OpenFIRE-Firmware

Reference firmware for the OpenFIRE project, built for the RP2040 microcontroller
GNU Lesser General Public License v2.1
44 stars 13 forks source link

[REQUEST] Camera orientation / rotation #20

Closed krayon closed 2 months ago

krayon commented 2 months ago

After trying to work out what was wrong with my camera and/or calibration for quite some time, I realised that it appears that my camera is upside-down. I'm fairly sure I've got it the "expected" orientation (gun half facing to the right, the LED, and "TOP" label, is pointed upwards) yet I must turn the gun 180 degrees around in order to get correct functionality.

A setting for the 4 potential camera rotations may be useful here, eg:

  1. Rotate : gun-x = cam-x, gun+x = cam+x, gun-y = cam-y, gun+y = cam+y
  2. Rotate 90°: gun-x = cam-y, gun+x = cam+y, gun-y = cam-x, gun+y = cam+x
  3. Rotate 180°: gun-x = cam+x, gun+x = cam-x, gun-y = cam+y, gun+y = cam-y
  4. Rotate 270°: gun-x = cam+y, gun+x = cam-y, gun-y = cam+x, gun+y = cam-x
SeongGino commented 2 months ago

Orientation differs between different cameras - sometimes in subtle ways, others in a whole other orientation - so it is something that is expected to be resolved in the build process by utilizing the Test Mode when docked to the App; likewise for resolving tilt problems. It would be quite a bit of work to add (between both firmware and app) for something that's only done once and never touched again.

One is free to submit a PR though; we can discuss specifics more when/if that time comes, but isn't something I will be personally pursuing.