diff --git a/source/RobotAPI/components/units/PlatformUnit.cpp b/source/RobotAPI/components/units/PlatformUnit.cpp index 7b01dda6b56843a43aed692a840711f91e8b5ff1..6f5c6b07454e2ad831d48ba327b33c7cd768ddde 100644 --- a/source/RobotAPI/components/units/PlatformUnit.cpp +++ b/source/RobotAPI/components/units/PlatformUnit.cpp @@ -39,6 +39,8 @@ namespace armarx def->topic(odometryPrx); def->topic(globalPosePrx); + def->component(robotStateComponent); + return def; } diff --git a/source/RobotAPI/components/units/PlatformUnit.h b/source/RobotAPI/components/units/PlatformUnit.h index f8b2335cf86044c8b611921632c028519fac41a6..097de6689522498722a1ec499b83cbeb12c5fa25 100644 --- a/source/RobotAPI/components/units/PlatformUnit.h +++ b/source/RobotAPI/components/units/PlatformUnit.h @@ -29,6 +29,7 @@ #include <ArmarXCore/core/application/properties/Properties.h> #include <ArmarXCore/core/system/ImportExportComponent.h> +#include <RobotAPI/interface/core/RobotState.h> #include <RobotAPI/interface/units/PlatformUnitInterface.h> #include <vector> @@ -125,6 +126,9 @@ namespace armarx GlobalRobotPoseLocalizationListenerPrx globalPosePrx; OdometryListenerPrx odometryPrx; + RobotStateComponentInterfacePrx robotStateComponent; + + }; PlatformPose toPlatformPose(const TransformStamped& transformStamped); diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp index 81b600f3c0b04224ea29bfa0226a61862d901403..09d1b2a42007030bd1b3d664d4faaa314d191ace 100755 --- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp +++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp @@ -32,17 +32,6 @@ namespace armarx { - - PropertyDefinitionsPtr armarx::PlatformSubUnit::createPropertyDefinitions() - { - auto def = PlatformUnit::createPropertyDefinitions(); - - def->component(robotStateComponent); - - return def; - } - - void armarx::PlatformSubUnit::update(const armarx::SensorAndControl& sc, const JointAndNJointControllers&) { if (!getProxy()) diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h index df975ed0e999c8e19ed588dbb426ab7695643c89..07dfb37a3008639acf593a0f8a1c2c26724927e4 100755 --- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h +++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h @@ -61,9 +61,6 @@ namespace armarx void reportGlobalRobotPose(const TransformStamped& currentPose, const Ice::Current& = Ice::emptyCurrent) override; - PropertyDefinitionsPtr createPropertyDefinitions() override; - - // PlatformUnit interface void onInitPlatformUnit() override { @@ -97,8 +94,6 @@ namespace armarx // TODO(fabian.reister): likely remove or adapt Eigen::Matrix4f positionCorrection = Eigen::Matrix4f::Identity(); - protected: - RobotStateComponentInterfacePrx robotStateComponent; private: