25#include <Eigen/Geometry>
27#include <SimoxUtility/math/convert/mat4f_to_rpy.h>
28#include <VirtualRobot/MathTools.h>
31#include <RobotAPI/interface/core/GeometryBase.h>
32#include <RobotAPI/interface/core/PoseBase.h>
55 std::lock_guard<std::mutex> guard{
dataMutex};
61 FrameHeader odomVelocityHeader;
62 odomVelocityHeader.parentFrame = robotRootFrame;
63 odomVelocityHeader.frame = robotRootFrame;
64 odomVelocityHeader.agent = agentName;
65 odomVelocityHeader.timestampInMicroSeconds =
timestamp;
68 FrameHeader odomPoseHeader;
70 odomPoseHeader.frame = robotRootFrame;
71 odomPoseHeader.agent = agentName;
72 odomPoseHeader.timestampInMicroSeconds =
timestamp;
75 FrameHeader globalPoseHeader;
77 globalPoseHeader.frame = robotRootFrame;
78 globalPoseHeader.agent = agentName;
79 globalPoseHeader.timestampInMicroSeconds =
timestamp;
89 const auto odom_T_robot = VirtualRobot::MathTools::posrpy2eigen4f(
90 s->relativePositionX, s->relativePositionY, 0, 0, 0, s->relativePositionRotation);
117 const TransformStamped odomPose{.header = odomPoseHeader, .transform = odom_T_robot};
123 odomLegacyPose.x, odomLegacyPose.y, odomLegacyPose.rotationAroundZ);
132 TwistStamped odomVelocity;
133 odomVelocity.header = odomVelocityHeader;
134 odomVelocity.twist.linear << s->velocityX, s->velocityY, 0;
135 odomVelocity.twist.angular << 0, 0, s->velocityRotation;
140 const auto& vel = odomVelocity.twist;
141 listenerPrx->reportPlatformVelocity(vel.linear.x(), vel.linear.y(), vel.angular.z());
149 if (!
pt->isControllerActive())
151 pt->activateController();
153 std::lock_guard<std::mutex> guard{
dataMutex};
197 std::lock_guard<std::mutex> guard{
dataMutex};
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
The SensorValueBase class.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_INFO
The normal logging level.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
std::string const GlobalFrame
Variable of the global coordinate system.
This file offers overloads of toIce() and fromIce() functions for STL container types.
PlatformPose toPlatformPose(const TransformStamped &transformStamped)
std::string const OdometryFrame
detail::ControlThreadOutputBufferEntry SensorAndControl
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.
IceUtil::Time sensorValuesTimestamp
std::vector< PropagateConst< SensorValueBase * > > sensors