OSVR-Core
ConfigParams.h
Go to the documentation of this file.
1 
11 // Copyright 2016 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_ConfigParams_h_GUID_22101CEF_879B_4781_2733_F5F7AE4E3633
26 #define INCLUDED_ConfigParams_h_GUID_22101CEF_879B_4781_2733_F5F7AE4E3633
27 
28 // Internal Includes
29 #include "BlobParams.h"
30 
31 // Library/third-party includes
32 // - none
33 
34 // Standard includes
35 #include <cstdint>
36 #include <string>
37 
38 namespace osvr {
39 namespace vbtracker {
40 
41  static const double BaseMeasurementVariance = 3.0;
42 
43  struct IMUInputParams {
44  std::string path =
45  "/com_osvr_Multiserver/OSVRHackerDevKit0/semantic/hmd";
46 
49  bool calibrateAnyway = false;
50 
52  bool useOrientation = true;
53 
55  double orientationVariance = 1.0e-7;
56 
57  std::int32_t orientationMicrosecondsOffset = 0;
58 
60  bool useAngularVelocity = true;
61 
63  double angularVelocityVariance = 1.0e-1;
64 
65  std::int32_t angularVelocityMicrosecondsOffset = 0;
66  };
67 
68  struct TuningParams {
69  TuningParams();
70  double noveltyPenaltyBase;
71 
72  double distanceMeasVarianceBase;
73  double distanceMeasVarianceIntercept;
74  };
75 
79  enum class BuiltInTargetSets { HDK1xChassis, HDK2Chassis };
80 
82  struct ConfigParams {
86  bool performingOptimization = false;
87 
89  bool silent = false;
90 
93  bool logRawBlobs = false;
94 
97  bool logUsableLeds = false;
98 
99  TuningParams tuning;
100 
103 
106 
108  BuiltInTargetSets targetSet = BuiltInTargetSets::HDK1xChassis;
109 
113  bool continuousReporting = true;
114 
116  bool highGain = true;
117 
119  double additionalPrediction = 0.;
120 
123  double maxResidual = 0.03631354168383816;
124 
130  double initialBeaconError = 1e-7; // 0.001;
131 
134  double blobMoveThreshold = 3.5;
135 
137  bool debug = false;
138 
141  int numThreads = 1;
142 
146  double processNoiseAutocorrelation[6];
147 
151  double linearVelocityDecayCoefficient = 0.9040551503451977;
152 
156  double angularVelocityDecayCoefficient = 0.8945437897688864;
157 
162  double noBeaconLinearVelocityDecayCoefficient = 0.005878868009089861;
163 
169  double measurementVarianceScaleFactor = 1.5;
170 
173  bool offsetToCentroid = false;
174 
177  double manualBeaconOffset[3];
178 
183  bool includeRearPanel = true;
184 
188  double headCircumference = 55.75;
189 
194  double headToFrontBeaconOriginDistance = 0;
195 
198  double backPanelMeasurementError = BaseMeasurementVariance;
199 
204  double beaconProcessNoise = 1.e-19;
205 
208  double highResidualVariancePenalty = 7.513691210865344;
209 
213  bool streamBeaconDebugInfo = false;
214 
219  float boundingBoxFilterRatio = 5.f / 4.f;
220 
225  double maxZComponent = -0.3;
226 
229  bool shouldSkipBrightLeds = false;
230 
235  double brightLedVariancePenalty = 28.32749811268542;
236 
244  bool blobsKeepIdentity = false;
245 
247  bool extraVerbose = false;
248 
251  std::string calibrationFile = "";
252 
255 
257  double cameraPosition[3];
258 
261  bool cameraIsForward = true;
262 
266  bool permitKalman = true;
267 
270  std::int32_t cameraMicrosecondsOffset = -27000;
271 
275  bool softResets = false;
276 
279  double softResetPositionVarianceScale = 1.e-1;
280 
282  double softResetOrientationVariance = 1.e0;
283 
284  ConfigParams();
285  };
286 } // namespace vbtracker
287 } // namespace osvr
288 #endif // INCLUDED_ConfigParams_h_GUID_22101CEF_879B_4781_2733_F5F7AE4E3633
double angularVelocityVariance
units: (rad/sec)^2
Definition: ConfigParams.h:63
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
BlobParams blobParams
Parameters specific to the blob-detection step of the algorithm.
Definition: ConfigParams.h:102
Definition: BlobParams.h:93
Definition: ConfigParams.h:43
Definition: ConfigParams.h:68
double orientationVariance
units: rad^2
Definition: ConfigParams.h:55
IMUInputParams imu
IMU input-related parameters.
Definition: ConfigParams.h:254
bool calibrateAnyway
Should we use the IMU orientation data for calibration even if useOrientation is false?
Definition: ConfigParams.h:49
General configuration parameters.
Definition: ConfigParams.h:82
bool useAngularVelocity
Should angular velocity reports be used once calibration completes?
Definition: ConfigParams.h:60
Blob detection configuration parameters.
Definition: BlobParams.h:40
Header.
bool useOrientation
Should orientation reports be used once calibration completes?
Definition: ConfigParams.h:52
BuiltInTargetSets
If you add an entry here, must also update both getConfigStringForTargetSet and AllBuiltInTargetSets ...
Definition: ConfigParams.h:79
EdgeHoleParams extractParams
Parameters specific to the edge hole based LED extraction algorithm.
Definition: ConfigParams.h:105