From 4e6837cbacdd03277ca4d09a69db320f3cf5ff11 Mon Sep 17 00:00:00 2001 From: armar-user <armar6@kit.edu> Date: Mon, 25 Jul 2022 19:59:11 +0200 Subject: [PATCH] fix: platform observer didn't receive platform velocity --- source/RobotAPI/components/units/PlatformUnit.cpp | 4 +++- .../components/units/RobotUnit/Units/PlatformSubUnit.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/RobotAPI/components/units/PlatformUnit.cpp b/source/RobotAPI/components/units/PlatformUnit.cpp index 4cbf370ff..83da0bb84 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, listenerChannelName, ""); def->component(robotStateComponent); @@ -59,6 +59,8 @@ namespace armarx void PlatformUnit::onConnectComponent() { + listenerPrx = getTopic<PlatformUnitListenerPrx>(listenerChannelName); + this->onStartPlatformUnit(); } diff --git a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp index 83635aac6..5ae63c2ac 100755 --- a/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp +++ b/source/RobotAPI/components/units/RobotUnit/Units/PlatformSubUnit.cpp @@ -134,7 +134,7 @@ namespace armarx // legacy interface const auto& vel = odomVelocity.twist; - // listenerPrx->reportPlatformVelocity(vel.linear.x(), vel.linear.y(), vel.angular.z()); + listenerPrx->reportPlatformVelocity(vel.linear.x(), vel.linear.y(), vel.angular.z()); } } -- GitLab