Exemplo n.º 1
0
void CHolonomicVFF::TOptions::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg , const std::string &section) const
{
	MRPT_START
	const int WN = 40, WV = 20;

	cfg.write(section,"TARGET_SLOW_APPROACHING_DISTANCE",TARGET_SLOW_APPROACHING_DISTANCE,   WN,WV, "For stopping gradually");
	cfg.write(section,"TARGET_ATTRACTIVE_FORCE",TARGET_ATTRACTIVE_FORCE,   WN,WV, "Dimension-less (may have to be tuned depending on the density of obstacle sampling)");

	MRPT_END
}
void CParameterizedTrajectoryGenerator::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) const
{
	MRPT_START
	const int WN = 40, WV = 20;

	cfg.write(sSection,"num_paths",m_alphaValuesCount,   WN,WV, "Number of discrete paths (`resolution`) in the PTG");
	cfg.write(sSection,"refDistance",refDistance,   WN,WV, "Maximum distance (meters) for building trajectories (visibility range)");
	cfg.write(sSection,"score_priority",m_score_priority,   WN,WV, "When used in path planning, a multiplying factor (default=1.0) for the scores for this PTG. Assign values <1 to PTGs with low priority.");

	MRPT_END
}
void CPTG_DiffDrive_CollisionGridBased::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) const
{
	MRPT_START
	const int WN = 25, WV = 30;

	CParameterizedTrajectoryGenerator::saveToConfigFile(cfg,sSection);

	cfg.write(sSection,"resolution",m_resolution,   WN,WV, "Resolution of the collision-check look-up-table [m].");
	cfg.write(sSection,"v_max_mps",V_MAX,   WN,WV, "Maximum linear velocity for trajectories [m/s].");
	cfg.write(sSection,"w_max_dps", mrpt::utils::RAD2DEG(W_MAX),   WN,WV, "Maximum angular velocity for trajectories [deg/s].");
	cfg.write(sSection,"turningRadiusReference",turningRadiusReference,   WN,WV, "An approximate dimension of the robot (not a critical parameter) [m].");

	CPTG_RobotShape_Polygonal::saveToConfigFile(cfg,sSection);

	MRPT_END
}
Exemplo n.º 4
0
void CPTG_DiffDrive_alpha::saveToConfigFile(
	mrpt::utils::CConfigFileBase& cfg, const std::string& sSection) const
{
	MRPT_START
	const int WN = 25, WV = 30;
	CPTG_DiffDrive_CollisionGridBased::saveToConfigFile(cfg, sSection);

	cfg.write(
		sSection, "cte_a0v_deg", mrpt::utils::RAD2DEG(cte_a0v), WN, WV,
		"Contant for vel profile [deg].");
	cfg.write(
		sSection, "cte_a0w_deg", mrpt::utils::RAD2DEG(cte_a0v), WN, WV,
		"Contant for omega profile [deg].");

	MRPT_END
}
Exemplo n.º 5
0
void CHolonomicND::TOptions::saveToConfigFile(
	mrpt::utils::CConfigFileBase& c, const std::string& s) const
{
	MRPT_START;
	const int WN = mrpt::utils::MRPT_SAVE_NAME_PADDING(),
			  WV = mrpt::utils::MRPT_SAVE_VALUE_PADDING();

	MRPT_SAVE_CONFIG_VAR_COMMENT(WIDE_GAP_SIZE_PERCENT, "");
	MRPT_SAVE_CONFIG_VAR_COMMENT(MAX_SECTOR_DIST_FOR_D2_PERCENT, "");
	MRPT_SAVE_CONFIG_VAR_COMMENT(RISK_EVALUATION_SECTORS_PERCENT, "");
	MRPT_SAVE_CONFIG_VAR_COMMENT(
		RISK_EVALUATION_DISTANCE, "In normalized ps-meters [0,1]");
	MRPT_SAVE_CONFIG_VAR_COMMENT(TOO_CLOSE_OBSTACLE, "For stopping gradually");
	MRPT_SAVE_CONFIG_VAR_COMMENT(
		TARGET_SLOW_APPROACHING_DISTANCE, "In normalized ps-meters");

	ASSERT_EQUAL_(factorWeights.size(), 4)
	c.write(
		s, "factorWeights",
		mrpt::format(
			"%.2f %.2f %.2f %.2f", factorWeights[0], factorWeights[1],
			factorWeights[2], factorWeights[3]),
		WN, WV,
		"[0]=Free space, [1]=Dist. in sectors, [2]=Closer to target "
		"(Euclidean), [3]=Hysteresis");

	MRPT_END
}
Exemplo n.º 6
0
void CPTG_RobotShape_Polygonal::saveToConfigFile(
	mrpt::utils::CConfigFileBase& cfg, const std::string& sSection) const
{
	const int WN = 25, WV = 30;

	for (unsigned int i = 0; i < m_robotShape.size(); i++)
	{
		const std::string sPtx = mrpt::format("shape_x%u", i);
		const std::string sPty = mrpt::format("shape_y%u", i);

		cfg.write(
			sSection, sPtx, m_robotShape[i].x, WN, WV,
			"Robot polygonal shape, `x` [m].");
		cfg.write(
			sSection, sPty, m_robotShape[i].y, WN, WV,
			"Robot polygonal shape, `y` [m].");
	}
}
Exemplo n.º 7
0
void CPTG_DiffDrive_CS::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) const
{
	MRPT_START
	const int WN = 40, WV = 20;
	CPTG_DiffDrive_CollisionGridBased::saveToConfigFile(cfg,sSection);

	cfg.write(sSection,"K",K,   WN,WV, "K=+1 forward paths; K=-1 for backwards paths.");

	MRPT_END
}
Exemplo n.º 8
0
/**  Save as a config block:
  */
