29#include <IceUtil/Time.h>
43 return "SelfLocalizationDynamicSimulation";
51 defs->component(simulatorProxy);
53 defs->optional(p.cycleTime,
"cycleTime");
54 defs->required(p.robotName,
"RobotName");
65 <<
"Robot with given name not available in armarx simulator: " + p.robotName;
67 ARMARX_INFO <<
"Using robot with name " << p.robotName;
77 &SelfLocalizationDynamicSimulation::reportRobotPose,
80 "SelfLocalizationDynamicSimulationCalculation");
82 execTask->setDelayWarningTolerance(100);
98 SelfLocalizationDynamicSimulation::reportRobotPose()
102 std::unique_lock lock(dataMutex);
104 const Eigen::Isometry3f globalPose = [&]() -> Eigen::Isometry3f
106 const PoseBasePtr poseBase = simulatorProxy->getRobotPose(p.robotName);
111 Eigen::Isometry3f::Identity();
114 return Eigen::Isometry3f(PosePtr::dynamicCast(poseBase)->
toEigen());
118 const PoseStamped mapPose{.pose = globalPose, .timestamp =
Clock::Now()};
129 <<
"Could not update robot pose in agents segment...\n"
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
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...
SelfLocalizationDynamicSimulation uses the armarx simulator to retrieve thre current psoe of the robo...
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
static std::string GetDefaultName()
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)