diff --git a/source/RobotAPI/statecharts/ObjectMemoryGroup/RequestObjects.cpp b/source/RobotAPI/statecharts/ObjectMemoryGroup/RequestObjects.cpp index 562ddabd56b6d07428f8ce2b386fa682ac95dd1f..56dc86697810e10870f6b409b3f6f810ee9b0729 100644 --- a/source/RobotAPI/statecharts/ObjectMemoryGroup/RequestObjects.cpp +++ b/source/RobotAPI/statecharts/ObjectMemoryGroup/RequestObjects.cpp @@ -3,30 +3,34 @@ //#include <ArmarXCore/core/time/TimeUtil.h> //#include <ArmarXCore/observers/variant/DatafieldRef.h> -#include <RobotAPI/libraries/armem_objects/client/instance/ObjectReader.h> #include <RobotAPI/libraries/ArmarXObjects/ObjectID.h> #include <RobotAPI/libraries/ArmarXObjects/ice_conversions.h> +#include <RobotAPI/libraries/armem_objects/client/instance/ObjectReader.h> #include "ObjectMemoryGroupStatechartContext.generated.h" namespace armarx::ObjectMemoryGroup { // DO NOT EDIT NEXT LINE - RequestObjects::SubClassRegistry RequestObjects::Registry(RequestObjects::GetName(), &RequestObjects::CreateInstance); + RequestObjects::SubClassRegistry RequestObjects::Registry(RequestObjects::GetName(), + &RequestObjects::CreateInstance); - RequestObjects::RequestObjects(const XMLStateConstructorParams& stateData): - XMLStateTemplate<RequestObjects>(stateData), RequestObjectsGeneratedBase<RequestObjects>(stateData) + RequestObjects::RequestObjects(const XMLStateConstructorParams& stateData) : + XMLStateTemplate<RequestObjects>(stateData), + RequestObjectsGeneratedBase<RequestObjects>(stateData) { } - void RequestObjects::onEnter() + void + RequestObjects::onEnter() { // put your user code for the enter-point here // execution time should be short (<100ms) } - void RequestObjects::run() + void + RequestObjects::run() { if (not in.getEnable()) { @@ -39,7 +43,8 @@ namespace armarx::ObjectMemoryGroup const std::string provider = in.isProviderSet() ? in.getProvider() : ""; const std::vector<std::string> objectIdsString = in.getObjectIds(); - const armarx::Duration relativeTimeout = armarx::Duration::MilliSeconds(in.getRelativeTimeoutMilliseconds()); + const armarx::Duration relativeTimeout = + armarx::Duration::MilliSeconds(in.getRelativeTimeoutMilliseconds()); std::stringstream info; std::stringstream warn; @@ -49,21 +54,22 @@ namespace armarx::ObjectMemoryGroup { try { - armarx::ObjectID id = armarx::ObjectID::FromString(idString); - objectIds.push_back(id); - info << "Requesting object " << id << "\n"; + armarx::ObjectID id = armarx::ObjectID::FromString(idString); + objectIds.push_back(id); + info << "Requesting object " << id << "\n"; } catch (const armarx::LocalException& e) { - warn << "\nGiven object ID '" << idString << "' could not parsed as ObjectID: " << e.what(); + warn << "\nGiven object ID '" << idString + << "' could not parsed as ObjectID: " << e.what(); } } auto context = getContext<ObjectMemoryGroupStatechartContext>(); armarx::armem::client::MemoryNameSystem mns(getMemoryNameSystem(), context); - Reader reader{mns}; - reader.connect(); + Reader reader; + reader.connect(mns); objpose::ObjectPoseStorageInterfacePrx storage = reader.getObjectPoseStorage(); armarx::objpose::observer::RequestObjectsInput input; @@ -91,7 +97,8 @@ namespace armarx::ObjectMemoryGroup { if (result.result.success) { - info << "Requested object " << id << " via provider '" << result.providerName << "'.\n"; + info << "Requested object " << id << " via provider '" << result.providerName + << "'.\n"; } else { @@ -105,8 +112,9 @@ namespace armarx::ObjectMemoryGroup } if (not warn.str().empty()) { - ARMARX_WARNING << "The following issues occurred whhen requesting objects for localization:" - << warn.str(); + ARMARX_WARNING + << "The following issues occurred whhen requesting objects for localization:" + << warn.str(); } emitSuccess(); @@ -118,16 +126,17 @@ namespace armarx::ObjectMemoryGroup // // execution time should be short (<100ms) //} - void RequestObjects::onExit() + void + RequestObjects::onExit() { // put your user code for the exit point here // execution time should be short (<100ms) } - // DO NOT EDIT NEXT FUNCTION - XMLStateFactoryBasePtr RequestObjects::CreateInstance(XMLStateConstructorParams stateData) + XMLStateFactoryBasePtr + RequestObjects::CreateInstance(XMLStateConstructorParams stateData) { return XMLStateFactoryBasePtr(new RequestObjects(stateData)); } -} +} // namespace armarx::ObjectMemoryGroup