Go to the documentation of this file.
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);
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"
void onDisconnectComponent() override
void publishSelfLocalization(const PoseStamped &map_T_robot)
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
PropertyDefinitionsPtr createPropertyDefinitions() override
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
std::string GetHandledExceptionString()
void Identity(MatrixXX< N, N, T > *a)
Eigen::Vector3f toEigen(const pcl::PointXYZ &pt)
void onDisconnectComponent() override
Hook for subclass.
static void SleepMS(float milliseconds)
void onConnectComponent() override
Pure virtual hook for the subclass.
static DateTime Now()
Current time on the virtual clock.
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
void onConnectComponent() override
This file offers overloads of toIce() and fromIce() functions for STL container types.