added check if pre-undistorted, works for still distorted
This commit is contained in:
		@@ -546,10 +546,20 @@ void MsckfVio::manageMovingWindow(
 | 
			
		||||
  cv_bridge::CvImageConstPtr cam1_img_ptr = cv_bridge::toCvShare(cam1_img,
 | 
			
		||||
      sensor_msgs::image_encodings::MONO8);
 | 
			
		||||
 | 
			
		||||
  image_handler::undistortImage(cam0_img_ptr->image, cam0_img_ptr->image, cam0.distortion_model, cam0.intrinsics, cam0.distortion_coeffs);
 | 
			
		||||
  image_handler::undistortImage(cam1_img_ptr->image, cam1_img_ptr->image, cam1.distortion_model, cam1.intrinsics, cam1.distortion_coeffs);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // save image information into moving window
 | 
			
		||||
  cam0.moving_window[state_server.imu_state.id].image = cam0_img_ptr->image.clone();
 | 
			
		||||
  cam1.moving_window[state_server.imu_state.id].image = cam1_img_ptr->image.clone();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  //TODO handle any massive overflow correctly (should be pruned, before this ever triggers)
 | 
			
		||||
  while(cam0.moving_window.size() > 100)
 | 
			
		||||
  {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user