diff --git a/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.cpp b/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.cpp deleted file mode 100644 index 584d5dec78eed91ea00d27dc11a69cf27c8368b0..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "ArticulatedObjectProviderPlugin.h" - -namespace armarx::plugins -{ - - void ArticulatedObjectProviderPlugin::postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) - { - if (!properties->hasDefinition(makePropertyName(propertyName))) - { - properties->defineOptionalProperty<std::string>( - makePropertyName(propertyName), - "ArticulatedObjectTopic", - "Name of the articulated object topic."); - } - } - - void ArticulatedObjectProviderPlugin::preOnInitComponent() - { - parent<Component>().offeringTopicFromProperty(makePropertyName(propertyName)); - } - - void ArticulatedObjectProviderPlugin::preOnConnectComponent() - { - parent<articulated_object::ArticulatedObjectProviderPluginUser>().articulatedObjectTopic = createArticulatedObjectTopic(); - } - - void ArticulatedObjectProviderPlugin::postOnConnectComponent() - { - // TODO(fabian.reister): implement - - // ArticulatedObjectProviderPluginUser& parent = this->parent<ArticulatedObjectProviderPluginUser>(); - // objpose::ObjectPoseTopicPrx& topic = parent.articulatedObjectTopic; - // if (topic) - // { - // objpose::ProviderInfo info = parent.getProviderInfo(); - // if (!info.proxy) - // { - // info.proxy = ::armarx::objpose::ObjectPoseProviderPrx::checkedCast(parent.getProxy()); - // } - // topic->reportProviderAvailable(parent.getName(), info); - // } - // else - // { - // ARMARX_ERROR << "Object pose topic not ready."; - // } - } - - articulated_object::ArticulatedObjectTopicPrx ArticulatedObjectProviderPlugin::createArticulatedObjectTopic() - { - return parent<Component>().getTopicFromProperty<articulated_object::ArticulatedObjectTopicPrx>(makePropertyName(propertyName)); - } - -} // namespace armarx::plugins - - -namespace armarx::articulated_object -{ - - ArticulatedObjectProviderPluginUser::ArticulatedObjectProviderPluginUser() - { - addPlugin(plugin); - } - - provider::TrackingRequestResponse ArticulatedObjectProviderPluginUser::trackObjects(const provider::TrackingRequest& input, const ::Ice::Current&) - { - ARMARX_INFO << "Requested " << input.objectIDs.size() << " objects for " << input.relativeTimeoutMS << " ms."; - provider::TrackingRequestResponse output; - for (const auto& id : input.objectIDs) - { - output.status[id] = false; - } - return output; - } - - ArticulatedObjectTopicPrx ArticulatedObjectProviderPluginUser::createArticulatedObjectTopic() - { - return plugin->createArticulatedObjectTopic(); - } - -} // namespace armarx::articulated_object diff --git a/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.h b/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.h deleted file mode 100644 index 95062ae405e9cdd1f26c1f913c0263978430587b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/ArmarXObjects/plugins/ArticulatedObjectProviderPlugin.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once - -#include <ArmarXCore/core/Component.h> - -#include <RobotAPI/interface/core/articulated_object/provider.h> -#include <RobotAPI/interface/core/articulated_object/topic.h> - - -namespace armarx::plugins -{ - - class ArticulatedObjectProviderPlugin : public ComponentPlugin - { - public: - - using ComponentPlugin::ComponentPlugin; - - void postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) override; - - void preOnInitComponent() override; - void preOnConnectComponent() override; - void postOnConnectComponent() override; - - articulated_object::ArticulatedObjectTopicPrx createArticulatedObjectTopic(); - - - private: - - static constexpr const char* propertyName = "ArticulatedObjectTopicName"; - - }; - -} // namespace armarx::plugins - - -namespace armarx::articulated_object -{ - - /** - * @brief Provides an `articulated_object::ObjectPoseTopicPrx objectPoseTopic` as member variable. - */ - class ArticulatedObjectProviderPluginUser : - virtual public ManagedIceObject - , virtual public provider::ArticulatedObjectStateProvider - { - public: - - ArticulatedObjectProviderPluginUser(); - - /// Implement to process object requests (empty default implementation). - // articulated_object::provider::RequestObjectsOutput requestObjects(const articulated_object::provider::RequestObjectsInput& input, const Ice::Current&) override; - - provider::TrackingRequestResponse trackObjects(const provider::TrackingRequest&, const ::Ice::Current& = ::Ice::emptyCurrent) override; - - ArticulatedObjectTopicPrx createArticulatedObjectTopic(); - - ArticulatedObjectTopicPrx articulatedObjectTopic; - - - private: - - armarx::plugins::ArticulatedObjectProviderPlugin* plugin = nullptr; - - }; - -} // namespace armarx::articulated_object