3 #include <SimoxUtility/algorithm/string/fuzzy_multi_match.hpp>
7 #include <armarx/navigation/core/aron/Location.aron.generated.h>
20 defaultParameters.navigateToLocation.fromAron(
22 defaultParameters.navigateToLocation.location =
"<Resolved according to 'locationName'>";
25 description <<
"Resolve a named location and navigate to it."
26 <<
"\n\n`locationName`: The location's human-readable name."
27 <<
"\n\n`minMatchRatio`: Minimum match ratio required to accept a match "
28 "between a location's name and `locationName`."
29 <<
"\n\nThe parameters `navigateToLocation` are passed to the sub skill "
30 "`NavigateToLocation`, except for `navigateToLocation.location`, which is "
31 "set to the location that `locationName` is resolved to.";
38 .parametersType = Params::ToAronType(),
61 std::stringstream log;
63 in.parameters.locationName, in.parameters.minMatchRatio, &log);
66 ARMARX_CHECK(matchResult.resolved.has_value() xor matchResult.errorMessage.has_value());
68 if (matchResult.errorMessage.has_value())
70 std::stringstream msg;
71 msg <<
"Failed to resolve location name '" << in.parameters.locationName
72 <<
"'. Reason: " << matchResult.errorMessage.value();
77 locationId = matchResult.resolved->locationId;
86 arondto::NavigateToLocationParams
parameters = in.parameters.navigateToLocation;
87 parameters.location = locationId.providerSegmentName +
"/" + locationId.entityName;
90 if (not(
update.has_value() and
update->hasBeenSucceeded()))