30#include <Eigen/Geometry>
32#include <VirtualRobot/MathTools.h>
63 "RobotPoseUnitSimulation");
68 std::string robotTopicName =
"Simulator_Robot_";
70 ARMARX_INFO <<
"Simulator Robot topic: " << robotTopicName;
118 Eigen::Matrix4f m = Eigen::Matrix4f::Identity();
143 const Ice::Current&
c)
148 this->targetPose = *(PosePtr::dynamicCast(
targetPose));
165 Eigen::Matrix4f m = VirtualRobot::MathTools::quat2eigen4f(
q.x(),
q.y(),
q.z(),
q.w());
167 VirtualRobot::MathTools::eigen4f2rpy(m, rpy);
182 const Ice::Current&
c)
188 Eigen::Matrix4f pose;
190 Eigen::Matrix4f rel = PosePtr::dynamicCast(relativeTarget)->toEigen();
200 float angularVelocity,
201 const Ice::Current&
c)
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
The periodic task executes one thread method repeatedly using the time period specified in the constr...
void setCurrentPose(const PoseBasePtr &newPose)
::Ice::Float positionalAccuracy
void stopMovement(const Ice::Current &c=Ice::emptyCurrent) override
PeriodicTask< RobotPoseUnitDynamicSimulation >::pointer_type simulationTask
void updateCurrentPose(const PoseBasePtr &newPose)
SimulatorInterfacePrx simulatorPrx
void moveRelative(const PoseBasePtr &relativeTarget, Ice::Float positionalAccuracy, Ice::Float orientationalAccuracy, const Ice::Current &c=Ice::emptyCurrent) override
::Ice::Float orientationalAccuracy
void reportState(SimulatedRobotState const &state, const Ice::Current &) override
std::mutex currentPoseMutex
void onStartRobotPoseUnit() override
PropertyDefinitionsPtr createPropertyDefinitions() override
void moveTo(const PoseBasePtr &targetPose, Ice::Float positionalAccuracy, Ice::Float orientationalAccuracy, const Ice::Current &c=Ice::emptyCurrent) override
void move(const PoseBasePtr &targetVelocity, const Ice::Current &c=Ice::emptyCurrent) override
void onExitRobotPoseUnit() override
std::string simulatorPrxName
void setMaxVelocities(Ice::Float positionalVelocity, Ice::Float orientationalVelocity, const Ice::Current &c=Ice::emptyCurrent) override
void simulationFunction()
void onInitRobotPoseUnit() override
void onStopRobotPoseUnit() override
Eigen::Vector3f getRPY(PoseBasePtr pose)
ControlMode RobotPoseControlMode
RobotPoseUnitListenerPrx listenerPrx
RobotPoseUnitListener proxy for publishing state updates.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
#define ARMARX_VERBOSE
The logging level for verbose information.
Quaternion< float, 0 > Quaternionf
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Pose > PosePtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
const LogSender::manipulator flush