diff --git a/source/RobotAPI/components/GamepadControlUnit/GamepadControlUnit.h b/source/RobotAPI/components/GamepadControlUnit/GamepadControlUnit.h index 9b0bacd5092012472d3f975e1c6d40357ba6594c..da5945c44c7e289081df35385ea7e75184d69c90 100644 --- a/source/RobotAPI/components/GamepadControlUnit/GamepadControlUnit.h +++ b/source/RobotAPI/components/GamepadControlUnit/GamepadControlUnit.h @@ -31,6 +31,7 @@ #include <RobotAPI/interface/units/HandUnitInterface.h> #include <RobotAPI/interface/components/RobotHealthInterface.h> +#include <RobotAPI/interface/units/PlatformUnitInterface.h> namespace armarx { @@ -129,4 +130,3 @@ namespace armarx }; } - diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp index 4d4d2399bb3ee5059d9788fb60f61cf23f78c2b0..a17005e6d573ff98accd7b40e9c45376ed8e85c4 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp @@ -38,8 +38,6 @@ #include <ArmarXCore/core/system/ArmarXDataPath.h> #include <ArmarXCore/core/time/TimeUtil.h> -#include <RobotAPI/interface/units/PlatformUnitInterface.h> - using namespace Eigen; using namespace Ice; @@ -72,7 +70,6 @@ namespace armarx defineOptionalProperty<int>("HistoryLength", 10000, "Number of entries in the robot state history").setMin(0); defineOptionalProperty<float>("RobotModelScaling", 1.0f, "Scaling of the robot model"); defineOptionalProperty<std::string>("TopicPrefix", "", "Prefix for the sensor value topic name."); - defineOptionalProperty<std::string>("PlatformTopicName", "PlatformState", "Topic where platform state is published."); defineOptionalProperty<std::string>("GlobalRobotPoseLocalizationTopicName", "GlobalRobotPoseLocalization", "Topic where the global robot pose can be reported."); } @@ -149,7 +146,6 @@ namespace armarx usingTopic(topicPrefix + robotNodeSetName + "State"); usingTopic(topicPrefix + getProperty<std::string>("GlobalRobotPoseLocalizationTopicName").getValue()); - usingTopic(topicPrefix + getProperty<std::string>("PlatformTopicName").getValue()); try { @@ -692,39 +688,4 @@ namespace armarx return Timestamped<FramedPosePtr> {time, new FramedPose(globalPose, armarx::GlobalFrame, "")}; } - - // legacy - void RobotStateComponent::reportPlatformPose(const PlatformPose& currentPose, const Current&) - { - const float z = 0; - const Eigen::Vector3f position(currentPose.x, currentPose.y, z); - const Eigen::Matrix3f orientation = - Eigen::AngleAxisf(currentPose.rotationAroundZ, Eigen::Vector3f::UnitZ()).toRotationMatrix(); - const Eigen::Matrix4f globalPose = math::Helpers::Pose(position, orientation); - - IceUtil::Time time = IceUtil::Time::microSeconds(currentPose.timestampInMicroSeconds); - // ARMARX_IMPORTANT << VAROUT(currentPose.timestampInMicroSeconds); - - TransformStamped stamped; - stamped.header.frame = armarx::GlobalFrame; - stamped.header.agent = _synchronized->getName(); - stamped.header.timestampInMicroSeconds = time.toMicroSeconds(); - stamped.header.parentFrame = ""; - stamped.transform = globalPose; - - this->reportGlobalRobotPose(stamped); - - /* - * old: - insertPose(time, globalPose); - - if (_sharedRobotServant) - { - _sharedRobotServant->setTimestamp(time); - } - */ - } - - - } diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.h b/source/RobotAPI/components/RobotState/RobotStateComponent.h index 6a3b527630a594e5a12ed53a03690fa1a48cde0e..d786dd0d67efc4b5e8fe07e02bef4f4b370588da 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.h +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.h @@ -128,20 +128,6 @@ namespace armarx void setRobotStateObserver(RobotStateObserverPtr observer); - - // PlatformUnitListener interface - // TODO: Remove this interface and use GlobalRobotPoseLocalizationListener only. - /// Stores the platform pose in the pose history. - void reportPlatformPose(const PlatformPose& currentPose, const Ice::Current& = Ice::emptyCurrent) override; - /// Does nothing. - void reportNewTargetPose(Ice::Float newPlatformPositionX, Ice::Float newPlatformPositionY, Ice::Float newPlatformRotation, const Ice::Current& = Ice::emptyCurrent) override {} - /// Does nothing. - void reportPlatformVelocity(Ice::Float currentPlatformVelocityX, Ice::Float currentPlatformVelocityY, Ice::Float currentPlatformVelocityRotation, const Ice::Current& = Ice::emptyCurrent) override {} - /// Does nothing. - void reportPlatformOdometryPose(Ice::Float x, Ice::Float y, Ice::Float angle, const Ice::Current& = Ice::emptyCurrent) override {} - - - protected: // Component interface. @@ -239,4 +225,3 @@ namespace armarx }; } - diff --git a/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.cpp b/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.cpp index b82eefe899e35b8e4ef63b538221f6ec0adb9159..b8d85a279c6dc04485b03b4c31ff7e93b16e163c 100644 --- a/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.cpp +++ b/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.cpp @@ -21,6 +21,7 @@ */ #include "LegacyRobotStateMemoryAdapter.h" +#include <SimoxUtility/math/convert/mat3f_to_rpy.h> #include <RobotAPI/libraries/aron/common/aron_conversions.h> #include <RobotAPI/libraries/armem_robot_state/aron/Proprioception.aron.generated.h> @@ -211,17 +212,36 @@ namespace armarx::armem } - void LegacyRobotStateMemoryAdapter::reportPlatformPose(const PlatformPose& p, const Ice::Current &) + // void LegacyRobotStateMemoryAdapter::reportPlatformPose(const PlatformPose& p, const Ice::Current &) + // { + // ARMARX_DEBUG << "Got an update for platform pose"; + // std::lock_guard l(updateMutex); + // update.platformPose = p; + // updateTimestamps(p.timestampInMicroSeconds); + // } + + void LegacyRobotStateMemoryAdapter::reportGlobalRobotPose(const ::armarx::TransformStamped& transformStamped, const ::Ice::Current&) { + ARMARX_DEBUG << "Got an update for platform pose"; - std::lock_guard l(updateMutex); - update.platformPose = p; - updateTimestamps(p.timestampInMicroSeconds); - } - void LegacyRobotStateMemoryAdapter::reportNewTargetPose(Ice::Float, Ice::Float, Ice::Float, const Ice::Current &) - { + const Eigen::Isometry3f global_T_robot(transformStamped.transform); + const float yaw = simox::math::mat3f_to_rpy(global_T_robot.linear()).z(); + + armarx::PlatformPose p; + p.x = global_T_robot.translation().x(); + p.y = global_T_robot.translation().y(); + p.rotationAroundZ = yaw; + p.timestampInMicroSeconds = transformStamped.header.timestampInMicroSeconds; + + { + std::lock_guard l(updateMutex); + update.platformPose = p; + updateTimestamps(p.timestampInMicroSeconds); + } } + + void LegacyRobotStateMemoryAdapter::reportPlatformVelocity(Ice::Float f1, Ice::Float f2, Ice::Float f3, const Ice::Current &) { ARMARX_DEBUG << "Got an update for platform vels"; @@ -240,6 +260,8 @@ namespace armarx::armem update.platformOdometryPose = {f1, f2, f3}; updateTimestamps(now); } + + void LegacyRobotStateMemoryAdapter::commitArmar3RobotDescription() { diff --git a/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.h b/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.h index 9680d8c27a1e98e0e70c74308e5235f18bb4b1fc..71ab81f1a3582fafeed767ae7dcfc00f20cf0cad 100644 --- a/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.h +++ b/source/RobotAPI/components/armem/addon/LegacyRobotStateMemoryAdapter/LegacyRobotStateMemoryAdapter.h @@ -59,11 +59,12 @@ namespace armarx::armem void reportJointMotorTemperatures(const NameValueMap&, Ice::Long, bool, const Ice::Current&) override; void reportJointStatuses(const NameStatusMap&, Ice::Long, bool, const Ice::Current&) override; - void reportPlatformPose(const PlatformPose &, const Ice::Current &) override; - void reportNewTargetPose(Ice::Float, Ice::Float, Ice::Float, const Ice::Current &) override; + // void reportPlatformPose(const PlatformPose &, const Ice::Current &) override; void reportPlatformVelocity(Ice::Float, Ice::Float, Ice::Float, const Ice::Current &) override; void reportPlatformOdometryPose(Ice::Float, Ice::Float, Ice::Float, const Ice::Current &) override; + void reportGlobalRobotPose(const ::armarx::TransformStamped&, const ::Ice::Current& = ::Ice::emptyCurrent) override; + protected: /// @see PropertyUser::createPropertyDefinitions() diff --git a/source/RobotAPI/components/units/PlatformUnit.cpp b/source/RobotAPI/components/units/PlatformUnit.cpp index 83da0bb8486a38a075e10c9c6fae5a273c254f51..a5414a34e838b6fd2268f7bfb26ddc527530624f 100644 --- a/source/RobotAPI/components/units/PlatformUnit.cpp +++ b/source/RobotAPI/components/units/PlatformUnit.cpp @@ -38,7 +38,7 @@ namespace armarx def->topic(odometryPrx); def->topic(globalPosePrx); - // def->topic(listenerPrx, listenerChannelName, ""); + def->topic(listenerPrx, "PlatformState"); def->component(robotStateComponent); @@ -50,17 +50,12 @@ namespace armarx { std::string platformName = getProperty<std::string>("PlatformName").getValue(); - listenerChannelName = platformName + "State"; - offeringTopic(listenerChannelName); - this->onInitPlatformUnit(); } void PlatformUnit::onConnectComponent() { - listenerPrx = getTopic<PlatformUnitListenerPrx>(listenerChannelName); - this->onStartPlatformUnit(); } diff --git a/source/RobotAPI/components/units/PlatformUnit.h b/source/RobotAPI/components/units/PlatformUnit.h index 1b0b9499a4f50e6ec0b64631aaf9f85c9fa5bca5..ee3c2a6999c0ba4f1f9560106f818826162c432f 100644 --- a/source/RobotAPI/components/units/PlatformUnit.h +++ b/source/RobotAPI/components/units/PlatformUnit.h @@ -117,7 +117,7 @@ namespace armarx protected: - std::string listenerChannelName; + // std::string listenerChannelName; /** * PlatformUnitListener proxy for publishing state updates */ diff --git a/source/RobotAPI/components/units/PlatformUnitObserver.cpp b/source/RobotAPI/components/units/PlatformUnitObserver.cpp index d0e0cd8e0162983b77708d5499b60c6e012d71ba..2db1b8dae17b84c6d0ef98fea1129cebd97f9e75 100644 --- a/source/RobotAPI/components/units/PlatformUnitObserver.cpp +++ b/source/RobotAPI/components/units/PlatformUnitObserver.cpp @@ -21,6 +21,8 @@ */ #include "PlatformUnitObserver.h" +#include <Eigen/src/Geometry/Transform.h> +#include <SimoxUtility/math/convert/mat3f_to_rpy.h> #include "PlatformUnit.h" @@ -54,13 +56,13 @@ namespace armarx offerConditionCheck("smaller", new ConditionCheckSmaller()); usingTopic(platformNodeName + "State"); + usingTopic("GlobalRobotPoseLocalization"); } void PlatformUnitObserver::onConnectObserver() { // register all channels offerChannel("platformPose", "Current Position of " + platformNodeName); - offerChannel("targetPose", "Target Position of " + platformNodeName); offerChannel("platformVelocity", "Current velocity of " + platformNodeName); offerChannel("platformOdometryPose", "Current Odometry Position of " + platformNodeName); @@ -69,10 +71,6 @@ namespace armarx offerDataField("platformPose", "positionY", VariantType::Float, "Current Y position of " + platformNodeName + " in mm"); offerDataField("platformPose", "rotation", VariantType::Float, "Current Rotation of " + platformNodeName + " in radian"); - offerDataField("targetPose", "positionX", VariantType::Float, "Target X position of " + platformNodeName + " in mm"); - offerDataField("targetPose", "positionY", VariantType::Float, "Target Y position of " + platformNodeName + " in mm"); - offerDataField("targetPose", "rotation", VariantType::Float, "Target Rotation of " + platformNodeName + " in radian"); - offerDataField("platformVelocity", "velocityX", VariantType::Float, "Current X velocity of " + platformNodeName + " in mm/s"); offerDataField("platformVelocity", "velocityY", VariantType::Float, "Current Y velocity of " + platformNodeName + " in mm/s"); offerDataField("platformVelocity", "velocityRotation", VariantType::Float, "Current Rotation velocity of " + platformNodeName + " in radian/s"); @@ -86,16 +84,16 @@ namespace armarx } - void PlatformUnitObserver::reportPlatformPose(PlatformPose const& currentPose, const Ice::Current& c) + void PlatformUnitObserver::reportGlobalRobotPose(const ::armarx::TransformStamped& transformStamped, const ::Ice::Current&) { - nameValueMapToDataFields("platformPose", currentPose.x, currentPose.y, currentPose.rotationAroundZ); - updateChannel("platformPose"); - } + const Eigen::Isometry3f global_T_robot(transformStamped.transform); + + const float x = global_T_robot.translation().x(); + const float y = global_T_robot.translation().y(); + const float rotationAroundZ = simox::math::mat3f_to_rpy(global_T_robot.linear()).z(); - void PlatformUnitObserver::reportNewTargetPose(::Ice::Float newPlatformPositionX, ::Ice::Float newPlatformPositionY, ::Ice::Float newPlatformRotation, const Ice::Current& c) - { - nameValueMapToDataFields("targetPose", newPlatformPositionX, newPlatformPositionY, newPlatformRotation); - updateChannel("targetPose"); + nameValueMapToDataFields("platformPose", x, y, rotationAroundZ); + updateChannel("platformPose"); } void PlatformUnitObserver::reportPlatformVelocity(::Ice::Float currentPlatformVelocityX, ::Ice::Float currentPlatformVelocityY, ::Ice::Float currentPlatformVelocityRotation, const Ice::Current& c) @@ -128,4 +126,6 @@ namespace armarx nameValueMapToDataFields("platformOdometryPose", x, y, angle); updateChannel("platformOdometryPose"); } + + } diff --git a/source/RobotAPI/components/units/PlatformUnitObserver.h b/source/RobotAPI/components/units/PlatformUnitObserver.h index 66b24989d267e30fb9a6f1ebe3e3f3bfa3a0dced..20cdfefcd7c380eccf2e1144b3d4206b239cf088 100644 --- a/source/RobotAPI/components/units/PlatformUnitObserver.h +++ b/source/RobotAPI/components/units/PlatformUnitObserver.h @@ -25,6 +25,7 @@ #include <ArmarXCore/core/system/ImportExport.h> #include <ArmarXCore/core/Component.h> +#include <RobotAPI/interface/core/RobotLocalization.h> #include <RobotAPI/interface/observers/PlatformUnitObserverInterface.h> #include <ArmarXCore/interface/observers/VariantBase.h> @@ -78,11 +79,13 @@ namespace armarx void onConnectObserver() override; // slice interface implementation - void reportPlatformPose(PlatformPose const& currentPose, const Ice::Current& c = Ice::emptyCurrent) override; - void reportNewTargetPose(::Ice::Float newPlatformPositionX, ::Ice::Float newPlatformPositionY, ::Ice::Float newPlatformRotation, const Ice::Current& c = Ice::emptyCurrent) override; void reportPlatformVelocity(::Ice::Float currentPlatformVelocityX, ::Ice::Float currentPlatformVelocityY, ::Ice::Float currentPlatformVelocityRotation, const Ice::Current& c = Ice::emptyCurrent) override; void reportPlatformOdometryPose(Ice::Float x, Ice::Float y, Ice::Float angle, const Ice::Current&) override; + // slice interface implementation + void reportGlobalRobotPose(const ::armarx::TransformStamped&, const ::Ice::Current& = ::Ice::emptyCurrent) override; + + std::string getDefaultName() const override { return "PlatformUnitObserver"; @@ -143,6 +146,5 @@ namespace armarx namespace armarx::channels::PlatformUnitObserver { const PlatformUnitDatafieldCreator platformPose("platformPose"); - const PlatformUnitDatafieldCreator targetPose("targetPose"); const PlatformUnitDatafieldCreator platformVelocity("platformVelocity"); } diff --git a/source/RobotAPI/components/units/PlatformUnitSimulation.cpp b/source/RobotAPI/components/units/PlatformUnitSimulation.cpp index 3c9cde6b67a1106976beee9032795262755a4be3..6abaa676025df57bbfbbde4f61ad147ac54e97eb 100644 --- a/source/RobotAPI/components/units/PlatformUnitSimulation.cpp +++ b/source/RobotAPI/components/units/PlatformUnitSimulation.cpp @@ -103,8 +103,6 @@ namespace armarx globalPosePrx->reportGlobalRobotPose(currentPose); - // legacy - listenerPrx->reportPlatformPose(toPlatformPose(currentPose)); simulationTask->start(); } @@ -229,8 +227,17 @@ namespace armarx odometryPrx->reportOdometryPose(platformPose); odometryPrx->reportOdometryVelocity(platformVelocity); - // legacy - listenerPrx->reportPlatformPose(toPlatformPose(platformPose)); + { + TransformStamped currentPose; + currentPose.header.parentFrame = GlobalFrame; + currentPose.header.frame = robotRootFrame; + currentPose.header.agent = agentName; + currentPose.header.timestampInMicroSeconds = TimeUtil::GetTime().toMicroSeconds(); + currentPose.transform = currentPlatformPose(); + + globalPosePrx->reportGlobalRobotPose(currentPose); + } + // legacy const auto& velo = platformVelocity.twist; @@ -259,9 +266,6 @@ namespace armarx TransformStamped targetPose; targetPose.header = header; targetPose.transform = VirtualRobot::MathTools::posrpy2eigen4f(targetPositionX, targetPositionY, 0, 0, 0, targetRotation); - - const auto tp = toPlatformPose(targetPose); - listenerPrx->reportNewTargetPose(tp.x, tp.y, tp.rotationAroundZ); } void armarx::PlatformUnitSimulation::move(float targetPlatformVelocityX, float targetPlatformVelocityY, float targetPlatformVelocityRotation, const Ice::Current& c) diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h index 24f8ac9db2bd10eb6c9e8e7e2f36ac75931a69e0..93ea9a009c91a8c46b2c96ac0ac4917d0fb36850 100755 --- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h +++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.h @@ -61,7 +61,6 @@ namespace armarx // PlatformUnit interface void onInitPlatformUnit() override { - usingTopic("PlatformState"); } void onStartPlatformUnit() override { diff --git a/source/RobotAPI/interface/armem/addon/LegacyRobotStateMemoryAdapterInterface.ice b/source/RobotAPI/interface/armem/addon/LegacyRobotStateMemoryAdapterInterface.ice index ffd72e20c51675c207869ae3c8c66e52b84c77fa..baad0e798bc8a3762ec28ac4394b1a3556e3c576 100644 --- a/source/RobotAPI/interface/armem/addon/LegacyRobotStateMemoryAdapterInterface.ice +++ b/source/RobotAPI/interface/armem/addon/LegacyRobotStateMemoryAdapterInterface.ice @@ -2,6 +2,7 @@ #include <RobotAPI/interface/units/KinematicUnitInterface.ice> #include <RobotAPI/interface/units/PlatformUnitInterface.ice> +#include <RobotAPI/interface/core/RobotLocalization.ice> module armarx { @@ -9,7 +10,7 @@ module armarx { module robot_state { - interface LegacyRobotStateMemoryAdapterInterface extends armarx::KinematicUnitListener, armarx::PlatformUnitListener + interface LegacyRobotStateMemoryAdapterInterface extends armarx::KinematicUnitListener, armarx::PlatformUnitListener, armarx::GlobalRobotPoseLocalizationListener { } } diff --git a/source/RobotAPI/interface/core/RobotState.ice b/source/RobotAPI/interface/core/RobotState.ice index a80b9b22c09d331e30f726dfb751c45543319fc5..6b6ad3bd501a57603a8da4226cd92e7f59ba1796 100644 --- a/source/RobotAPI/interface/core/RobotState.ice +++ b/source/RobotAPI/interface/core/RobotState.ice @@ -24,13 +24,14 @@ #pragma once #include <ArmarXCore/interface/events/SimulatorResetEvent.ice> -#include <RobotAPI/interface/units/KinematicUnitInterface.ice> -#include <RobotAPI/interface/units/PlatformUnitInterface.ice> -#include <RobotAPI/interface/core/FramedPoseBase.ice> - #include <ArmarXCore/interface/observers/Timestamp.ice> #include <ArmarXCore/interface/core/BasicTypes.ice> #include <ArmarXCore/interface/serialization/Eigen.ice> + +#include <RobotAPI/interface/units/KinematicUnitInterface.ice> +#include <RobotAPI/interface/core/FramedPoseBase.ice> +#include <RobotAPI/interface/core/RobotLocalization.ice> + #include <Ice/BuiltinSequences.ice> module armarx @@ -188,7 +189,6 @@ module armarx */ interface RobotStateComponentInterface extends KinematicUnitListener, - PlatformUnitListener, GlobalRobotPoseLocalizationListener, SimulatorResetEvent { diff --git a/source/RobotAPI/interface/observers/PlatformUnitObserverInterface.ice b/source/RobotAPI/interface/observers/PlatformUnitObserverInterface.ice index e7eddd170418f8ed671695807e3817e0522bf1da..20709f1fedeb65bb3766d2008607ee750a74965a 100644 --- a/source/RobotAPI/interface/observers/PlatformUnitObserverInterface.ice +++ b/source/RobotAPI/interface/observers/PlatformUnitObserverInterface.ice @@ -26,10 +26,11 @@ #include <ArmarXCore/interface/observers/ObserverInterface.ice> +#include <RobotAPI/interface/core/RobotLocalization.ice> + module armarx { - interface PlatformUnitObserverInterface extends ObserverInterface, PlatformUnitListener + interface PlatformUnitObserverInterface extends ObserverInterface, PlatformUnitListener, GlobalRobotPoseLocalizationListener { }; }; - diff --git a/source/RobotAPI/interface/units/PlatformUnitInterface.ice b/source/RobotAPI/interface/units/PlatformUnitInterface.ice index f7f62d13d0b490fd50284582096e0308fff90223..f83ad97cf10f83c8975a8c79f1b44deecd594d4e 100644 --- a/source/RobotAPI/interface/units/PlatformUnitInterface.ice +++ b/source/RobotAPI/interface/units/PlatformUnitInterface.ice @@ -24,22 +24,22 @@ #pragma once -#include <RobotAPI/interface/units/UnitInterface.ice> - -#include <ArmarXCore/interface/core/UserException.ice> #include <ArmarXCore/interface/core/BasicTypes.ice> +#include <ArmarXCore/interface/core/UserException.ice> + #include <RobotAPI/interface/core/GeometryBase.ice> #include <RobotAPI/interface/core/RobotLocalization.ice> +#include <RobotAPI/interface/units/UnitInterface.ice> module armarx -{ - /** +{ + /** * Implements an interface to an PlatformUnit. **/ interface PlatformUnitInterface extends SensorActorUnitInterface { - /** + /** * moveTo moves the platform to a global pose specified by: * @param targetPlatformPositionX Global x-coordinate of target position. * @param targetPlatformPositionY Global y-coordinate of target position. @@ -47,14 +47,20 @@ module armarx * @param postionalAccuracy Platform stops translating if distance to target position gets lower than this threshhold. * @param orientationalAccuracy Platform stops rotating if distance from current to target orientation gets lower than this threshhold. **/ - void moveTo(float targetPlatformPositionX, float targetPlatformPositionY, float targetPlatformRotation, float positionalAccuracy, float orientationalAccuracy); + void moveTo(float targetPlatformPositionX, + float targetPlatformPositionY, + float targetPlatformRotation, + float positionalAccuracy, + float orientationalAccuracy); /** * move moves the platform with given velocities. * @param targetPlatformVelocityX x-coordinate of target velocity defined in platform root. * @param targetPlatformVelocityY y-coordinate of target velocity defined in platform root. * @param targetPlatformVelocityRotation Target orientational velocity defined in platform root. **/ - void move(float targetPlatformVelocityX, float targetPlatformVelocityY, float targetPlatformVelocityRotation); + void move(float targetPlatformVelocityX, + float targetPlatformVelocityY, + float targetPlatformVelocityRotation); /** * moveRelative moves to a pose defined in platform coordinates. * @param targetPlatformOffsetX x-coordinate of target position defined in platform root. @@ -63,7 +69,11 @@ module armarx * @param postionalAccuracy Platform stops translating if distance to target position gets lower than this threshhold. * @param orientationalAccuracy Platform stops rotating if distance from current to target orientation gets lower than this threshhold. **/ - void moveRelative(float targetPlatformOffsetX, float targetPlatformOffsetY, float targetPlatformOffsetRotation, float positionalAccuracy, float orientationalAccuracy); + void moveRelative(float targetPlatformOffsetX, + float targetPlatformOffsetY, + float targetPlatformOffsetRotation, + float positionalAccuracy, + float orientationalAccuracy); /** * setMaxVelocities allows to specify max velocities in translation and orientation. * @param positionalVelocity Max translation velocity. @@ -84,42 +94,28 @@ module armarx float rotationAroundZ = 0.0f; }; - /** + /** * Implements an interface to an PlatformUnitListener. **/ interface PlatformUnitListener { /** - * reportPlatformPose reports current platform pose. - * @param currentPose Current global platform pose. - **/ - ["deprecate:reportPlatformPose() has been deprecated, use GlobalRobotPoseLocalizationListener::reportGlobalRobotPose() instead."] - void reportPlatformPose(PlatformPose currentPose); - - /** - * reportNewTargetPose reports target platform pose. - * @param newPlatformPositionX Global x-coordinate of target platform position. - * @param newPlatformPositionY Global y-coordinate of target platform position. - * @param newPlatformRotation Target global orientation of platform. - **/ - ["deprecate:reportNewTargetPose() has been deprecated, use ... instead."] - void reportNewTargetPose(float newPlatformPositionX, float newPlatformPositionY, float newPlatformRotation); - /** - * reportPlatformVelocity reports current platform velocities. - * @param currentPlatformVelocityX x-coordinate of current velocity defined in platform root. - * @param currentPlatformVelocityY y-coordinate of current velocity defined in platform root. - * @param currentPlatformVelocityRotation Current orientational velocity defined in platform root. - **/ - // ["deprecate:reportPlatformVelocity() has been deprecated, use OdometryListener::reportOdometryVelocity() instead."] - void reportPlatformVelocity(float currentPlatformVelocityX, float currentPlatformVelocityY, float currentPlatformVelocityRotation); + * reportPlatformVelocity reports current platform velocities. + * @param currentPlatformVelocityX x-coordinate of current velocity defined in platform root. + * @param currentPlatformVelocityY y-coordinate of current velocity defined in platform root. + * @param currentPlatformVelocityRotation Current orientational velocity defined in platform root. + **/ + // ["deprecate:reportPlatformVelocity() has been deprecated, use OdometryListener::reportOdometryVelocity() instead."] + void reportPlatformVelocity(float currentPlatformVelocityX, + float currentPlatformVelocityY, + float currentPlatformVelocityRotation); - ["deprecate:reportPlatformOdometryPose() has been deprecated, use OdometryListener::reportOdometryPose() instead."] - void reportPlatformOdometryPose(float x, float y, float angle); + ["deprecate:reportPlatformOdometryPose() has been deprecated, use " + "OdometryListener::reportOdometryPose() instead."] void + reportPlatformOdometryPose(float x, float y, float angle); }; interface PlatformSubUnitInterface extends PlatformUnitInterface { - }; - };