Skip to content
Snippets Groups Projects
Commit 3c3826fb authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Use flat hierarchy in sensor and odometer 3D YAML

parent 49ec3d12
No related branches found
No related tags found
2 merge requests!312Adress 244: Do not use default yaml params,!305WIP: Resolve "Do not use default YAML params"
This commit is part of merge request !313. Comments created here will be created in the context of that merge request.
......@@ -24,20 +24,16 @@ static ProcessorParamsBasePtr createProcessorOdom3DParams(const std::string & _f
{
YAML::Node config = YAML::LoadFile(_filename_dot_yaml);
WOLF_TRACE("");
if (config["type"].as<std::string>() == "ODOM 3D")
{
WOLF_TRACE("");
YAML::Node kf_vote = config["keyframe_vote"];
WOLF_TRACE("");
ProcessorParamsOdom3DPtr params = std::make_shared<ProcessorParamsOdom3D>();
params->time_tolerance = config["time_tolerance"] .as<Scalar>();
params->max_time_span = kf_vote["max_time_span"] .as<Scalar>();
params->max_buff_length = kf_vote["max_buff_length"] .as<SizeEigen >();
params->dist_traveled = kf_vote["dist_traveled"] .as<Scalar>();
params->angle_turned = kf_vote["angle_turned"] .as<Scalar>();
params->max_time_span = config["max_time_span"] .as<Scalar>();
params->max_buff_length = config["max_buff_length"] .as<SizeEigen >();
params->dist_traveled = config["dist_traveled"] .as<Scalar>();
params->angle_turned = config["angle_turned"] .as<Scalar>();
return params;
}
......
......@@ -26,15 +26,15 @@ static IntrinsicsBasePtr createIntrinsicsOdom3D(const std::string & _filename_do
if (config["type"].as<std::string>() == "ODOM 3D")
{
YAML::Node variances = config["motion_variances"];
// YAML::Node variances = config["motion_variances"];
IntrinsicsOdom3DPtr params = std::make_shared<IntrinsicsOdom3D>();
params->k_disp_to_disp = variances["k_disp_to_disp"] .as<Scalar>();
params->k_disp_to_rot = variances["k_disp_to_rot"] .as<Scalar>();
params->k_rot_to_rot = variances["k_rot_to_rot"] .as<Scalar>();
params->min_disp_var = variances["min_disp_var"] .as<Scalar>();
params->min_rot_var = variances["min_rot_var"] .as<Scalar>();
params->k_disp_to_disp = config["k_disp_to_disp"] .as<Scalar>();
params->k_disp_to_rot = config["k_disp_to_rot"] .as<Scalar>();
params->k_rot_to_rot = config["k_rot_to_rot"] .as<Scalar>();
params->min_disp_var = config["min_disp_var"] .as<Scalar>();
params->min_rot_var = config["min_rot_var"] .as<Scalar>();
return params;
}
......
type: "ODOM 3D" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
name: "Main odometer" # This is ignored. The name provided to the SensorFactory prevails
time_tolerance: 0.01 # seconds
keyframe_vote:
max_time_span: 0.2 # seconds
max_buff_length: 10 # motion deltas
dist_traveled: 0.5 # meters
angle_turned: 0.1 # radians (1 rad approx 57 deg, approx 60 deg)
\ No newline at end of file
max_time_span: 0.2 # seconds
max_buff_length: 10 # motion deltas
dist_traveled: 0.5 # meters
angle_turned: 0.1 # radians (1 rad approx 57 deg, approx 60 deg)
\ No newline at end of file
type: "ODOM 3D" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
name: "Main odometer" # This is ignored. The name provided to the SensorFactory prevails
motion_variances:
k_disp_to_disp: 0.02 # m^2 / m
k_disp_to_rot: 0.02 # rad^2 / m
k_rot_to_rot: 0.01 # rad^2 / rad
min_disp_var: 0.01 # m^2
min_rot_var: 0.01 # rad^2
k_disp_to_disp: 0.02 # m^2 / m
k_disp_to_rot: 0.02 # rad^2 / m
k_rot_to_rot: 0.01 # rad^2 / rad
min_disp_var: 0.01 # m^2
min_rot_var: 0.01 # rad^2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment