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

fix some YAML param names

parent 6440480c
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"
Pipeline #3994 passed
This commit is part of merge request !313. Comments created here will be created in the context of that merge request.
...@@ -24,17 +24,20 @@ static ProcessorParamsBasePtr createProcessorOdom3DParams(const std::string & _f ...@@ -24,17 +24,20 @@ static ProcessorParamsBasePtr createProcessorOdom3DParams(const std::string & _f
{ {
YAML::Node config = YAML::LoadFile(_filename_dot_yaml); YAML::Node config = YAML::LoadFile(_filename_dot_yaml);
if (config["processor type"].as<std::string>() == "ODOM 3D") WOLF_TRACE("");
if (config["type"].as<std::string>() == "ODOM 3D")
{ {
YAML::Node kf_vote = config["keyframe vote"]; WOLF_TRACE("");
YAML::Node kf_vote = config["keyframe_vote"];
WOLF_TRACE("");
ProcessorParamsOdom3DPtr params = std::make_shared<ProcessorParamsOdom3D>(); ProcessorParamsOdom3DPtr params = std::make_shared<ProcessorParamsOdom3D>();
params->time_tolerance = config["time tolerance"] .as<Scalar>(); params->time_tolerance = config["time_tolerance"] .as<Scalar>();
params->max_time_span = kf_vote["max time span"] .as<Scalar>(); params->max_time_span = kf_vote["max_time_span"] .as<Scalar>();
params->max_buff_length = kf_vote["max buffer length"] .as<SizeEigen >(); params->max_buff_length = kf_vote["max_buff_length"] .as<SizeEigen >();
params->dist_traveled = kf_vote["dist traveled"] .as<Scalar>(); params->dist_traveled = kf_vote["dist_traveled"] .as<Scalar>();
params->angle_turned = kf_vote["angle turned"] .as<Scalar>(); params->angle_turned = kf_vote["angle_turned"] .as<Scalar>();
return params; return params;
} }
......
...@@ -24,15 +24,15 @@ static IntrinsicsBasePtr createIntrinsicsOdom3D(const std::string & _filename_do ...@@ -24,15 +24,15 @@ static IntrinsicsBasePtr createIntrinsicsOdom3D(const std::string & _filename_do
{ {
YAML::Node config = YAML::LoadFile(_filename_dot_yaml); YAML::Node config = YAML::LoadFile(_filename_dot_yaml);
if (config["sensor type"].as<std::string>() == "ODOM 3D") 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>(); IntrinsicsOdom3DPtr params = std::make_shared<IntrinsicsOdom3D>();
params->k_disp_to_disp = variances["disp_to_disp"] .as<Scalar>(); params->k_disp_to_disp = variances["k_disp_to_disp"] .as<Scalar>();
params->k_disp_to_rot = variances["disp_to_rot"] .as<Scalar>(); params->k_disp_to_rot = variances["k_disp_to_rot"] .as<Scalar>();
params->k_rot_to_rot = variances["rot_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_disp_var = variances["min_disp_var"] .as<Scalar>();
params->min_rot_var = variances["min_rot_var"] .as<Scalar>(); params->min_rot_var = variances["min_rot_var"] .as<Scalar>();
......
...@@ -3,6 +3,6 @@ name: "Main odometer" # This is ignored. The name provided to the SensorF ...@@ -3,6 +3,6 @@ name: "Main odometer" # This is ignored. The name provided to the SensorF
time_tolerance: 0.01 # seconds time_tolerance: 0.01 # seconds
keyframe_vote: keyframe_vote:
max_time_span: 0.2 # seconds max_time_span: 0.2 # seconds
max_buffer_length: 10 # motion deltas max_buff_length: 10 # motion deltas
dist_traveled: 0.5 # meters dist_traveled: 0.5 # meters
angle_turned: 0.1 # radians (1 rad approx 57 deg, approx 60 deg) 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. 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 name: "Main odometer" # This is ignored. The name provided to the SensorFactory prevails
motion_variances: motion_variances:
disp_to_disp: 0.02 # m^2 / m k_disp_to_disp: 0.02 # m^2 / m
disp_to_rot: 0.02 # rad^2 / m k_disp_to_rot: 0.02 # rad^2 / m
rot_to_rot: 0.01 # rad^2 / rad k_rot_to_rot: 0.01 # rad^2 / rad
min_disp_var: 0.01 # m^2 min_disp_var: 0.01 # m^2
min_rot_var: 0.01 # rad^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