29#include <IceUtil/Time.h>
43 defs->component(simulatorProxy);
45 defs->optional(p.cycleTime,
"cycleTime");
46 defs->required(p.robotName,
"RobotName");
57 <<
"Robot with given name not available in armarx simulator: " + p.robotName;
59 ARMARX_INFO <<
"Using robot with name " << p.robotName;
69 &SelfLocalizationDynamicSimulation::reportRobotPose,
72 "SelfLocalizationDynamicSimulationCalculation");
74 execTask->setDelayWarningTolerance(100);
90 SelfLocalizationDynamicSimulation::reportRobotPose()
94 std::unique_lock lock(dataMutex);
96 const Eigen::Isometry3f globalPose = [&]() -> Eigen::Isometry3f
98 const PoseBasePtr poseBase = simulatorProxy->getRobotPose(p.robotName);
103 Eigen::Isometry3f::Identity();
106 return Eigen::Isometry3f(PosePtr::dynamicCast(poseBase)->
toEigen());
110 const PoseStamped mapPose{.pose = globalPose, .timestamp =
Clock::Now()};
121 <<
"Could not update robot pose in agents segment...\n"
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
static DateTime Now()
Current time on the virtual clock.
The periodic task executes one thread method repeatedly using the time period specified in the constr...
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
void onDisconnectComponent() override
void onConnectComponent() override
PropertyDefinitionsPtr createPropertyDefinitions() override
void publishSelfLocalization(const PoseStamped &map_T_robot)
static void SleepMS(float milliseconds)
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string GetHandledExceptionString()
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Eigen::Vector3f toEigen(const pcl::PointXYZ &pt)