42 const tinyxml2::XMLElement* xml_element,
43 const std::array<int, 3>& )
47 if (status != tinyxml2::XML_SUCCESS)
48 std::throw_with_nested(std::runtime_error(std::string(xml_element->Value()) +
": Missing or failed to parse "
49 "'filename' attribute."));
52 if (resource ==
nullptr)
53 std::throw_with_nested(
54 std::runtime_error(std::string(xml_element->Value()) +
": Failed to locate resource '" + filename +
"'."));
56 std::filesystem::path file_path(resource->getFilePath());
57 if (!std::filesystem::exists(file_path))
58 std::throw_with_nested(std::runtime_error(std::string(xml_element->Value()) +
59 ": config file does not exist: "
61 file_path.string() +
"'."));
67 const tinyxml2::XMLElement* xml_element,
68 const std::array<int, 3>& version)
70 std::filesystem::path cal_config_file_path =
parseConfigFilePath(locator, xml_element, version);
79 std::throw_with_nested(std::runtime_error(
"calibration_config: YAML failed to parse calibration config "
81 cal_config_file_path.string() +
"'."));
89 for (
const auto& cal_joint : info.joints)
91 if (scene_graph.
getJoint(cal_joint.first) ==
nullptr)
92 std::throw_with_nested(std::runtime_error(
"calibration_config: joint '" + cal_joint.first +
"' does not exist!"));
99 const tinyxml2::XMLElement* xml_element,
100 const std::array<int, 3>& version)
102 std::filesystem::path kin_plugin_file_path =
parseConfigFilePath(locator, xml_element, version);
111 std::throw_with_nested(std::runtime_error(
"kinematics_plugin_config: YAML failed to parse kinematics plugins "
113 kin_plugin_file_path.string() +
"'."));
124 const tinyxml2::XMLElement* xml_element,
125 const std::array<int, 3>& version)
127 std::filesystem::path cm_plugin_file_path =
parseConfigFilePath(locator, xml_element, version);
136 std::throw_with_nested(std::runtime_error(
"contact_managers_plugin_config: YAML failed to parse contact "
139 cm_plugin_file_path.string() +
"'."));