Go to the documentation of this file.
30 #include <ArmarXCore/interface/observers/ObserverInterface.h>
33 #include <RobotAPI/interface/components/TrajectoryPlayerInterface.h>
34 #include <RobotAPI/interface/units/RobotPoseUnitInterface.h>
53 defineRequiredProperty<std::string>(
55 "Name of the KinematicUnit to which the joint values should be sent");
56 defineRequiredProperty<std::string>(
"KinematicTopicName",
57 "Name of the KinematicUnit reporting topic");
59 defineOptionalProperty<std::string>(
62 "Comma-separated list with names of ArmarXProjects (e.g. 'Armar3,Armar4'). The MMM "
63 "XML File can be specified relatively to a data path of one of these projects.");
64 defineOptionalProperty<float>(
67 "FPS with which the recording should be executed. Velocities will be adapted.");
68 defineOptionalProperty<bool>(
69 "LoopPlayback",
false,
"Specify whether motion should be repeated after execution");
70 defineOptionalProperty<bool>(
73 "Specify whether the PID Controller should be used (==velocity control)");
74 defineOptionalProperty<float>(
"Kp", 1.f,
"Proportional gain value of PID Controller");
75 defineOptionalProperty<float>(
"Ki", 0.00001f,
"Integral gain value of PID Controller");
76 defineOptionalProperty<float>(
"Kd", 0.0f,
"Differential gain value of PID Controller");
77 defineOptionalProperty<float>(
80 "The PID will never set a velocity above this threshold (degree/s)");
81 defineOptionalProperty<std::string>(
84 "The name of the robot node set to be used (only need for PIDController mode)");
85 defineOptionalProperty<std::string>(
"CustomRootNode",
87 "If this value is set, the root pose of the motion "
88 "is set for this node instead of the root joint.");
90 defineOptionalProperty<bool>(
"EnableRobotPoseUnit",
92 "Specify whether RobotPoseUnit should be used to move the "
93 "robot's position. Only useful in simulation.");
94 defineOptionalProperty<std::string>(
97 "Name of the RobotPoseUnit to which the robot position should be sent");
98 defineOptionalProperty<float>(
99 "Offset.x", 0.f,
"x component of initial robot position (mm)");
100 defineOptionalProperty<float>(
101 "Offset.y", 0.f,
"y component of initial robot position (mm)");
102 defineOptionalProperty<float>(
103 "Offset.z", 0.f,
"z component of initial robot position (mm)");
104 defineOptionalProperty<float>(
105 "Offset.roll", 0.f,
"Initial robot pose: roll component of RPY angles (radian)");
106 defineOptionalProperty<float>(
107 "Offset.pitch", 0.f,
"Initial robot pose: pitch component of RPY angles (radian)");
108 defineOptionalProperty<float>(
109 "Offset.yaw", 0.f,
"Initial robot pose: yaw component of RPY angles (radian)");
126 public armarx::TrajectoryPlayerInterface
136 return "TrajectoryPlayer";
146 const ::Ice::Current& = Ice::emptyCurrent)
override;
163 const ::Ice::Current& = Ice::emptyCurrent)
override;
165 const ::Ice::Current& = Ice::emptyCurrent)
override;
216 bool setJointsInUse(
const std::string& jointName,
bool inUse,
const Ice::Current&)
override;
223 const Ice::Current&)
override
230 const Ice::Current&)
override;
256 const Ice::Current&)
override
328 std::map<std::string, PIDControllerPtr>
PIDs;
359 std::recursive_mutex motionMutex;
361 std::mutex jointAnglesMutex;
365 VirtualRobot::RobotNodePtr customRootNode;
VirtualRobot::RobotPtr localModel
std::string armarxProject
DebugObserverInterfacePrx debugObserver
NameValueMap targetVelocityValues
void setOffset(const Eigen::Matrix4f &offset, const Ice::Current &) override
void reportControlModeChanged(const NameControlModeMap &, Ice::Long, bool, const Ice::Current &) override
void onDisconnectComponent() override
void loadJointTraj(const TrajectoryBasePtr &trajs, const ::Ice::Current &=Ice::emptyCurrent) override
NameValueMap targetPositionValues
MatrixXX< 4, 4, float > Matrix4f
void enableRobotPoseUnit(bool isRobotPose, const Ice::Current &) override
Brief description of class TrajectoryPlayer.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
KinematicUnitInterfacePrx kinematicUnit
TrajectoryPlayerPropertyDefinitions(std::string prefix)
Ice::StringSeq jointNames
bool stopTrajectoryPlayer(const Ice::Current &) override
std::map< std::string, bool > limitlessMap
void onConnectComponent() override
NameValueMap nullVelocities
::armarx::TrajectoryPtr jointTraj
void setIsVelocityControl(bool isVelocity, const ::Ice::Current &=Ice::emptyCurrent) override
std::string modelFileName
void onInitComponent() override
double getCurrentTime(const Ice::Current &) override
void setIsPreview(bool isPreview, const Ice::Current &) override
void considerConstraints(bool, const Ice::Current &) override
bool resetTrajectoryPlayer(bool moveToFrameZeroPose, const Ice::Current &) override
void setLoopPlayback(bool loop, const Ice::Current &) override
void updateTargetValues()
bool pauseTrajectoryPlayer(const Ice::Current &) override
bool checkSelfCollision()
void reportJointVelocities(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
armarx::core::time::DateTime Time
std::map< std::string, bool > jointNamesUsed
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void reportJointAngles(const NameValueMap &angles, Ice::Long, bool, const Ice::Current &) override
bool robotPoseUnitEnabled
IceUtil::Time motionStartTime
Default component property definition container.
void reportJointTorques(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void reportJointStatuses(const NameStatusMap &, Ice::Long, bool, const Ice::Current &) override
DebugDrawerInterfacePrx debugDrawer
std::string getDefaultName() const override
PeriodicTask< TrajectoryPlayer >::pointer_type task
bool startTrajectoryPlayer(const Ice::Current &) override
void setEndTime(double end, const Ice::Current &) override
void reportJointMotorTemperatures(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void reportJointCurrents(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void reportJointAccelerations(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
bool setJointsInUse(const std::string &jointName, bool inUse, const Ice::Current &) override
double getEndTime(const Ice::Current &) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr
std::map< std::string, PIDControllerPtr > PIDs
void loadBasePoseTraj(const TrajectoryBasePtr &trajs, const ::Ice::Current &=Ice::emptyCurrent) override
::armarx::TrajectoryPtr basePoseTraj
double getTrajEndTime(const Ice::Current &) override
void onExitComponent() override