Go to the documentation of this file.
25 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
27 #include "../Units/RobotUnitSubUnit.h"
37 defineOptionalProperty<std::string>(
38 "KinematicUnitName",
"KinematicUnit",
"The name of the created kinematic unit");
39 defineOptionalProperty<std::string>(
40 "KinematicUnitNameTopicPrefix",
"",
"Prefix for the kinematic sensor values topic");
43 defineOptionalProperty<std::string>(
44 "PlatformUnitName",
"PlatformUnit",
"The name of the created platform unit");
46 defineOptionalProperty<std::string>(
47 "ForceTorqueUnitName",
49 "The name of the created force troque unit (empty = default)");
50 defineOptionalProperty<std::string>(
51 "ForceTorqueTopicName",
53 "Name of the topic on which the force torque sensor values are provided");
55 defineOptionalProperty<std::string>(
56 "InertialMeasurementUnitName",
57 "InertialMeasurementUnit",
58 "The name of the created inertial measurement unit (empty = default)");
59 defineOptionalProperty<std::string>(
60 "IMUTopicName",
"IMUValues",
"Name of the IMU Topic.");
62 defineOptionalProperty<bool>(
"CreateTCPControlUnit",
64 "If true the TCPControl SubUnit is created and added");
65 defineOptionalProperty<std::string>(
66 "TCPControlUnitName",
"TCPControlUnit",
"Name of the TCPControlUnit.");
68 defineOptionalProperty<bool>(
69 "CreateTrajectoryPlayer",
71 "If true the TrajectoryPlayer SubUnit is created and added");
72 defineOptionalProperty<std::string>(
73 "TrajectoryControllerUnitName",
75 "Name of the TrajectoryControllerUnit. The respective component outside of the "
76 "RobotUnit is TrajectoryPlayer");
78 defineOptionalProperty<std::string>(
79 "EmergencyStopMasterName",
80 "EmergencyStopMaster",
81 "The name used to register as an EmergencyStopMaster");
82 defineOptionalProperty<std::string>(
85 "The name of the topic over which changes of the emergencyStopState are sent.");
118 void _preOnInitRobotUnit();
120 void _icePropertiesInitialized();
122 void _preFinishRunning();
124 void _postOnExitRobotUnit();
133 Ice::ObjectProxySeq
getUnits(
const Ice::Current&)
const override;
139 Ice::ObjectPrx
getUnit(
const std::string& staticIceId,
const Ice::Current&)
const override;
145 KinematicUnitInterfacePrx
getKinematicUnit(
const Ice::Current&)
const override;
155 InertialMeasurementUnitInterfacePrx
161 PlatformUnitInterfacePrx
getPlatformUnit(
const Ice::Current&)
const override;
166 TCPControlUnitInterfacePrx
getTCPControlUnit(
const Ice::Current&)
const override;
189 typename T::PointerType
getUnit()
const;
266 const std::string& positionControlMode = ControlModes::Position1DoF,
267 const std::string& velocityControlMode = ControlModes::Velocity1DoF,
268 const std::string& torqueControlMode = ControlModes::Torque1DoF,
269 const std::string& pwmControlMode = ControlModes::PWM1DoF);
281 std::vector<ManagedIceObjectPtr> units;
284 std::vector<RobotUnitSubUnitPtr> subUnits;
287 EmergencyStopMasterInterfacePtr emergencyStopMaster;
virtual void initializePlatformUnit()
Initializes the PlatformUnit.
virtual void initializeDefaultUnits()
Calls all init hooks for all managed Units.
virtual void initializeForceTorqueUnit()
Initializes the ForceTorqueUnit.
void addUnit(ManagedIceObjectPtr unit)
Registers a unit for management (the Unit is added and removed to the ArmarXManager and updated with ...
This Module manages all Units of a RobotUnit.
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)
Ice::ObjectProxySeq getUnits(const Ice::Current &) const override
Returns proxies to all units.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
UnitsPropertyDefinitions(std::string prefix)
virtual void initializeInertialMeasurementUnit()
Initializes the InertialMeasurementUnit.
KinematicUnitInterfacePtr getKinematicUnit() const
Returns a pointer to the KinematicUnit.
InertialMeasurementUnitInterfacePtr getInertialMeasurementUnit() const
Returns a pointer to the InertialMeasurementUnit.
virtual void initializeTcpControllerUnit()
Initializes the TcpControllerUnit.
T::PointerType getUnit() const
Returns a pointer to the Unit for the given type (or null if there is none)
ForceTorqueUnitInterfacePtr getForceTorqueUnit() const
Returns a pointer to the ForceTorqueUnit.
virtual void initializeKinematicUnit()
Initializes the KinematicUnit.
static Units & Instance()
Returns the singleton instance of this class.
TrajectoryPlayerInterfacePtr getTrajectoryPlayer() const
Returns a pointer to the TrajectoryPlayer.
This class allows minimal access to private members of Units in a sane fashion for Publisher.
TCPControlUnitInterfacePtr getTCPControlUnit() const
Returns a pointer to the TCPControlUnit.
PlatformUnitInterfacePtr getPlatformUnit() const
Returns a pointer to the PlatformUnit.
const EmergencyStopMasterInterfacePtr & getEmergencyStopMaster() const
Returns a pointer to the EmergencyStopMaster.
T::ProxyType getUnitPrx() const
Returns a proxy to the Unit for the given type (or null if there is none)
virtual void initializeTrajectoryControllerUnit()
Initializes the TrajectoryControllerUnit.
virtual void initializeLocalizationUnit()
Initializes the TcpControllerUnit.
Base class for all RobotUnitModules.
std::shared_ptr< class Robot > RobotPtr