From 5ba25f8f9570ccf23bcc7e5c24d8a05443fe9767 Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Fri, 12 Jul 2019 11:37:36 +0200 Subject: [PATCH] changed some parameters --- include/msckf_vio/feature.hpp | 2 +- launch/image_processor_tinytum.launch | 10 +++++----- launch/msckf_vio_tinytum.launch | 6 +++--- src/msckf_vio.cpp | 17 +++++++++-------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/msckf_vio/feature.hpp b/include/msckf_vio/feature.hpp index 6c55861..c5d02ff 100644 --- a/include/msckf_vio/feature.hpp +++ b/include/msckf_vio/feature.hpp @@ -935,7 +935,7 @@ bool Feature::VisualizePatch( //cv::imwrite(loc.str(), cam0.featureVisu); cv::imshow("patch", cam0.featureVisu); - cvWaitKey(1); + cvWaitKey(0); } float Feature::PixelIrradiance(cv::Point2f pose, cv::Mat image) const diff --git a/launch/image_processor_tinytum.launch b/launch/image_processor_tinytum.launch index 0e5985c..f862755 100644 --- a/launch/image_processor_tinytum.launch +++ b/launch/image_processor_tinytum.launch @@ -14,8 +14,8 @@ - - + + @@ -24,9 +24,9 @@ - - - + + + diff --git a/launch/msckf_vio_tinytum.launch b/launch/msckf_vio_tinytum.launch index f89ea7a..f4e94a2 100644 --- a/launch/msckf_vio_tinytum.launch +++ b/launch/msckf_vio_tinytum.launch @@ -22,10 +22,10 @@ - + - + @@ -33,7 +33,7 @@ - + diff --git a/src/msckf_vio.cpp b/src/msckf_vio.cpp index fe071b1..9425997 100644 --- a/src/msckf_vio.cpp +++ b/src/msckf_vio.cpp @@ -50,7 +50,7 @@ Isometry3d CAMState::T_cam0_cam1 = Isometry3d::Identity(); // Static member variables in Feature class. FeatureIDType Feature::next_id = 0; -double Feature::observation_noise = 0.05; +double Feature::observation_noise = 0.2; Feature::OptimizationConfig Feature::optimization_config; map MsckfVio::chi_squared_test_table; @@ -1623,7 +1623,7 @@ bool MsckfVio::PhotometricPatchPointResidual( new_anchorPatch_3d = feature.anchorPatch_3d; } - for(auto point : new_anchorPatch_3d) + for(auto point : feature.anchorPatch_3d) { cv::Point2f p_in_c0 = feature.projectPositionToCamera(cam_state, cam_state_id, cam0, point); @@ -1869,6 +1869,7 @@ bool MsckfVio::PhotometricMeasurementJacobian( // visualizing functions feature.MarkerGeneration(marker_pub, state_server.cam_states); feature.VisualizePatch(cam_state, cam_state_id, cam0, r_photo, ss); + cout << "r\n" << r_photo << endl; //feature.VisualizeKernel(cam_state, cam_state_id, cam0); } @@ -2782,7 +2783,6 @@ void MsckfVio::removeLostFeatures() { MatrixXd p2H_xj; VectorXd p2r_j; - cout << "5: " << endl; if(PhotometricFeatureJacobian(feature.id, cam_state_ids, pH_xj, pr_j, N)) { if (gatingTest(pH_xj, pr_j, pr_j.size(), 1)) { //, cam_state_ids.size()-1)) { @@ -2792,7 +2792,7 @@ void MsckfVio::removeLostFeatures() { } } - + /* cout << "3: " << endl; if(PhotometricFeatureJacobian(feature.id, cam_state_ids, p2H_xj, p2r_j, 3)) { @@ -2803,7 +2803,7 @@ void MsckfVio::removeLostFeatures() { p2stack_cntr += p2H_xj.rows(); } } - + */ featureJacobian(feature.id, cam_state_ids, H_xj, r_j); twodotFeatureJacobian(feature.id, cam_state_ids, twoH_xj, twor_j); @@ -2981,7 +2981,6 @@ void MsckfVio::pruneLastCamStateBuffer() for (const auto& cam_state : state_server.cam_states) involved_cam_state_ids.push_back(cam_state.first); - cout << "5: " << endl; if(PhotometricFeatureJacobian(feature.id, involved_cam_state_ids, pH_xj, pr_j, N)) { if (gatingTest(pH_xj, pr_j, pr_j.size(), 1)) { //, cam_state_ids.size()-1)) { @@ -2991,6 +2990,7 @@ void MsckfVio::pruneLastCamStateBuffer() } } + /* cout << "3: " << endl; if(PhotometricFeatureJacobian(feature.id, involved_cam_state_ids, p2H_xj, p2r_j, 3)) { @@ -3000,6 +3000,7 @@ void MsckfVio::pruneLastCamStateBuffer() p2stack_cntr += p2H_xj.rows(); } } + */ featureJacobian(feature.id, involved_cam_state_ids, H_xj, r_j); twodotFeatureJacobian(feature.id, involved_cam_state_ids, twoH_xj, twor_j); @@ -3179,7 +3180,6 @@ void MsckfVio::pruneCamStateBuffer() { if (involved_cam_state_ids.size() == 0) continue; - cout << "5: " << endl; if(PhotometricFeatureJacobian(feature.id, involved_cam_state_ids, pH_xj, pr_j, N)) { if (gatingTest(pH_xj, pr_j, pr_j.size(), 1)) {// involved_cam_state_ids.size())) { @@ -3189,6 +3189,7 @@ void MsckfVio::pruneCamStateBuffer() { } } + /* cout << "3: " << endl; if(PhotometricFeatureJacobian(feature.id, involved_cam_state_ids, p2H_xj, p2r_j, 3)) { @@ -3198,7 +3199,7 @@ void MsckfVio::pruneCamStateBuffer() { p2stack_cntr += p2H_xj.rows(); } } - + */ featureJacobian(feature.id, involved_cam_state_ids, H_xj, r_j); twodotFeatureJacobian(feature.id, involved_cam_state_ids, twoH_xj, twor_j);