This file contains 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
thrust 16V | rpm 16V | power 16V | current 16V | voltage 16V | pwm 16V | thrust (kgf) 16V | efficiency (g/w) 16V | thrust 12V | rpm 12V | power 12V | current 12V | voltage 12V | pwm 12V | thrust (kgf) 12V | efficiency (g/w) 12V | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-9 | 3200 | 344.48 | 21.53 | 14.98 | 1100 | -4.082336185 | 11.85072046 | -6.62 | 2960 | 182.2 | 15.4 | 11.83 | 1100 | -3.00278506 | 16.48070835 | |
-8.9 | 2767 | 341.92 | 21.37 | 15.25 | 1110 | -4.082336185 | 11.93944836 | -6.58 | 2870 | 181.03 | 15.19 | 11.92 | 1110 | -2.984641344 | 16.48699853 | |
-8.7 | 3245 | 328.96 | 20.56 | 15.33 | 1120 | -4.086872114 | 12.42361416 | -6.34 | 2837 | 169.05 | 14.25 | 11.86 | 1120 | -2.875779046 | 17.0114111 | |
-8.44 | 3269 | 305.12 | 19.07 | 15.35 | 1130 | -3.828324156 | 12.54694597 | -6.09 | 2784 | 160.31 | 13.48 | 11.89 | 1130 | -2.762380818 | 17.2314941 | |
-8.23 | 3269 | 289.12 | 18.07 | 15.35 | 1140 | -3.733069645 | 12.91183469 | -5.8 | 2750 | 146.97 | 12.38 | 11.87 | 1140 | -2.630838875 | 17.90051626 | |
-7.98 | 3186 | 272.16 | 17.01 | 15.35 | 1150 | -3.619671417 | 13.2997921 | -5.59 | 2693 | 138.13 | 11.66 | 11.85 | 1150 | -2.535584364 | 18.35650738 | |
-7.59 | 3141 | 254.56 | 15.91 | 15.35 | 1160 | -3.442770183 | 13.52439575 | -5.23 | 2655 | 129.74 | 10.95 | 11.85 | 1160 | -2.372290916 | 18.2849615 |
This file contains 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 casadi as ca | |
def qr_eigen(A, iterations=100): | |
pQ = ca.SX.eye(A.size1()) | |
X = ca.SX(A) # Make a copy in SX | |
for _ in range(iterations): | |
Q, R = ca.qr(X) # QR decomposition in CasADi | |
pQ = ca.mtimes(pQ, Q) | |
X = ca.mtimes(R, Q) | |
return ca.diag(X), pQ # (eigenvalues, eigenvectors) |
This file contains 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 socket | |
import json | |
def receive_json_data(host='192.168.2.95', port=16171): | |
""" | |
Connects to a TCP server and receives JSON data. | |
Args: | |
host (str): The server's hostname or IP address. | |
port (int): The port number to connect to. |
This file contains 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 asyncio | |
import aiohttp | |
import json | |
import sys | |
import signal | |
async def get_vision_position_delta(session, url): | |
try: | |
async with session.get(url) as response: | |
response.raise_for_status() # Raise exception for HTTP errors |
This file contains 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 asyncio | |
import json | |
from urllib.parse import urlparse, parse_qs | |
import aiohttp | |
import websockets | |
import datetime | |
import csv | |
import os | |
import aiofiles |
This file contains 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 matplotlib.pyplot as plt | |
class BayesianParameterEstimator: | |
def __init__(self, param_min=0.0, param_max=5.0, num_points=500, known_variance=1.0): | |
""" | |
Initialize the Bayesian estimator. | |
:param param_min: Minimum value of the parameter space | |
:param param_max: Maximum value of the parameter space |
This file contains 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
I, i_X_p = rig_dyn.model() | |
Ic_i = [] | |
for i in range(0, ss.n_joints): | |
Ic_i.append(I[i]) | |
for i in range(ss.n_joints-1, -1, -1): | |
if i != 0: | |
p_X_i_f = pluck.inverse_spatial_transform(i_X_p[i]).T | |
Ic_i[i-1] = Ic_i[i-1] + p_X_i_f@Ic_i[i]@i_X_p[i] |
This file contains 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
#!/usr/bin/env python3 | |
''' Mavlink telemetry (.tlog) file parser. | |
Operates as a generator. Allows csv output or listing useful types/fields. | |
''' | |
import json | |
from pathlib import Path | |
from fnmatch import fnmatch | |
from pymavlink import mavutil |
This file contains 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
% MATLAB Code for Offset-Free MPC Control of Heated Swimming Pool System | |
% Clear workspace and command window | |
clear; close all; clc; | |
% System Parameters | |
A = 0.7788; | |
B = 0.0442; | |
C = 1; % Output matrix |
This file contains 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
% MATLAB Code for Offset-Free MPC Control of Heated Swimming Pool System | |
% Clear workspace and command window | |
clear; close all; clc; | |
% System Parameters | |
A = 0.7788; | |
B = 0.0442; | |
C = 1; % Output matrix |
NewerOlder