Skip to content

Instantly share code, notes, and snippets.

View tomas789's full-sized avatar

Tomas Krejci tomas789

  • Ampiato.com
  • Czech Republic, Europe
View GitHub Profile
@tomas789
tomas789 / linkedin_extract_datetime.py
Last active June 30, 2023 07:40
LinkedIn: Extract datetime from post URL.
import datetime
from urllib.parse import urlparse
def linkedin_post_datetime(url: str) -> datetime.datetime:
"""
Convert LinkedIN post URL to datetime of when the post was created.
You can gen the post URL by clicking tripple dots in upper right corner of the post
and then selecting "Copy link to post".
(env) tomaskrejci @ Tomass-MBP-2.RD ➜ pymsckf git:(replay-from-app) ✗ docker run -v ~/ios_recordings:/data -v ~/Developer/pymsckf/examples:/examples -v `pwd`/calibration_output:/output --security-opt seccomp:unconfined -it -e DISPLAY=docker.for.mac.localhost:0 -w /output pymsckf_calibration kalibr_calibrate_imu_camera --bag /data/ios_recording_101.bag --cam /output/camchain-dataios_recording_96.yaml --imu /examples/imu_vins_mobile.yaml --target /examples/april_6x6_50x50cm.yaml
importing libraries
Initializing IMUs:
Update rate: 100.0
Accelerometer:
Noise density: 0.02
Noise density (discrete): 0.2
Random walk: 0.002
Gyroscope:
Noise density: 0.02
(env) tomaskrejci @ Tomass-MBP-2.RD ➜ pymsckf git:(replay-from-app) ✗ docker run -v ~/ios_recordings:/data -v ~/Developer/pymsckf/examples:/examples -v `pwd`/calibration_output:/output --security-opt seccomp:unconfined -it -e DISPLAY=docker.for.mac.localhost:0 -w /output pymsckf_calibration kalibr_calibrate_imu_camera --bag /data/ios_recording_100.bag --cam /output/camchain-dataios_recording_96.yaml --imu /examples/imu_vins_mobile.yaml --target /examples/april_6x6_50x50cm.yaml
importing libraries
Initializing IMUs:
Update rate: 100.0
Accelerometer:
Noise density: 0.02
Noise density (discrete): 0.2
Random walk: 0.002
Gyroscope:
Noise density: 0.02
cam0:
T_cam_imu:
- [0.005397773388641874, -0.9998572413908012, 0.016011273554103707, 0.09315162124446877]
- [-0.999983932903204, -0.0054247971439093275, -0.0016448438801904336, 0.016759819073606755]
- [0.0017314669756124, -0.016002137804896704, -0.9998704584133825, -0.007388480810763209]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: []
camera_model: pinhole
distortion_coeffs: [0.03745064619036303, -0.05696336726790861, 0.0014705393416119647,
0.003161343303012978]
Calibration results
====================
Camera-system parameters:
cam0 (/cam0/image_raw):
type: <class 'aslam_cv.libaslam_cv_python.DistortedPinholeCameraGeometry'>
distortion: [ 0.03745065 -0.05696337 0.00147054 0.00316134] +- [ 0.00352425 0.00648838 0.00070408 0.00066755]
projection: [ 524.58054214 525.4382302 327.07092587 229.298555 ] +- [ 1.3060177 1.25092538 1.07929177 1.27724979]
reprojection error: [-0.000002, 0.000002] +- [0.229364, 0.214071]
pymsckf convert_kalibr -d ~/Downloads/ios_recording_96.sqlite -o ~/ios_recordings/ios_recording_96
#Accelerometers
accelerometer_noise_density: 0.02 #Noise density (continuous-time)
accelerometer_random_walk: 0.002 #Bias random walk
#Gyroscopes
gyroscope_noise_density: 0.02 #Noise density (continuous-time)
gyroscope_random_walk: 4.0e-5 #Bias random walk
rostopic: /imu0 #the IMU ROS topic
update_rate: 100.0 #Hz (for discretization of the values above)
V2_02_medium (20 FPS) V2_03_difficult (20 FPS) V2_02_medium (10 FPS) V2_03_difficult (10 FPS)
Frame rate 20 FPS 20 FPS 10 FPS 10 FPS
Simulation time 80 s 80 s 80 s 80 s
Execution time 114.39 72.89 54.79 34.99
Real-time factor 0.70 1.10 1.46 2.29
RMSE 0.2711 m 0.4309 m 0.7339 m 14.5115 m
Final error 0.334 m (0.57 %TTD) 0.549 m (0.94 %TTD) 1.364 m (2.35 %TTD) 11.826 m (20.33 %TTD)
V2_02_medium (20 FPS) V2_03_difficult (20 FPS) V2_02_medium (10 FPS) V2_03_difficult (10 FPS)
Frame rate 20 FPS 20 FPS 10 FPS 10 FPS
Simulation time 80 s 80 s 80 s 80 s
Execution time 115.19 s 80.71 s 57.16 s 41.14 s
Real-time factor 0.69 0.99 1.40 1.94
RMSE 0.8277 m 0.9524 m 0.5909 m 0.4650 m
Final error 1.278 m (2.20 %TTD) 1.628 m (2.80 %TTD) 0.920 m (1.58 %TTD) 0.822 m (1.412 %TTD)
include Makefile.vars
all: \
reconstruction_global/ok.txt \
reconstruction_incremental/ok.txt
exports: \
export_keypoints \
export_matches \