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 ==
"obstacleDistanceContinuousExponent")
52 else if (key ==
"orientationWeightFactor")
56 else if (key ==
"forwardWeightFactor")
60 else if (key ==
"forwardWeightObstacleScale")
64 else if (key ==
"smoothnessWeightFactor")
68 else if (key ==
"clearance")
73 catch (
const std::invalid_argument&)
75 throw std::runtime_error(
"Invalid value for key " + key +
": " + value);