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 ControlTargetBase * getControlTarget () const
 
template<class T>
const T * getControlTarget () const
 
virtual ControlTargetBase * getControlTarget ()=0
 
virtual std::string getHardwareControlMode () const
 
std::size_t getHardwareControlModeHash () const
 
ControlDevice & getParent () const
 
virtual StringVariantBaseMap publish (const DebugDrawerInterfacePrx &draw, const DebugObserverInterfacePrx &observer) const
 Hook for publishing data from JointController, mainly for debugging purposes.
 
std::size_t rtGetControlModeHash () const
 
std::size_t rtGetHardwareControlModeHash () const
 
ControlDevice & rtGetParent () const
 
template<class T>
T & rtGetParent () 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
 
virtual void rtRun (const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)=0
 called when this JointController is run
 

Friends

class ControlDevice
 called when this JointController is deactivated
 

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.

Constructor & Destructor Documentation

◆ ~JointController()

virtual ~JointController ( )
virtualdefault

Member Function Documentation

◆ getControlMode()

const std::string & getControlMode ( ) const
inlinevirtual

◆ getControlModeHash()

std::size_t getControlModeHash ( ) const
inline

◆ getControlTarget() [1/3]

const ControlTargetBase * getControlTarget ( ) const
inlinevirtual

◆ getControlTarget() [2/3]

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

◆ getControlTarget() [3/3]

◆ getHardwareControlMode()

◆ getHardwareControlModeHash()

std::size_t getHardwareControlModeHash ( ) const
inline

◆ getParent()

ControlDevice & getParent ( ) const

◆ 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.

◆ rtGetControlModeHash()

std::size_t rtGetControlModeHash ( ) const
inline

◆ rtGetHardwareControlModeHash()

std::size_t rtGetHardwareControlModeHash ( ) const
inline

◆ rtGetParent() [1/2]

ControlDevice & rtGetParent ( ) const
inline

◆ rtGetParent() [2/2]

template<class T>
T & rtGetParent ( ) const
inline

◆ rtIsTargetValid()

◆ rtPostDeactivateController()

void rtPostDeactivateController ( )
inlineprotectedvirtual

◆ rtPreActivateController()

void rtPreActivateController ( )
inlineprotectedvirtual

called when this JointController is activated

◆ rtResetTarget()

void rtResetTarget ( )
inlinevirtual

◆ rtRun()

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

Friends And Related Symbol Documentation

◆ ControlDevice

friend class ControlDevice
friend

called when this JointController is deactivated


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