void TStereoCamera::saveToConfigFile(const std::string &section,  mrpt::utils::CConfigFileBase &cfg ) const
{
	// [<SECTION>_LEFT]
	//   ...
	// [<SECTION>_RIGHT]
	//   ...
	// [<SECTION>_LEFT2RIGHT_POSE]
	//  pose_quaternion = [x y z qr qx qy qz]

	leftCamera.saveToConfigFile(section+string("_LEFT"), cfg);
	rightCamera.saveToConfigFile(section+string("_RIGHT"), cfg);

	const CPose3DQuat q = CPose3DQuat(rightCameraPose); // Don't remove this line, it's a safe against future possible bugs if rightCameraPose changes!
	cfg.write(section+string("_LEFT2RIGHT_POSE"), "pose_quaternion",q.asString() );
}
Exemplo n.º 9
0
void CHolonomicND::TOptions::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg , const std::string &section) const
{
	MRPT_START
	const int WN = 40, WV = 20;

	cfg.write(section,"WIDE_GAP_SIZE_PERCENT",WIDE_GAP_SIZE_PERCENT,   WN,WV, "");
	cfg.write(section,"MAX_SECTOR_DIST_FOR_D2_PERCENT",MAX_SECTOR_DIST_FOR_D2_PERCENT,   WN,WV, "");
	cfg.write(section,"RISK_EVALUATION_SECTORS_PERCENT",RISK_EVALUATION_SECTORS_PERCENT,   WN,WV, "");
	cfg.write(section,"RISK_EVALUATION_DISTANCE",RISK_EVALUATION_DISTANCE,   WN,WV, "In normalized ps-meters [0,1]");
	cfg.write(section,"TOO_CLOSE_OBSTACLE",TOO_CLOSE_OBSTACLE,   WN,WV, "For stopping gradually");
	cfg.write(section,"TARGET_SLOW_APPROACHING_DISTANCE",TARGET_SLOW_APPROACHING_DISTANCE,   WN,WV, "In normalized ps-meters");

	ASSERT_EQUAL_(factorWeights.size(),4)
	cfg.write(section,"factorWeights",mrpt::format("%.2f %.2f %.2f %.2f",factorWeights[0],factorWeights[1],factorWeights[2],factorWeights[3]),   WN,WV, "[0]=Free space, [1]=Dist. in sectors, [2]=Closer to target (Euclidean), [3]=Hysteresis");

	MRPT_END
}
Exemplo n.º 10
0
void CPTG_Holo_Blend::saveToConfigFile(
	mrpt::utils::CConfigFileBase& cfg, const std::string& sSection) const
{
	MRPT_START
	const int WN = 25, WV = 30;

	CParameterizedTrajectoryGenerator::saveToConfigFile(cfg, sSection);

	cfg.write(
		sSection, "T_ramp_max", T_ramp_max, WN, WV,
		"Max duration of the velocity interpolation since a vel_cmd is issued "
		"[s].");
	cfg.write(
		sSection, "v_max_mps", V_MAX, WN, WV,
		"Maximum linear velocity for trajectories [m/s].");
	cfg.write(
		sSection, "w_max_dps", mrpt::utils::RAD2DEG(W_MAX), WN, WV,
		"Maximum angular velocity for trajectories [deg/s].");
	cfg.write(
		sSection, "turningRadiusReference", turningRadiusReference, WN, WV,
		"An approximate dimension of the robot (not a critical parameter) "
		"[m].");

	cfg.write(
		sSection, "expr_V", expr_V, WN, WV,
		"Math expr for |V| as a function of "
		"`dir`,`V_MAX`,`W_MAX`,`T_ramp_max`.");
	cfg.write(
		sSection, "expr_W", expr_W, WN, WV,
		"Math expr for |omega| (disregarding the sign, only the module) as a "
		"function of `dir`,`V_MAX`,`W_MAX`,`T_ramp_max`.");
	cfg.write(
		sSection, "expr_T_ramp", expr_T_ramp, WN, WV,
		"Math expr for `T_ramp` as a function of "
		"`dir`,`V_MAX`,`W_MAX`,`T_ramp_max`.");

	CPTG_RobotShape_Circular::saveToConfigFile(cfg, sSection);

	MRPT_END
}
Exemplo n.º 11
0
// --------------------------------------------------
//			saveToConfigFile
// --------------------------------------------------
void TMultiResDescMatchOptions::saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section ) const
{
	if( useOriFilter )
	{
	    cfg.write(section,"useOriFilter", "true" );
	    cfg.write(section,"oriThreshold", oriThreshold );
    }
    else
	    cfg.write(section,"useOriFilter", "false" );

    if( useDepthFilter )
	    cfg.write(section,"useDepthFilter", "true" );
    else
	    cfg.write(section,"useDepthFilter", "false" );

	cfg.write(section,"matchingThreshold", matchingThreshold );
	cfg.write(section,"matchingRatioThreshold", matchingRatioThreshold );
	cfg.write(section,"lowScl1", lowScl1 );
	cfg.write(section,"lowScl2", lowScl2 );
	cfg.write(section,"highScl1", highScl1 );
	cfg.write(section,"highScl2", highScl2 );

	cfg.write(section,"searchAreaSize", searchAreaSize );
	cfg.write(section,"lastSeenThreshold", lastSeenThreshold );
	cfg.write(section,"timesSeenThreshold", timesSeenThreshold );
	cfg.write(section,"minFeaturesToFind", minFeaturesToFind );
	cfg.write(section,"minFeaturesToBeLost", minFeaturesToBeLost );
} // end-saveToConfigFile
Exemplo n.º 12
0
// --------------------------------------------------
//			saveToConfigFile
// --------------------------------------------------
void TMultiResDescOptions::saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section ) const
{
	cfg.write(section,"basePSize", basePSize);
	cfg.write(section,"comLScl", comLScl );
	cfg.write(section,"comHScl", comHScl );
	cfg.write(section,"sg1", sg1 );
	cfg.write(section,"sg2", sg2 );
	cfg.write(section,"sg3", sg3 );

	cfg.write(section,"computeDepth", computeDepth ? "true" : "false" );
	cfg.write(section,"blurImage", blurImage ? "true" : "false" );
	cfg.write(section,"fx", fx );
	cfg.write(section,"cx", cx );
	cfg.write(section,"cy", cy );
	cfg.write(section,"baseline", baseline );
	cfg.write(section,"computeHashCoeffs", computeHashCoeffs ? "true" : "false" );

	char buf[300];
	for(unsigned int k = 0; k < scales.size(); ++k)
		mrpt::system::os::sprintf( buf, 300, "%.2f ", scales[k] );
	cfg.write(section,"scales", buf );
} // end-saveToConfigFile
Exemplo n.º 13
0
void CPTG_RobotShape_Circular::saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) const
{
	const int WN = 25, WV = 30;

	cfg.write(sSection, "robot_radius", m_robotRadius, WN, WV, "Robot radius [m].");
}