JointController Class Referenceabstract

The JointController class represents one joint in one control mode. More...

#include <RobotAPI/components/units/RobotUnit/JointControllers/JointController.h>

+ Inheritance diagram for JointController:

Public Member Functions

virtual const std::string & getControlMode () const
 
std::size_t getControlModeHash () const
 
virtual const ControlTargetBasegetControlTarget () const
 
template<class T >
const TgetControlTarget () const
 
virtual ControlTargetBasegetControlTarget ()=0
 
virtual std::string getHardwareControlMode () const
 
std::size_t getHardwareControlModeHash () const
 
ControlDevicegetParent () const
 
virtual StringVariantBaseMap publish (const DebugDrawerInterfacePrx &draw, const DebugObserverInterfacePrx &observer) const
 Hook for publishing data from JointController, mainly for debugging purposes. More...
 
std::size_t rtGetControlModeHash () const
 
std::size_t rtGetHardwareControlModeHash () const
 
ControlDevicertGetParent () const
 
template<class T >
TrtGetParent () const
 
virtual bool rtIsTargetValid () const
 
virtual void rtResetTarget ()
 
virtual ~JointController ()=default
 

Protected Member Functions

virtual void rtPostDeactivateController ()
 
virtual void rtPreActivateController ()
 called when this JointController is activated More...
 
virtual void rtRun (const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)=0
 called when this JointController is run More...
 

Friends

class ControlDevice
 called when this JointController is deactivated More...
 

Detailed Description

The JointController class represents one joint in one control mode.

It holds a ControlTargetBase. This target is used as setpoint for the controller.

Definition at line 51 of file JointController.h.

Constructor & Destructor Documentation

◆ ~JointController()

virtual ~JointController ( )
virtualdefault

Member Function Documentation

◆ getControlMode()

const std::string & getControlMode ( ) const
inlinevirtual

Reimplemented in PlatformSimulationDevice::JointStopMovementController, and PlatformSimulationDevice::JointEmergencyStopController.

Definition at line 163 of file JointController.h.

+ Here is the call graph for this function:

◆ getControlModeHash()

std::size_t getControlModeHash ( ) const
inline

Definition at line 175 of file JointController.h.

◆ getControlTarget() [1/3]

virtual const ControlTargetBase* getControlTarget ( ) const
virtual

◆ getControlTarget() [2/3]

const T* getControlTarget ( ) const
inline
Returns
The JointController's ControlTarget casted to the given type (may be nullptr)

Definition at line 63 of file JointController.h.

+ Here is the call graph for this function:

◆ getControlTarget() [3/3]

◆ getHardwareControlMode()

◆ getHardwareControlModeHash()

std::size_t getHardwareControlModeHash ( ) const
inline

Definition at line 187 of file JointController.h.

◆ getParent()

ControlDevice & getParent ( ) const

Definition at line 30 of file JointController.cpp.

◆ publish()

StringVariantBaseMap publish ( const DebugDrawerInterfacePrx draw,
const DebugObserverInterfacePrx observer 
) const
virtual

Hook for publishing data from JointController, mainly for debugging purposes.

The preferred way is to use the return value of the function to publish the data. This function is called in the publish thread, not the RT thread. Thus, appropriate lock-free synchronization (e.g. atomic variables or TrippleBuffer) must be used to move the data from RT thread to the publish thread.

Parameters
drawInterface proxy to the DebugDrawer topic.
observerInterface proxy to DebugObserver topic.
Returns
These values are published on the RobotUnitObserver in the channel "ControlDevices". The keys of the map are prepended with "{ControlDeviceName}_{ControlModeName}_" and are used as keys of the datafields.

Definition at line 37 of file JointController.cpp.

◆ rtGetControlModeHash()

std::size_t rtGetControlModeHash ( ) const
inline

Definition at line 181 of file JointController.h.

◆ rtGetHardwareControlModeHash()

std::size_t rtGetHardwareControlModeHash ( ) const
inline

Definition at line 193 of file JointController.h.

+ Here is the caller graph for this function:

◆ rtGetParent() [1/2]

ControlDevice & rtGetParent ( ) const
inline

Definition at line 199 of file JointController.h.

+ Here is the caller graph for this function:

◆ rtGetParent() [2/2]

T& rtGetParent ( ) const
inline

Definition at line 101 of file JointController.h.

+ Here is the call graph for this function:

◆ rtIsTargetValid()

bool rtIsTargetValid ( ) const
inlinevirtual

Reimplemented in PlatformSimulationDevice::JointStopMovementController, and PlatformSimulationDevice::JointEmergencyStopController.

Definition at line 157 of file JointController.h.

+ Here is the call graph for this function:

◆ rtPostDeactivateController()

void rtPostDeactivateController ( )
inlineprotectedvirtual

Definition at line 210 of file JointController.h.

◆ rtPreActivateController()

void rtPreActivateController ( )
inlineprotectedvirtual

called when this JointController is activated

Definition at line 205 of file JointController.h.

◆ rtResetTarget()

void rtResetTarget ( )
inlinevirtual

Definition at line 151 of file JointController.h.

+ Here is the call graph for this function:

◆ rtRun()

virtual void rtRun ( const IceUtil::Time &  sensorValuesTimestamp,
const IceUtil::Time &  timeSinceLastIteration 
)
protectedpure virtual

Friends And Related Function Documentation

◆ ControlDevice

friend class ControlDevice
friend

called when this JointController is deactivated

Definition at line 116 of file JointController.h.


The documentation for this class was generated from the following files: