27#include <RobotAPI/interface/components/TrajectoryPlayerInterface.h>
44 "Name of the KinematicUnit. Only needed for "
45 "returning to zeroFramePose while resetting.");
48 "Proportional gain value of PID Controller",
52 "Integral gain value of PID Controller",
56 "Differential gain value of PID Controller",
61 "The PID will never set a velocity above this threshold (degree/s)");
64 "If this value is set, the root pose of the motion "
65 "is set for this node instead of the root joint.");
69 "Specify whether RobotPoseUnit should be used to move the "
70 "robot's position. Only useful in simulation.");
74 "Name of the RobotPoseUnit to which the robot position should be sent");
82 virtual public TrajectoryPlayerInterface,
91 const Ice::Current& = Ice::emptyCurrent)
override;
94 const Ice::Current& = Ice::emptyCurrent)
override;
96 const Ice::Current& = Ice::emptyCurrent)
override;
98 void setLoopPlayback(
bool loop,
const Ice::Current& = Ice::emptyCurrent)
override;
99 Ice::Double
getEndTime(
const Ice::Current& = Ice::emptyCurrent)
override;
100 Ice::Double
getTrajEndTime(
const Ice::Current& = Ice::emptyCurrent)
override;
101 Ice::Double
getCurrentTime(
const Ice::Current& = Ice::emptyCurrent)
override;
102 void setEndTime(Ice::Double,
const Ice::Current& = Ice::emptyCurrent)
override;
110 void setIsPreview(
bool,
const Ice::Current& = Ice::emptyCurrent)
override;
112 setJointsInUse(
const std::string&,
bool,
const Ice::Current& = Ice::emptyCurrent)
override;
127 const Ice::Current&)
override
160 const Ice::Current&)
override
170 setOffset(const ::Eigen::Matrix4f&, const ::Ice::Current& = ::Ice::emptyCurrent)
override
183 return "TrajectoryPlayer";
197 NJointTrajectoryControllerPtr
198 createTrajectoryController(std::vector<std::string>& jointNames,
bool deleteIfAlreadyExist);
199 void assureTrajectoryController();
200 bool controllerExists();
204 NJointTrajectoryControllerPtr jointTrajController;
205 std::string controllerName = this->
getName() +
"_" +
"JointTrajectory";
211 bool robotPoseUnitEnabled;
212 std::string robotPoseUnitName;
216 std::vector<std::string> usedJoints;
218 std::string kinematicUnitName;
219 KinematicUnitInterfacePrx kinematicUnit;
220 std::string customRootNode;
226 bool considerConstraintsForTrajectoryOptimization =
false;
228 bool isPreview =
false;
232 std::mutex dataMutex;
233 std::recursive_mutex controllerMutex;
234 bool recreateController =
true;
#define TYPEDEF_PTRS_HANDLE(T)
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
std::string getName() const
Retrieve name of object.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
The RobotUnit class manages a robot and its controllers.
TrajectoryControllerSubUnitPropertyDefinitions(std::string prefix)
Ice::Double getTrajEndTime(const Ice::Current &=Ice::emptyCurrent) override
void considerConstraints(bool, const Ice::Current &=Ice::emptyCurrent) override
void reportJointAccelerations(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void onInitComponent() override
Pure virtual hook for the subclass.
void setOffset(const ::Eigen::Matrix4f &, const ::Ice::Current &=::Ice::emptyCurrent) override
void setIsVelocityControl(bool, const Ice::Current &=Ice::emptyCurrent) override
bool startTrajectoryPlayer(const Ice::Current &=Ice::emptyCurrent) override
void reportJointStatuses(const NameStatusMap &, Ice::Long, bool, const Ice::Current &) override
Ice::Double getCurrentTime(const Ice::Current &=Ice::emptyCurrent) override
virtual void componentPropertiesUpdated(const std::set< std::string > &changedProperties) override
Implement this function if you would like to react to changes in the properties.
void loadBasePoseTraj(const TrajectoryBasePtr &basePoseTraj, const Ice::Current &=Ice::emptyCurrent) override
void onDisconnectComponent() override
Hook for subclass.
void update(const SensorAndControl &sc, const JointAndNJointControllers &c) override
void reportJointCurrents(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
bool stopTrajectoryPlayer(const Ice::Current &=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
bool pauseTrajectoryPlayer(const Ice::Current &=Ice::emptyCurrent) override
void reportControlModeChanged(const NameControlModeMap &, Ice::Long, bool, const Ice::Current &) override
void setup(RobotUnit *rUnit)
void reportJointMotorTemperatures(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
Ice::Double getEndTime(const Ice::Current &=Ice::emptyCurrent) override
void onConnectComponent() override
Pure virtual hook for the subclass.
bool resetTrajectoryPlayer(bool moveToFrameZeroPose, const Ice::Current &=Ice::emptyCurrent) override
void setIsPreview(bool, const Ice::Current &=Ice::emptyCurrent) override
void reportJointAngles(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void enableRobotPoseUnit(bool, const Ice::Current &=Ice::emptyCurrent) override
void reportJointVelocities(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void setEndTime(Ice::Double, const Ice::Current &=Ice::emptyCurrent) override
bool setJointsInUse(const std::string &, bool, const Ice::Current &=Ice::emptyCurrent) override
void setLoopPlayback(bool loop, const Ice::Current &=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
void reportJointTorques(const NameValueMap &, Ice::Long, bool, const Ice::Current &) override
void loadJointTraj(const TrajectoryBasePtr &jointTraj, const Ice::Current &=Ice::emptyCurrent) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Trajectory > TrajectoryPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
detail::ControlThreadOutputBufferEntry SensorAndControl
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.