26#include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
39 "KinematicUnitName",
"KinematicUnit",
"The name of the created kinematic unit");
41 "KinematicUnitNameTopicPrefix",
"",
"Prefix for the kinematic sensor values topic");
44 "DiagnosticsUnitName",
"DiagnosticsUnit",
"Name of the diagnostics unit.");
47 "PlatformUnitName",
"PlatformUnit",
"The name of the created platform unit");
50 "PlatformUnitVelocityControllerType",
52 "Which controller to use for velocity control of the platform");
53 for (
const auto& [type, name] :
56 types.map(name, type);
60 "PlatformUnitMaximumPositionAcceleration",
62 "The maximum allowed acceleration for the position of the platform");
64 "PlatformUnitMaximumOrientationAcceleration",
66 "The maximum allowed acceleration for the orientation of the platform");
69 "ForceTorqueUnitName",
71 "The name of the created force troque unit (empty = default)");
73 "ForceTorqueTopicName",
75 "Name of the topic on which the force torque sensor values are provided");
78 "InertialMeasurementUnitName",
79 "InertialMeasurementUnit",
80 "The name of the created inertial measurement unit (empty = default)");
82 "IMUTopicName",
"IMUValues",
"Name of the IMU Topic.");
86 "If true the TCPControl SubUnit is created and added");
88 "TCPControlUnitName",
"TCPControlUnit",
"Name of the TCPControlUnit.");
91 "CreateTrajectoryPlayer",
93 "If true the TrajectoryPlayer SubUnit is created and added");
95 "TrajectoryControllerUnitName",
97 "Name of the TrajectoryControllerUnit. The respective component outside of the "
98 "RobotUnit is TrajectoryPlayer");
101 "EmergencyStopMasterName",
102 "EmergencyStopMaster",
103 "The name used to register as an EmergencyStopMaster");
105 "EmergencyStopTopic",
107 "The name of the topic over which changes of the emergencyStopState are sent.");
140 void _preOnInitRobotUnit();
142 void _icePropertiesInitialized();
144 void _preFinishRunning();
146 void _postOnExitRobotUnit();
155 Ice::ObjectProxySeq
getUnits(
const Ice::Current&)
const override;
161 Ice::ObjectPrx
getUnit(
const std::string& staticIceId,
const Ice::Current&)
const override;
167 KinematicUnitInterfacePrx
getKinematicUnit(
const Ice::Current&)
const override;
177 InertialMeasurementUnitInterfacePrx
183 PlatformUnitInterfacePrx
getPlatformUnit(
const Ice::Current&)
const override;
188 TCPControlUnitInterfacePrx
getTCPControlUnit(
const Ice::Current&)
const override;
211 typename T::PointerType
getUnit()
const;
290 const std::string& positionControlMode = ControlModes::Position1DoF,
291 const std::string& velocityControlMode = ControlModes::Velocity1DoF,
292 const std::string& torqueControlMode = ControlModes::Torque1DoF,
293 const std::string& pwmControlMode = ControlModes::PWM1DoF);
305 std::vector<ManagedIceObjectPtr> units;
308 std::vector<RobotUnitSubUnitPtr> subUnits;
311 EmergencyStopMasterInterfacePtr emergencyStopMaster;
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)
ModuleBasePropertyDefinitions(std::string prefix)
UnitsPropertyDefinitions(std::string prefix)
This Module manages all Units of a RobotUnit.
virtual void initializeForceTorqueUnit()
Initializes the ForceTorqueUnit.
TCPControlUnitInterfacePtr getTCPControlUnit() const
Returns a pointer to the TCPControlUnit.
T::PointerType getUnit() const
Returns a pointer to the Unit for the given type (or null if there is none)
InertialMeasurementUnitInterfacePtr getInertialMeasurementUnit() const
Returns a pointer to the InertialMeasurementUnit.
virtual void initializeTrajectoryControllerUnit()
Initializes the TrajectoryControllerUnit.
void addUnit(ManagedIceObjectPtr unit)
Registers a unit for management (the Unit is added and removed to the ArmarXManager and updated with ...
virtual void initializeDiagnosticsUnit()
Initialize the diagnostics unit.
virtual void initializeTcpControllerUnit()
Initializes the TcpControllerUnit.
virtual void initializeInertialMeasurementUnit()
Initializes the InertialMeasurementUnit.
friend class UnitsAttorneyForPublisher
This class allows minimal access to private members of Units in a sane fashion for Publisher.
ForceTorqueUnitInterfacePtr getForceTorqueUnit() const
Returns a pointer to the ForceTorqueUnit.
virtual void initializePlatformUnit()
Initializes the PlatformUnit.
virtual void initializeLocalizationUnit()
Initializes the TcpControllerUnit.
virtual void initializeDefaultUnits()
Calls all init hooks for all managed Units.
T::ProxyType getUnitPrx() const
Returns a proxy to the Unit for the given type (or null if there is none)
TrajectoryPlayerInterfacePtr getTrajectoryPlayer() const
Returns a pointer to the TrajectoryPlayer.
static Units & Instance()
Returns the singleton instance of this class.
ManagedIceObjectPtr createKinematicSubUnit(const Ice::PropertiesPtr &properties, const std::string &positionControlMode=ControlModes::Position1DoF, const std::string &velocityControlMode=ControlModes::Velocity1DoF, const std::string &torqueControlMode=ControlModes::Torque1DoF, const std::string &pwmControlMode=ControlModes::PWM1DoF)
Create the KinematicUnit (this function should be called in initializeKinematicUnit)
KinematicUnitInterfacePtr getKinematicUnit() const
Returns a pointer to the KinematicUnit.
Ice::ObjectProxySeq getUnits(const Ice::Current &) const override
Returns proxies to all units.
PlatformUnitInterfacePtr getPlatformUnit() const
Returns a pointer to the PlatformUnit.
virtual void initializeKinematicUnit()
Initializes the KinematicUnit.
const EmergencyStopMasterInterfacePtr & getEmergencyStopMaster() const
Returns a pointer to the EmergencyStopMaster.
::IceInternal::Handle<::Ice::Properties > PropertiesPtr
std::shared_ptr< class Robot > RobotPtr
const simox::meta::EnumNames< NJointHolonomicPlatformVelocityControllerTypes > NJointHolonomicPlatformVelocityControllerTypesNames
IceInternal::Handle< ManagedIceObject > ManagedIceObjectPtr