This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
import cv2 | |
NACA_0018 =[[1.0000, 0.00000], | |
[0.9500, 0.01210], | |
[0.9000, 0.02172], | |
[0.8000, 0.03935], | |
[0.7000, 0.05496], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from filterpy.kalman import ExtendedKalmanFilter | |
# Assume our state vector x includes only position for simplicity. | |
# In practice, it would include orientation, velocity, etc. | |
# Let’s say x[0:3] is the "true" position of the reference point. | |
# Known sensor offset relative to the reference point | |
sensor_offset = np.array([0.1, -0.05, 0.0]) # in meters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
cap = cv2.VideoCapture('video.mp4') | |
ret, prev_frame = cap.read() | |
if not ret: | |
raise ValueError("Could not read video.") | |
prev_gray = cv2.cvtColor(prev_frame, cv2.COLOR_BGR2GRAY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <Arduino.h> | |
// Define number of IMUs and EKF parameters | |
#define NUM_IMUS 3 // Number of IMU sensors | |
#define EKF_N 10 // State vector dimension: [position (3), velocity (3), quaternion (4)] | |
#define EKF_M 9 // Measurement vector dimension: [accelerometer (3), gyroscope (3), magnetometer (3)] | |
// Include TinyEKF and set dimensions | |
#define EKF_N 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from huggingface_hub import hf_hub_download | |
from generator import load_csm_1b | |
import torchaudio | |
# need this to access to model. | |
# you also need to get access to https://huggingface.co/meta-llama/Llama-3.2-1B | |
from huggingface_hub import login | |
login("your_huggingface_token") | |
model_path = hf_hub_download(repo_id="sesame/csm-1b", filename="ckpt.pt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import open3d as o3d | |
import matplotlib.pyplot as plt | |
import transforms3d as t3d | |
import trimesh | |
import scipy.spatial | |
class SensorLocalizer: | |
def __init__(self, cad_model_path, scale_factor=1.0): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import open3d as o3d | |
import transforms3d as t3d | |
import trimesh | |
import scipy.spatial | |
from sklearn.neighbors import KDTree | |
import time | |
import threading | |
import queue | |
import concurrent.futures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from huggingface_hub import hf_hub_download | |
from huggingface_hub import login | |
from generator import load_csm_1b | |
import torchaudio | |
import sounddevice as sd | |
import numpy as np | |
from openai import OpenAI | |
import os | |
login("__your_huggingface_access_token_here__") |