Skip to content

Instantly share code, notes, and snippets.

View Hardwarize's full-sized avatar

Guillermo Álvarez Hardwarize

View GitHub Profile
@Hardwarize
Hardwarize / academy.py
Last active April 29, 2026 19:17
Unibotics April challenge
import Frequency
import HAL
import WebGUI
import cv2
import numpy as np
import time
import math
from collections import deque
history_size = 5
@Hardwarize
Hardwarize / sonar_horizontal_crop.py
Created April 10, 2026 10:39
Geometric alignment and FOV synchronization between RGB camera pixels and multi-beam sonar data for underwater sensor fusion.
"""
Camera-Sonar Horizontal Field of View (FOV) Alignment Visualizer.
This script demonstrates how to correlate a specific horizontal slice of an RGB
camera image with a 2D Forward-Looking Sonar (FLS) image. It uses camera intrinsic
parameters to calculate the physical angle (azimuth) of a pixel range, and then
maps that angle to the corresponding acoustic beams on the sonar.
Assumptions:
- The camera and sonar are perfectly aligned (bore-sighted) facing forward.