Example #1
0
/** Dump the options of the metric map in human-readable format */
void  TMetricMapInitializer::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("-------------------------TMetricMapInitializer --------------------------\n");
	out.printf("================ C++ Class: '%s'\n", this->metricMapClassType->className);
	this->genericMapParams.dumpToTextStream(out);
	
	// Class-specific:
	this->dumpToTextStream_map_specific(out);
}
void Message_NMEA_ZDA::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("[NMEA ZDA datum]\n");
	out.printf(" UTC time-stamp: %02u:%02u:%02.03f\n",
		fields.UTCTime.hour,
		fields.UTCTime.minute,
		fields.UTCTime.sec
		);
	out.printf(" Date (DD/MM/YY): %02u/%02u/%04u\n ",
		(unsigned)fields.date_day,(unsigned)fields.date_month, (unsigned)fields.date_year);
}
Example #3
0
/*---------------------------------------------------------------
					dumpToTextStream
  ---------------------------------------------------------------*/
void  CMultiMetricMapPDF::TPredictionParams::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("\n----------- [CMultiMetricMapPDF::TPredictionParams] ------------ \n\n");

	out.printf("pfOptimalProposal_mapSelection          = %i\n", pfOptimalProposal_mapSelection );
	out.printf("ICPGlobalAlign_MinQuality               = %f\n", ICPGlobalAlign_MinQuality );

	KLD_params.dumpToTextStream(out);
	icp_params.dumpToTextStream(out);
	out.printf("\n");
}
void Message_NMEA_GLL::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("[NMEA GLL datum]\n");
	out.printf("  Longitude: %.09f deg  Latitude: %.09f deg Validity: '%c'\n",
		fields.longitude_degrees,
		fields.latitude_degrees,
		fields.validity_char );
	out.printf("  UTC time-stamp: %02u:%02u:%02.03f\n",
		fields.UTCTime.hour,
		fields.UTCTime.minute,
		fields.UTCTime.sec);
}
Example #5
0
void COutputLogger::TMsg::writeToStream(mrpt::utils::CStream& out) const {
	const std::string str = getAsString();
	out.printf("%s", str.c_str());
#ifdef _MSC_VER
	OutputDebugStringA(str.c_str());
#endif
}
void CGasConcentrationGridMap2D::TMapDefinition::dumpToTextStream_map_specific(mrpt::utils::CStream &out) const
{
	out.printf("MAP TYPE                                  = %s\n", mrpt::utils::TEnumType<CGasConcentrationGridMap2D::TMapRepresentation>::value2name(mapType).c_str() );
	LOADABLEOPTS_DUMP_VAR(min_x         , float);
	LOADABLEOPTS_DUMP_VAR(max_x         , float);
	LOADABLEOPTS_DUMP_VAR(min_y         , float);
	LOADABLEOPTS_DUMP_VAR(max_y         , float);
	LOADABLEOPTS_DUMP_VAR(resolution         , float);

	this->insertionOpts.dumpToTextStream(out);
}
/*---------------------------------------------------------------
						dumpToTextStream
  ---------------------------------------------------------------*/
void  CIncrementalMapPartitioner::TOptions::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("\n----------- [CIncrementalMapPartitioner::TOptions] ------------ \n\n");

	out.printf("partitionThreshold                      = %f\n",partitionThreshold);
	out.printf("gridResolution                          = %f\n",gridResolution);
	out.printf("minDistForCorrespondence                = %f\n",minDistForCorrespondence);
	out.printf("forceBisectionOnly                      = %c\n",forceBisectionOnly ? 'Y':'N');
	out.printf("useMapMatching                          = %c\n",useMapMatching ? 'Y':'N');
	out.printf("minimumNumberElementsEachCluster        = %i\n",minimumNumberElementsEachCluster);
}
void Message_NMEA_RMC::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("[NMEA RMC datum]\n");
	out.printf(" Positioning mode: `%c`\n ", (char)fields.positioning_mode);
	out.printf(" UTC time-stamp: %02u:%02u:%02.03f\n",
		fields.UTCTime.hour,
		fields.UTCTime.minute,
		fields.UTCTime.sec
		);
	out.printf(" Date (DD/MM/YY): %02u/%02u/%02u\n ",
		(unsigned)fields.date_day,(unsigned)fields.date_month, (unsigned)fields.date_year);
	out.printf("  Longitude: %.09f deg  Latitude: %.09f deg  Valid?: '%c'\n",
		fields.longitude_degrees,
		fields.latitude_degrees,
		fields.validity_char
		);
	out.printf(" Speed: %.05f knots  Direction:%.03f deg.\n ",
		fields.speed_knots,
		fields.direction_degrees
		);
	out.printf(" Magnetic variation direction: %.04f deg\n ", fields.magnetic_dir);
}
Example #9
0
/*---------------------------------------------------------------
						dumpToTextStream
  ---------------------------------------------------------------*/
