Go to the documentation of this file.
29 #include <IceUtil/Time.h>
40 defs->component(simulatorProxy);
42 defs->optional(p.cycleTime,
"cycleTime");
43 defs->required(p.robotName,
"RobotName");
53 <<
"Robot with given name not available in armarx simulator: " + p.robotName;
55 ARMARX_INFO <<
"Using robot with name " << p.robotName;
65 &SelfLocalizationDynamicSimulation::reportRobotPose,
68 "SelfLocalizationDynamicSimulationCalculation");
70 execTask->setDelayWarningTolerance(100);
84 void SelfLocalizationDynamicSimulation::reportRobotPose()
88 std::unique_lock lock(dataMutex);
90 const Eigen::Isometry3f globalPose = [&]() -> Eigen::Isometry3f
92 const PoseBasePtr poseBase = simulatorProxy->getRobotPose(p.robotName);
100 return Eigen::Isometry3f(PosePtr::dynamicCast(poseBase)->
toEigen());
104 const PoseStamped mapPose{.pose = globalPose, .timestamp =
Clock::Now()};
115 <<
"Could not update robot pose in agents segment...\n"
void onDisconnectComponent() override
void publishSelfLocalization(const PoseStamped &map_T_robot)
Eigen::Matrix4f toEigen(data::GlobalPose const &pose)
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)
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.