42 const static std::string PeriodicPosition =
"ControlDeviceTag_PeriodicPosition";
43 const static std::string CreateNoDefaultController =
44 "ControlDeviceTag_CreateNoDefaultController";
45 const static std::string ForcePositionThroughVelocity =
46 "ControlDeviceTag_ForcePositionThroughVelocity";
106 void rtRun(
const IceUtil::Time& sensorValuesTimestamp,
107 const IceUtil::Time& timeSinceLastIteration);
116 const IceUtil::Time& timeSinceLastIteration)
141 std::atomic<RobotUnitModule::Devices*> owner{
nullptr};
147 JointController* jointEmergencyStopController{
nullptr};
149 JointController* jointStopMovementController{
nullptr};
159 return jointEmergencyStopController;
165 return jointStopMovementController;
171 return activeJointController;
174 inline const std::vector<JointController*>&
177 return jointControllers.values();
180 inline std::vector<const JointController*>
183 return {jointControllers.values().begin(), jointControllers.values().end()};
189 return jointControllers.at(mode,
nullptr);
195 return jointControllers.at(mode,
nullptr);
201 return jointControllers.at(i);
207 return jointControllers.at(i);
213 return jointControllers.has(mode);
216 inline const std::vector<std::string>&
219 return jointControllers.keys();
#define TYPEDEF_PTRS_SHARED(T)
#define TYPEDEF_PTRS_HANDLE(T)
The ControlDevice class represents a logical unit accepting commands via its JointControllers.
JointController * rtGetJointStopMovementController()
ControlTargetBase::ControlDeviceAccessToken getControlTargetAccessToken() const
virtual void rtSetActiveJointController(JointController *jointCtrl)
Activates the given JointController for this device.
std::vector< const JointController * > getJointControllers() const
JointController * rtGetJointEmergencyStopController()
JointController * getJointController(const std::string &mode)
JointController * getJointEmergencyStopController()
RobotUnitModule::Devices * getOwner() const
JointController * getJointStopMovementController()
std::map< std::string, std::string > getJointControllerToTargetTypeNameMap() const
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)
runs the active Joint Controller and write the target values into the control device
const std::vector< std::string > & getControlModes() const
void addJointController(JointController *jointCtrl)
adds the Joint controller to this ControlDevice
bool hasJointController(const std::string &mode) const
static const ControlDevicePtr NullPtr
A static const nullptr in case a const ref to a nullptr needs to be returned.
ControlDevice(const std::string &name)
Create a ControlDevice with the given name.
JointController * rtGetActiveJointController()
virtual void rtWriteTargetValues(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)
This is a hook for implementations to write the setpoints to a bus.
const std::vector< JointController * > & rtGetJointControllers()
DeviceBase(const std::string &name)
Create a Device with the given name.
The JointController class represents one joint in one control mode.
This class is pretty much similar to a map.
This Module manages sensor and control devices for a RobotUnit and only allows save and sane access.
This file offers overloads of toIce() and fromIce() functions for STL container types.