void  CHMTSLAM::TOptions::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("\n----------- [CHMTSLAM::TOptions] ------------ \n\n");

	LOADABLEOPTS_DUMP_VAR( LOG_OUTPUT_DIR,  string );
	LOADABLEOPTS_DUMP_VAR( LOG_FREQUENCY, int);

	LOADABLEOPTS_DUMP_VAR( SLAM_METHOD, int);

	LOADABLEOPTS_DUMP_VAR( SLAM_MIN_DIST_BETWEEN_OBS, float );
	LOADABLEOPTS_DUMP_VAR_DEG( SLAM_MIN_HEADING_BETWEEN_OBS );

	LOADABLEOPTS_DUMP_VAR( MIN_ODOMETRY_STD_XY, float );
	LOADABLEOPTS_DUMP_VAR_DEG( MIN_ODOMETRY_STD_PHI );

	LOADABLEOPTS_DUMP_VAR( random_seed, int );

	AA_options.dumpToTextStream(out);
	pf_options.dumpToTextStream(out);
	KLD_params.dumpToTextStream(out);
	defaultMapsInitializers.dumpToTextStream(out);
	TLC_grid_options.dumpToTextStream(out);
	TLC_fabmap_options.dumpToTextStream(out);
}
Example #10
0
void Message_TOPCON_PZS::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("\n[TopCon PZS datum]\n");
	out.printf("  Longitude: %.09f deg  Latitude: %.09f deg Height: %.03f m (%.03f m without NBeam) \n",
		longitude_degrees,
		latitude_degrees,
		height_meters,
		RTK_height_meters);

	out.printf(" PZL-ID: %i  Angle trans: %.05f deg\n ",
		(int)nId,
		angle_transmitter
		);

	out.printf(" Fix: %i  ",(int)Fix);
	out.printf(" Error: %i ",(int)error);
	out.printf(" Battery levels: TX=%i  RX=%i\n ",TXBattery,RXBattery);

	out.printf(" hasCartesianPosVel= %s", hasCartesianPosVel ? "YES -> ":"NO\n");
	if (hasCartesianPosVel)
	{
		out.printf(" x=%f  y=%f  z=%f\n",cartesian_x,cartesian_y,cartesian_z);
		out.printf(" vx=%f  vy=%f  vz=%f\n",cartesian_vx,cartesian_vy,cartesian_vz);
	}
	out.printf("hasPosCov = %s", hasPosCov ? "YES\n":"NO\n");
	if (hasPosCov)
		out.printf("%s\n", pos_covariance.inMatlabFormat().c_str() );

	out.printf("hasVelCov = %s", hasVelCov ? "YES\n":"NO\n");
	if (hasVelCov)
		out.printf("%s\n", vel_covariance.inMatlabFormat().c_str() );

	out.printf("hasStats = %s", hasStats? "YES: ":"NO\n");
	if(hasStats)
		out.printf("GPS sats used: %i  GLONASS sats used: %i  RTK Fix progress:%i%%\n", (int)stats_GPS_sats_used, (int)stats_GLONASS_sats_used,(int)stats_rtk_fix_progress);
}
Example #11
0
/*---------------------------------------------------------------
					dumpToTextStream
  ---------------------------------------------------------------*/
