Skip to content

Commit 585a218

Browse files
author
friether
committed
fixed noise model to represent uncorrelated noise on sensor readings
1 parent 903b93d commit 585a218

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed
-242 Bytes
Binary file not shown.

MIT_MatlabToolbox/trunk/matlab/libs/RoboticsToolbox/mdl_quadrotor.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@
138138

139139
%% Sensors
140140
%Noise on all states from simulation
141-
quadEDT.noiseStatesSensed_std = [1 1 1 1 1 1 0.0165195073635001 0.0152648883285633 0.0215786550496705 0.000652733165165932 0.000721701528439517 0.000690781425279554];
142-
quadEDT.noiseStatesSensed_weights = [0 0 0 0 0 0 0.05 0.05 0.05 1 1 1];
141+
quadEDT.noiseSensed_var = diag([0.3 0.3 0.5 0.002 0.002 0.002 0.001 50]);
143142

144143
%Delay (all sensor data)
145144
quadEDT.sensordelay = 1; %in samples of 200Hz;
@@ -173,9 +172,9 @@
173172
quadEDT.yawStep_time = 5.5;
174173
quadEDT.yawStep_duration = 2.5;
175174
%pitch
176-
quadEDT.pitchStep_amplitude = 0.1; %0.1
175+
quadEDT.pitchStep_amplitude = 0.2; %0.1
177176
quadEDT.pitchStep_time = 3;
178-
quadEDT.pitchStep_duration = 1;
177+
quadEDT.pitchStep_duration = 1.5;
179178
%roll
180179
quadEDT.rollStep_amplitude = 0.0; %0.1
181180
quadEDT.rollStep_time = 3;

MIT_MatlabToolbox/trunk/utils/VisionPrePostProcessor/calibration/camcalbration.mat renamed to MIT_MatlabToolbox/trunk/utils/VisionPrePostProcessor/calibration/camcalibation.mat

File renamed without changes.

MIT_MatlabToolbox/trunk/utils/VisionPrePostProcessor/findPoseReconstructionParameters.m

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
%% Generate required matrices for
1010
%Load camera calibration
11-
load('calibration/camcalbration.mat');
11+
load('calibration/camcalibation.mat');
1212

1313
%Compute matrices (use those in embedded code!)
1414
format long;
@@ -30,9 +30,22 @@
3030
% %pixel positions of those features
3131
% feature_pps = [cameraParams.ReprojectedPoints(1:50,:,1)';ones(1,50)];
3232
%
33-
% %reconstruction assuming only yaw angle
33+
% %Note: reconstruction assumes zero pitch and roll angle and "far enough" features!
34+
% We would need to optimize tr(feature_pps*Lambda-(R|T)*Xw) with feature_pps
35+
% being the feature pixel positions, Lambda a diagonal matrix that contains
36+
% the inverse of the camera-z-coordinates z of each world feature, (R|T) a
37+
% rotation and translation matrix for 3D points in homogenous coordinates
38+
% and Xw, the world features in (X;Y;Z;1) representation. If we assume
39+
% no pitch and roll angles and sufficiently far world features, we may consider the z's similar, so Lambda
40+
% implodes to a scalar lambda and we can simplify solve
41+
% A_recon_tmp=lambda*(R|T)=features_pps*pinv(Xw). We know that
42+
% sqrt(A_rcn_tmp(1,1)^2+A_rcn_tmp(1,2)^2)=lambda so we can compute (R|T)
43+
% and derive X,Y,Z and yaw. Note that this optimization is highly sensitive to
44+
% non-zero pitch and roll angles.
45+
3446
% A_rcn_tmp = intrMatrx_it*feature_pps*pinv(Xw);
35-
% A_rcn = A_rcn_tmp/sqrt(A_rcn_tmp(1,1)^2+A_rcn_tmp(1,2)^2);
47+
% A_rcn = A_rcn_tmp/sqrt(A_rcn_tmp(1,1)^2+A_rcn_tmp(1,2)^2); %This could
48+
% approach zero and cause numerical issues!
3649
%
3750
% X=A_rcn(1,4)
3851
% Y=A_rcn(2,4)

0 commit comments

Comments
 (0)