Go to the documentation of this file.
27 #include <RobotAPI/interface/components/TrajectoryPlayerInterface.h>
28 #include <RobotAPI/interface/units/RobotPoseUnitInterface.h>
36 #include <ArmarXCore/interface/observers/ObserverInterface.h>
58 defineRequiredProperty<std::string>(
"KinematicUnitName",
"Name of the KinematicUnit to which the joint values should be sent");
59 defineRequiredProperty<std::string>(
"KinematicTopicName",
"Name of the KinematicUnit reporting topic");
61 defineOptionalProperty<std::string>(
"ArmarXProjects",
"Armar4",
"Comma-separated list with names of ArmarXProjects (e.g. 'Armar3,Armar4'). The MMM XML File can be specified relatively to a data path of one of these projects.");
62 defineOptionalProperty<float>(
"FPS", 100.0f,
"FPS with which the recording should be executed. Velocities will be adapted.");
63 defineOptionalProperty<bool>(
"LoopPlayback",
false,
"Specify whether motion should be repeated after execution");
64 defineOptionalProperty<bool>(
"isVelocityControl",
true,
"Specify whether the PID Controller should be used (==velocity control)");
65 defineOptionalProperty<float>(
"Kp", 1.f,
"Proportional gain value of PID Controller");
66 defineOptionalProperty<float>(
"Ki", 0.00001f,
"Integral gain value of PID Controller");
67 defineOptionalProperty<float>(
"Kd", 0.0f,
"Differential gain value of PID Controller");
68 defineOptionalProperty<float>(
"absMaximumVelocity", 120.0f,
"The PID will never set a velocity above this threshold (degree/s)");
69 defineOptionalProperty<std::string>(
"RobotNodeSetName",
"RobotState",
"The name of the robot node set to be used (only need for PIDController mode)");
70 defineOptionalProperty<std::string>(
"CustomRootNode",
"",
"If this value is set, the root pose of the motion is set for this node instead of the root joint.");
72 defineOptionalProperty<bool>(
"EnableRobotPoseUnit",
false,
"Specify whether RobotPoseUnit should be used to move the robot's position. Only useful in simulation.");
73 defineOptionalProperty<std::string>(
"RobotPoseUnitName",
"RobotPoseUnit",
"Name of the RobotPoseUnit to which the robot position should be sent");
74 defineOptionalProperty<float>(
"Offset.x", 0.f,
"x component of initial robot position (mm)");
75 defineOptionalProperty<float>(
"Offset.y", 0.f,
"y component of initial robot position (mm)");
76 defineOptionalProperty<float>(
"Offset.z", 0.f,
"z component of initial robot position (mm)");
77 defineOptionalProperty<float>(
"Offset.roll", 0.f,
"Initial robot pose: roll component of RPY angles (radian)");
78 defineOptionalProperty<float>(
"Offset.pitch", 0.f,
"Initial robot pose: pitch component of RPY angles (radian)");
79 defineOptionalProperty<float>(
"Offset.yaw", 0.f,
"Initial robot pose: yaw component of RPY angles (radian)");
98 public armarx::TrajectoryPlayerInterface
107 return "TrajectoryPlayer";
132 void loadJointTraj(
const TrajectoryBasePtr& trajs, const ::Ice::Current& = Ice::emptyCurrent)
override;
133 void loadBasePoseTraj(
const TrajectoryBasePtr& trajs, const ::Ice::Current& = Ice::emptyCurrent)
override;
179 bool setJointsInUse(
const std::string& jointName,
bool inUse,
const Ice::Current&)
override;
251 std::map<std::string, PIDControllerPtr>
PIDs;
282 std::recursive_mutex motionMutex;
284 std::mutex jointAnglesMutex;
288 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
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
MatrixXX< 4, 4, float > Matrix4f
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