void  CICP::TConfigParams::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("\n----------- [CICP::TConfigParams] ------------ \n\n");

	out.printf("ICP_algorithm                           = %s\n", mrpt::utils::TEnumType<TICPAlgorithm>::value2name(ICP_algorithm).c_str() );
	out.printf("ICP_covariance_method                   = %s\n", mrpt::utils::TEnumType<TICPCovarianceMethod>::value2name(ICP_covariance_method).c_str() );
	out.printf("maxIterations                           = %i\n",maxIterations);
	out.printf("minAbsStep_trans                        = %f\n",minAbsStep_trans);
	out.printf("minAbsStep_rot                          = %f\n",minAbsStep_rot);

	out.printf("thresholdDist                           = %f\n",thresholdDist);
	out.printf("thresholdAng                            = %f deg\n",RAD2DEG(thresholdAng));
	out.printf("ALFA                                    = %f\n",ALFA);
	out.printf("smallestThresholdDist                   = %f\n",smallestThresholdDist);
	out.printf("onlyClosestCorrespondences              = %c\n",onlyClosestCorrespondences ? 'Y':'N');
	out.printf("onlyUniqueRobust                        = %c\n",onlyUniqueRobust ? 'Y':'N');
	out.printf("covariance_varPoints                    = %f\n",covariance_varPoints);
	out.printf("doRANSAC                                = %c\n",doRANSAC ? 'Y':'N');
	out.printf("ransac_minSetSize                       = %i\n",ransac_minSetSize);
	out.printf("ransac_maxSetSize                       = %i\n",ransac_maxSetSize);
	out.printf("ransac_mahalanobisDistanceThreshold     = %f\n",ransac_mahalanobisDistanceThreshold);
	out.printf("ransac_nSimulations                     = %i\n",ransac_nSimulations);
	out.printf("ransac_fuseByCorrsMatch                 = %c\n",ransac_fuseByCorrsMatch ? 'Y':'N');
	out.printf("ransac_fuseMaxDiffXY                    = %f\n",ransac_fuseMaxDiffXY);
	out.printf("ransac_fuseMaxDiffPhi                   = %f deg\n",RAD2DEG( ransac_fuseMaxDiffPhi ));
	out.printf("normalizationStd                        = %f\n",normalizationStd);
	out.printf("kernel_rho                              = %f\n",kernel_rho);
	out.printf("use_kernel                              = %c\n",use_kernel  ? 'Y':'N');
	out.printf("Axy_aprox_derivatives                   = %f\n",Axy_aprox_derivatives );
	out.printf("LM_initial_lambda                       = %f\n",LM_initial_lambda);
	out.printf("skip_cov_calculation                    = %c\n",skip_cov_calculation ? 'Y':'N');
	out.printf("skip_quality_calculation                = %c\n",skip_quality_calculation ? 'Y':'N');
	out.printf("corresponding_points_decimation         = %u\n",(unsigned int)corresponding_points_decimation);
	out.printf("\n");
}
/*---------------------------------------------------------------
					dumpToTextStream
  ---------------------------------------------------------------*/
