-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-byo.yaml
93 lines (93 loc) · 3.26 KB
/
config-byo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
geometry: MovingMirror
kalman_filter_parameters:
motion_noise: 3.0
observation_noise: 0.0001
kalman_filter_dist_parameters:
# Motion noise [m/s2] for constant-speed dynamic model is
# root-mean-square of (unknown random) acceleration [m/s2].
# flying animals have thrust to mass ratios anywhere between
# circa 11 and 50 m/s2 [doi: 10.1098/rsos.160746]. Honey bees
# are probably around 17 m/s2.
motion_noise: 20
# rms measurement noise at 1 meter; this is internally scaled
# according to stereopsis law (i.e., multiplied by r^2)
observation_noise: 0.0005
control_loop_timestep_secs: 0.001
kp_pan_angle: 0.0
kp_tilt_angle: 0.0
ki_pan_angle: 20.0
ki_tilt_angle: 15.0
centroid_to_sensor_x_angle_func:
dx_gain: 0.000138 # 3.45 um / 25mm (px pitch / focal length)
dy_gain: 0.0
offset: 0.0
centroid_to_sensor_y_angle_func:
dx_gain: 0.0
dy_gain: -0.000138
offset: 0.0
pan_motor_config:
endpoint_low: -3.14
endpoint_high: 3.14
neutral_position: 0.0
tilt_motor_config:
endpoint_low: -1.5
endpoint_high: 1.5
neutral_position: 0.0
pan_trinamic_config:
microsteps_per_radian: 117437.6
tilt_trinamic_config:
microsteps_per_radian: 20371.8
# microsteps_per_radian: 40764.3 this refers to mirror angles
focus_motor_config:
motor: !Trinamic
port: COM5
min_pos: -22300.0
max_pos: 0.0
pos_offset: 40.0 #half-backlash, because of how calibration was done
adjust_step: 10.0
park_position: 0.0
home_position: 2.0
backlash: 80.0
noise_gate: 10.0
cal:
distance_offset: 0.114
#mot_pos = a0 + a1/r^1 + a2/r^2 + a3/r^3
a0: -21780
a1: 4361.1
a2: 0.0
a3: 178.82
min_dist: 0.6
max_dist: 1e6
tracking_thresholds:
msecs_to_suspend: 1000 # how long to keep tracking the lost animal with estimated velocity, before switching to SuspendedClosedLoop (staring at the last observation)
msecs_to_acquire_lock: 30000 # how long to stay in SuspendedClosedLoop before centering
# motor_timeconstant (s) needs to be larger than main loop dt
# if motor_timeconstant_secs=dt (=.001), the estimated motor position is the
# current motor command
motor_timeconstant_secs: .01
#stereopsis parameters
secondary_cam_name: Basler-40300216
strand_cam_main:
url: http://127.0.0.1:3440
on_attach_json_commands:
- '{"ToCamera":{"SetImOpsCenterX":960}}'
- '{"ToCamera":{"SetImOpsCenterY":600}}'
- '{"ToCamera":{"SetImOpsThreshold":250}}'
- '{"ToCamera":{"ToggleImOpsDetection":true}}'
# - '{"ToCamera":{"SetMp4MaxFramerate": "Fps30"}}'
# - '{"ToCamera":{"SetMp4Codec":{"Ffmpeg":{"device_args":[["-vaapi_device","/dev/dri/renderD128"]],"pre_codec_args":[["-vf","format=nv12,hwupload"]],"codec":"h264_vaapi","post_codec_args":null}}}}'
strand_cam_secondary:
url: http://127.0.0.1:3441
on_attach_json_commands:
- '{"ToCamera":{"SetImOpsCenterX":960}}'
- '{"ToCamera":{"SetImOpsCenterY":600}}'
- '{"ToCamera":{"SetImOpsThreshold":250}}'
- '{"ToCamera":{"ToggleImOpsDetection":true}}'
# - '{"ToCamera":{"SetMp4MaxFramerate": "Fps1"}}'
#- '{"ToCamera":{"SetMp4Codec":{"Ffmpeg":{"device_args":[["-vaapi_device","/dev/dri/renderD128"]],"pre_codec_args":[["-vf","format=nv12,hwupload"]],"codec":"h264_vaapi","post_codec_args":null}}}}'
stereopsis_calib:
r1_m: 0.918
x_offset_1_px: 191.7
r2_m: 14.41
x_offset_2_px: -65.9
pixel_size_um: 3.4