18 std::ifstream file(fullFilePath);
21 throw std::runtime_error(
"Could not open config file: " + fullFilePath.string());
25 while (std::getline(file, line))
27 std::istringstream iss(line);
29 if (std::getline(iss, key,
'='))
32 if (std::getline(iss, value))
36 if (key ==
"maxObstacleDistance")
40 else if (key ==
"obstacleDistanceWeightFactor")
44 else if (key ==
"obstacleDistanceContinuousWeightFactor")
48 else if (key ==
"orientationWeightFactor")
52 else if (key ==
"forwardWeightFactor")
56 else if (key ==
"smoothnessWeightFactor")
61 catch (
const std::invalid_argument&)
63 throw std::runtime_error(
"Invalid value for key " + key +
": " + value);