void  COccupancyGridMap2D::TLikelihoodOptions::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("\n----------- [COccupancyGridMap2D::TLikelihoodOptions] ------------ \n\n");

	out.printf("likelihoodMethod                        = ");
	switch (likelihoodMethod)
	{
	case lmMeanInformation: out.printf("lmMeanInformation"); break;
	case lmRayTracing: out.printf("lmRayTracing"); break;
	case lmConsensus: out.printf("lmConsensus"); break;
	case lmCellsDifference: out.printf("lmCellsDifference"); break;
	case lmLikelihoodField_Thrun: out.printf("lmLikelihoodField_Thrun"); break;
	case lmLikelihoodField_II: out.printf("lmLikelihoodField_II"); break;
	case lmConsensusOWA: out.printf("lmConsensusOWA"); break;
	default:
		out.printf("UNKNOWN!!!"); break;
	}
	out.printf("\n");

	out.printf("enableLikelihoodCache                   = %c\n",	enableLikelihoodCache ? 'Y':'N');

	out.printf("LF_stdHit                               = %f\n",	LF_stdHit );
	out.printf("LF_zHit                                 = %f\n",	LF_zHit );
	out.printf("LF_zRandom                              = %f\n",	LF_zRandom );
	out.printf("LF_maxRange                             = %f\n",	LF_maxRange );
	out.printf("LF_decimation                           = %u\n",	LF_decimation );
	out.printf("LF_maxCorrsDistance                     = %f\n",	LF_maxCorrsDistance );
	out.printf("LF_useSquareDist                        = %c\n",	LF_useSquareDist ? 'Y':'N');
	out.printf("LF_alternateAverageMethod               = %c\n",	LF_alternateAverageMethod ? 'Y':'N');
	out.printf("MI_exponent                             = %f\n",	MI_exponent );
	out.printf("MI_skip_rays                            = %u\n",	MI_skip_rays );
	out.printf("MI_ratio_max_distance                   = %f\n",	MI_ratio_max_distance );
	out.printf("rayTracing_useDistanceFilter            = %c\n",	rayTracing_useDistanceFilter ? 'Y':'N');
	out.printf("rayTracing_decimation                   = %u\n",	rayTracing_decimation );
	out.printf("rayTracing_stdHit                       = %f\n",	rayTracing_stdHit );
	out.printf("consensus_takeEachRange                 = %u\n",	consensus_takeEachRange );
	out.printf("consensus_pow                           = %.02f\n", consensus_pow);
	out.printf("OWA_weights   = [");
	for (size_t i=0;i<OWA_weights.size();i++)
	{
		if (i<3 || i>(OWA_weights.size()-3))
			out.printf("%.03f ",OWA_weights[i]);
		else if (i==3 && OWA_weights.size()>6)
			out.printf(" ... ");
	}
	out.printf("] (size=%u)\n",(unsigned)OWA_weights.size());
	out.printf("\n");
}
Example #13
0
void  CRandomFieldGridMap3D::TInsertionOptions::dumpToTextStream(mrpt::utils::CStream	&out) const
{
	out.printf("GMRF_lambdaPrior                     = %f\n", GMRF_lambdaPrior);
	out.printf("GMRF_skip_variance                   = %s\n", GMRF_skip_variance ? "true":"false");
}
Example #14
0
// --------------------------------------------------
//			dumpToTextStream
// --------------------------------------------------
void TMultiResDescMatchOptions::dumpToTextStream( mrpt::utils::CStream &out) const
{
    out.printf("\n----------- [vision::TMultiResDescMatchOptions] ------------ \n");
	out.printf("Use orientation filter?:        ");
	if( useOriFilter )
	{
	    out.printf("Yes\n");
	    out.printf("· Orientation threshold:        %.1f deg\n", RAD2DEG(oriThreshold) );
    }
    else
	    out.printf("No\n");
    out.printf("Use depth filter?:              ");
    if( useDepthFilter )
	    out.printf("Yes\n");
    else
    {
	    out.printf("No\n" );
    	out.printf("Lowest scale in list1:          %d\n", lowScl1 );
        out.printf("Highest scale in list1:         %d\n", highScl1 );
        out.printf("Lowest scale in list2:          %d\n", lowScl2 );
        out.printf("Highest scale in list2:         %d\n", highScl2 );
    }
	out.printf("#frames last seen threshold:    %d\n", lastSeenThreshold );
	out.printf("#frames to be stable threshold: %d\n", timesSeenThreshold );
	out.printf("min. # features in system:      %d\n", minFeaturesToFind );
	out.printf("min. # features to be lost:     %d\n", minFeaturesToBeLost );
	out.printf("Matching threshold:             %.2f\n", matchingThreshold );
	out.printf("Matching ratio threshold:       %.2f\n", matchingRatioThreshold );
	out.printf("Size of the search window:      %d px\n", searchAreaSize );
	out.printf("-------------------------------------------------------- \n");
} // end-dumpToTextStream
Example #15
0
void CFeature::dumpToTextStream( mrpt::utils::CStream &out) const
{
	out.printf("\n----------- [vision::CFeature] ------------ \n");
	out.printf("Feature ID:                     %d\n", (int)ID);
	out.printf("Coordinates:                    (%.2f,%.2f) px\n", x, y );
	out.printf("PatchSize:                      %d\n", patchSize );
	out.printf("Type:                           ");
	switch( type )
	{
	case -1: out.printf("Not defined\n"); break;
	case 0: out.printf("KLT\n"); break;
	case 1: out.printf("Harris\n"); break;
	case 2: out.printf("BCD\n"); break;
	case 3: out.printf("SIFT\n"); break;
	case 4: out.printf("SURF\n"); break;
	case 5: out.printf("Beacon\n"); break;
	case 6: out.printf("FAST\n"); break;
	case 7: out.printf("FASTER-9\n"); break;
	case 8: out.printf("FASTER-10\n"); break;
	case 9: out.printf("FASTER-12\n"); break;
	case 10:out.printf("ORB"); break;
	}
	out.printf("Status:                         ");
	switch( track_status )
	{
	case 0: out.printf("Idle\n"); break;
	case 1: out.printf("[KLT] Out of bounds [KLT]\n"); break;
	case 5: out.printf("[KLT] Tracked\n"); break;
	case 10: out.printf("[KLT] Lost\n"); break;
	}

	out.printf("Response:                       %.2f\n", response );
	out.printf("Main orientation:               %.2f\n", orientation );
	out.printf("Main scale:                     %.2f\n", scale );
	out.printf("# frames seen:                  %d\n", nTimesSeen );
	out.printf("# frames not seen:              %d\n", nTimesNotSeen );
	out.printf("# frames since last seen:       %d\n", nTimesLastSeen );
	out.printf("Initial Depth:                  %.2f m\n", initialDepth );
	out.printf("Depth:                          %.2f m\n", depth );
	out.printf("3D point:                       (%.2f,%.2f,%.2f) m\n", p3D.x, p3D.y, p3D.z );
	out.printf("Is point feature?:              ");
	isPointFeature() ? out.printf("Yes\n") : out.printf("No\n");

	out.printf("Has SIFT descriptor?:           ");
	descriptors.hasDescriptorSIFT() ? out.printf("Yes\n") : out.printf("No\n");
	out.printf("Has SURF descriptor?:           ");
	descriptors.hasDescriptorSURF() ? out.printf("Yes\n") : out.printf("No\n");
	out.printf("Has Spin image descriptor?:     ");
	descriptors.hasDescriptorSpinImg() ? out.printf("Yes\n") : out.printf("No\n");
	out.printf("Has Polar descriptor?:          ");
	descriptors.hasDescriptorPolarImg() ? out.printf("Yes\n") : out.printf("No\n");
	out.printf("Has Log Polar descriptor?:      ");
	descriptors.hasDescriptorLogPolarImg() ? out.printf("Yes\n") : out.printf("No\n");
	out.printf("Has ORB descriptor?:			");
	descriptors.hasDescriptorORB() ? out.printf("Yes\n") : out.printf("No\n");


	out.printf("Has multiscale?:                ");
	if( !descriptors.hasDescriptorMultiSIFT() )
		out.printf("No\n");
	else
	{
		out.printf("Yes [%d]\n", (int)multiScales.size());
		for( int k = 0; k < (int)multiScales.size(); ++k )
		{
			out.printf(" · Scale %d: %.2f\n", k, multiScales[k] );
			for( int m = 0; m < (int)multiOrientations[k].size(); ++m )
			{
				out.printf(" ·· Orientation %d: %.2f\n", m, multiOrientations[k][m] );
				out.printf(" ·· [D] " );
				for( int n = 0; n < (int)descriptors.multiSIFTDescriptors[k][m].size(); ++n )
					out.printf("%d ", descriptors.multiSIFTDescriptors[k][m][n] );
				out.printf("\n");
				if( multiHashCoeffs.size() > 0 )
					out.printf(" ·· HASH coefficients %d,%d,%d\n", multiHashCoeffs[k][m][0], multiHashCoeffs[k][m][1],multiHashCoeffs[k][m][2] );
			}//end-for-m
		}//end-for-k
	} // end else
} // end dumpToTextStream
Example #16
0
// --------------------------------------------------
//			dumpToTextStream
// --------------------------------------------------
void  TMultiResDescOptions::dumpToTextStream( mrpt::utils::CStream &out) const
{
	out.printf("\n----------- [vision::TMultiResDescOptions] ------------ \n");
	out.printf("Base patch size:                %d px\n", basePSize);
	out.printf("Lowest scale to compute:        %d\n", comLScl );
	out.printf("Highest scale to compute:       %d\n", comHScl );
	out.printf("Image smoothing sigma:          %.2f px\n", sg1 );
	out.printf("Orientation histogram sigma:    %.2f\n", sg2 );
	out.printf("Descriptor histogram sigma:     %.2f\n", sg3 );
	out.printf("Compute depth:                  ");
	if( computeDepth )
	{
		out.printf("Yes\n");
		out.printf("Focal length:                   %.2f px\n", fx );
		out.printf("Principal point (cx):           %.2f px\n", cx );
		out.printf("Principal point (cy):           %.2f px\n", cy );
		out.printf("Baseline:                       %.2f m\n", baseline );
	}
	else
		out.printf("No\n");

	out.printf("Compute Hash Coeffs:            ");
	if( computeHashCoeffs )
		out.printf("Yes\n");
	else
		out.printf("No\n");

	out.printf("Blur image previously:          ");
	if( blurImage )
		out.printf("Yes\n");
	else
		out.printf("No\n");

	out.printf("Scales:                         ");
	for(unsigned int k = 0; k < scales.size(); ++k)
		out.printf( "%.2f ", scales[k] );
	out.printf("\n");
	out.printf("-------------------------------------------------------- \n");
} // end-dumpToTextStream
void Message_NMEA_VTG::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("[NMEA VTG datum]\n");
	out.printf("  True track: %.03f deg  Magnetic track: %.03f deg\n",fields.true_track, fields.magnetic_track);
	out.printf("  Ground speed: %.03f knots  %.03f km/h\n",fields.ground_speed_knots, fields.ground_speed_kmh);
}
void Message_NMEA_GGA::dumpToStream( mrpt::utils::CStream &out ) const
{
	out.printf("[NMEA GGA datum]\n");
	out.printf("  Longitude: %.09f deg  Latitude: %.09f deg  Height: %.03f m\n",
		fields.longitude_degrees,
		fields.latitude_degrees,
		fields.altitude_meters );

	out.printf("  Geoidal distance: %.03f m  Orthometric alt.: %.03f m  Corrected ort. alt.: %.03f m\n",
		fields.geoidal_distance,
		fields.orthometric_altitude,
		fields.corrected_orthometric_altitude );

	out.printf("  UTC time-stamp: %02u:%02u:%02.03f  #sats=%2u  ",
		fields.UTCTime.hour,
		fields.UTCTime.minute,
		fields.UTCTime.sec,
		fields.satellitesUsed );

	out.printf("Fix mode: %u ",fields.fix_quality);
	switch( fields.fix_quality )
	{
		case 0: out.printf("(Invalid)\n"); break;
		case 1: out.printf("(GPS fix)\n"); break;
		case 2: out.printf("(DGPS fix)\n"); break;
		case 3: out.printf("(PPS fix)\n"); break;
		case 4: out.printf("(Real Time Kinematic/RTK Fixed)\n"); break;
		case 5: out.printf("(Real Time Kinematic/RTK Float)\n"); break;
		case 6: out.printf("(Dead Reckoning)\n"); break;
		case 7: out.printf("(Manual)\n"); break;
		case 8: out.printf("(Simulation)\n"); break;
		case 9: out.printf("(mmGPS + RTK Fixed)\n"); break;
		case 10: out.printf("(mmGPS + RTK Float)\n"); break;
		default: out.printf("(UNKNOWN!)\n"); break;
	};

	out.printf("  HDOP (Horizontal Dilution of Precision): ");
	if (fields.thereis_HDOP)
			out.printf(" %f\n", fields.HDOP);
	else 	out.printf(" N/A\n");
}