matlab plotPose3: don't draw covariance if it's empty

release/4.3a0
Duy-Nguyen Ta 2012-06-08 22:34:03 +00:00
parent 2dbbd9f989
commit 3bad1346d6
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ L = [C zAxis]';
line(L(:,1),L(:,2),L(:,3),'Color','b');
% plot the covariance
if nargin>2
if (nargin>2) && (~isempty(P))
pPp = P(4:6,4:6); % covariance matrix in pose coordinate frame
gPp = gRp*pPp*gRp'; % convert the covariance matrix to global coordinate frame
covarianceEllipse3D(C,gPp);