Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TixiaoShan committed Dec 9, 2020
1 parent 18ebdbe commit a53730e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/mapOptmization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class mapOptimization : public ParamServer
std::mutex mtxLoopInfo;

bool isDegenerate = false;
Eigen::Matrix<float, 6, 6> matP;
cv::Mat matP;

int laserCloudCornerFromMapDSNum = 0;
int laserCloudSurfFromMapDSNum = 0;
Expand Down Expand Up @@ -222,7 +222,7 @@ class mapOptimization : public ParamServer
transformTobeMapped[i] = 0;
}

matP.setZero();
matP = cv::Mat(6, 6, CV_32F, cv::Scalar::all(0));
}

void laserCloudInfoHandler(const lio_sam::cloud_infoConstPtr& msgIn)
Expand Down Expand Up @@ -671,6 +671,9 @@ class mapOptimization : public ParamServer

void visualizeLoopClosure()
{
if (loopIndexContainer.empty())
return;

visualization_msgs::MarkerArray markerArray;
// loop nodes
visualization_msgs::Marker markerNode;
Expand All @@ -693,7 +696,7 @@ class mapOptimization : public ParamServer
markerEdge.ns = "loop_edges";
markerEdge.id = 1;
markerEdge.pose.orientation.w = 1;
markerEdge.scale.x = 0.1; markerEdge.scale.y = 0.1; markerEdge.scale.z = 0.1;
markerEdge.scale.x = 0.1;
markerEdge.color.r = 0.9; markerEdge.color.g = 0.9; markerEdge.color.b = 0;
markerEdge.color.a = 1;

Expand Down Expand Up @@ -1126,7 +1129,6 @@ class mapOptimization : public ParamServer
cv::Mat matB(laserCloudSelNum, 1, CV_32F, cv::Scalar::all(0));
cv::Mat matAtB(6, 1, CV_32F, cv::Scalar::all(0));
cv::Mat matX(6, 1, CV_32F, cv::Scalar::all(0));
cv::Mat matP(6, 6, CV_32F, cv::Scalar::all(0));

PointType pointOri, coeff;

Expand Down

0 comments on commit a53730e

Please sign in to comment.