diff --git a/launch/msckf_vio_tum.launch b/launch/msckf_vio_tum.launch
index 467f3b4..911f36b 100644
--- a/launch/msckf_vio_tum.launch
+++ b/launch/msckf_vio_tum.launch
@@ -21,7 +21,7 @@
-
+
diff --git a/src/msckf_vio.cpp b/src/msckf_vio.cpp
index 2616c0c..a4d2463 100644
--- a/src/msckf_vio.cpp
+++ b/src/msckf_vio.cpp
@@ -404,8 +404,18 @@ void MsckfVio::imageCallback(
const sensor_msgs::ImageConstPtr& cam1_img,
const CameraMeasurementConstPtr& feature_msg)
{
+
+ if(PRINTIMAGES)
+ {
+ std::cout << "stopped playpack" << std::endl;
+ nh.setParam("/play_bag", false);
+ }
// Return if the gravity vector has not been set.
- if (!is_gravity_set) return;
+ if (!is_gravity_set)
+ {
+ nh.setParam("/play_bag", true);
+ return;
+ }
// Start the system if the first image is received.
// The frame where the first image is received will be
@@ -512,6 +522,13 @@ void MsckfVio::imageCallback(
publish_time, publish_time/processing_time);
}
+
+ if(PRINTIMAGES)
+ {
+ std::cout << "stopped playpack" << std::endl;
+ nh.setParam("/play_bag", true);
+ }
+
return;
}
@@ -1334,9 +1351,9 @@ void MsckfVio::PhotometricMeasurementJacobian(
//TODO make this more fluent as well
if(PRINTIMAGES)
{
- std::stringstream ss;
- ss << "INFO:" << " anchor: " << cam_state_cntr_anchor << " frame: " << cam_state_cntr;
- feature.MarkerGeneration(marker_pub, state_server.cam_states);
+ //std::stringstream ss;
+ //ss << "INFO:" << " anchor: " << cam_state_cntr_anchor << " frame: " << cam_state_cntr;
+ //feature.MarkerGeneration(marker_pub, state_server.cam_states);
//feature.VisualizePatch(cam_state, cam_state_id, cam0, photo_r, ss);
}
@@ -1350,11 +1367,6 @@ void MsckfVio::PhotometricFeatureJacobian(
{
// stop playing bagfile if printing images
- if(PRINTIMAGES)
- {
- std::cout << "stopped playpack" << std::endl;
- nh.setParam("/play_bag", false);
- }
const auto& feature = map_server[feature_id];
@@ -1408,6 +1420,7 @@ void MsckfVio::PhotometricFeatureJacobian(
H_x = A_null_space.transpose() * H_xi;
r = A_null_space.transpose() * r_i;
+ /*
if(PRINTIMAGES)
{
@@ -1436,7 +1449,7 @@ void MsckfVio::PhotometricFeatureJacobian(
myfile.close();
std::cout << "resume playback" << std::endl;
nh.setParam("/play_bag", true);
- }
+ }*/
return;
}