|
A high level controller writing its results into ControlTargets. More...
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointControllerBase.h>
Public Types | |
using | ConfigPtrT = NJointControllerConfigPtr |
using | GenerateConfigDescriptionFunctionSignature = WidgetDescription::WidgetPtr(*)(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &controlDevices, const std::map< std::string, ConstSensorDevicePtr > &sensorDevices) |
template<class ConfigPrtType > | |
using | GenerateConfigFromVariantsFunctionSignature = ConfigPrtType(*)(const StringVariantBaseMap &) |
Public Types inherited from ManagedIceObject | |
using | PeriodicTaskPtr = IceUtil::Handle< SimplePeriodicTask< std::function< void(void)> >> |
Public Member Functions | |
void | activateController (const Ice::Current &=Ice::emptyCurrent) final override |
void | callDescribedFunction (const std::string &, const StringVariantBaseMap &, const Ice::Current &=Ice::emptyCurrent) override |
void | deactivateAndDeleteController (const Ice::Current &=Ice::emptyCurrent) final override |
void | deactivateController (const Ice::Current &=Ice::emptyCurrent) final override |
void | deleteController (const Ice::Current &=Ice::emptyCurrent) final override |
std::string | getClassName (const Ice::Current &=Ice::emptyCurrent) const override=0 |
const std::map< std::string, const JointController * > & | getControlDevicesUsedJointController () |
const std::vector< char > & | getControlDeviceUsedBitmap () const |
StringStringDictionary | getControlDeviceUsedControlModeMap (const Ice::Current &=Ice::emptyCurrent) const final override |
const std::vector< std::size_t > & | getControlDeviceUsedIndices () const |
NJointControllerDescription | getControllerDescription (const Ice::Current &=Ice::emptyCurrent) const final override |
NJointControllerDescriptionWithStatus | getControllerDescriptionWithStatus (const Ice::Current &=Ice::emptyCurrent) const final override |
NJointControllerStatus | getControllerStatus (const Ice::Current &=Ice::emptyCurrent) const final override |
WidgetDescription::StringWidgetDictionary | getFunctionDescriptions (const Ice::Current &=Ice::emptyCurrent) const override |
std::string | getInstanceName (const Ice::Current &=Ice::emptyCurrent) const final override |
bool | hasControllerError (const Ice::Current &=Ice::emptyCurrent) const final override |
bool | isControllerActive (const Ice::Current &=Ice::emptyCurrent) const final override |
bool | isControllerRequested (const Ice::Current &=Ice::emptyCurrent) const final override |
bool | isDeletable (const Ice::Current &=Ice::emptyCurrent) const final override |
std::optional< std::vector< char > > | isNotInConflictWith (const NJointControllerBasePtr &other) const |
std::optional< std::vector< char > > | isNotInConflictWith (const std::vector< char > &used) const |
NJointControllerBase () | |
ConstControlDevicePtr | peekControlDevice (const std::string &deviceName) const |
Get a const ptr to the given ControlDevice. More... | |
ConstSensorDevicePtr | peekSensorDevice (const std::string &deviceName) const |
Get a const ptr to the given SensorDevice. More... | |
const std::string & | rtGetClassName () const |
Returns the class name. More... | |
const std::vector< std::size_t > & | rtGetControlDeviceUsedIndices () const |
Returns the indices of all ControlDevice's this NJointControllerBase calculates a ControlTarget for. More... | |
bool | rtGetErrorState () const |
Sets the error state to true. More... | |
const std::string & | rtGetInstanceName () const |
Returns the instance name. More... | |
std::size_t | rtGetNumberOfUsedControlDevices () const |
Returns the number of used ControlDevices. More... | |
const VirtualRobot::RobotPtr & | rtGetRobot () |
TODO make protected and use attorneys. More... | |
const std::vector< VirtualRobot::RobotNodePtr > & | rtGetRobotNodes () |
Returns the nodes of the virtual robot used by this NJointControllerBase in the rtRun. More... | |
bool | rtUsesControlDevice (std::size_t deviceIndex) const |
Returns whether this NJointControllerBase calculates a ControlTarget for the given ControlDevice. More... | |
ControlTargetBase * | useControlTarget (const std::string &deviceName, const std::string &controlMode) |
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtRun is called. More... | |
template<class T > | |
T * | useControlTarget (const std::string &deviceName, const std::string &controlMode) |
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtRun is called. More... | |
template<class T > | |
const T * | useSensorValue (const std::string &deviceName) const |
Get a const ptr to the given SensorDevice's SensorValue. More... | |
const SensorValueBase * | useSensorValue (const std::string &sensorDeviceName) const |
Get a const ptr to the given SensorDevice's SensorValue. More... | |
const VirtualRobot::RobotPtr & | useSynchronizedRtRobot (bool updateCollisionModel=false) |
Requests a VirtualRobot for use in rtRun *. More... | |
~NJointControllerBase () override | |
Public Member Functions inherited from ManagedIceObject | |
void | enableProfiler (bool enable) |
setProfiler allows setting ManagedIceObject::profiler to a new instance (if the new instance is actually not a null pointer) More... | |
std::string | generateSubObjectName (const std::string &subObjectName) |
Generates a unique name for a sub object from a general name. More... | |
ArmarXManagerPtr | getArmarXManager () const |
Returns the ArmarX manager used to add and remove components. More... | |
ManagedIceObjectConnectivity | getConnectivity () const |
Retrieve connectivity of the object (topcis as well as proxies) More... | |
IceManagerPtr | getIceManager () const |
Returns the IceManager. More... | |
VariantBasePtr | getMetaInfo (const std::string &id) |
StringVariantBaseMap | getMetaInfoMap () const |
std::string | getName () const |
Retrieve name of object. More... | |
Ice::ObjectAdapterPtr | getObjectAdapter () const |
Returns object's Ice adapter. More... | |
ArmarXObjectSchedulerPtr | getObjectScheduler () const |
PeriodicTaskPtr | getPeriodicTask (const std::string &name) |
Profiler::ProfilerPtr | getProfiler () const |
getProfiler returns an instance of armarx::Profiler More... | |
template<class ProxyTarg , class... Args> | |
void | getProxy (const char *name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&...args) |
template<class ProxyType > | |
ProxyType | getProxy (const std::string &name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true) |
Retrieves a proxy object. More... | |
template<class ProxyTarg , class... Args> | |
void | getProxy (const std::string &name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&...args) |
template<class ProxyTarg , class... Args> | |
void | getProxy (IceInternal::ProxyHandle< ProxyTarg > &proxy, const char *name, Args &&...args) |
template<class ProxyTarg , class... Args> | |
void | getProxy (IceInternal::ProxyHandle< ProxyTarg > &proxy, const std::string &name, Args &&...args) |
Assigns a proxy to proxy . More... | |
Ice::ObjectPrx | getProxy (long timeoutMs=0, bool waitForScheduler=true) const |
Returns the proxy of this object (optionally it waits for the proxy) More... | |
template<class Prx > | |
Prx | getProxy (long timeoutMs=0, bool waitForScheduler=true) const |
template<class ProxyType > | |
void | getProxy (ProxyType &proxy, const char *name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true) |
Overload to allow using string literals as name (solve ambiguous overload). More... | |
template<class Prx > | |
void | getProxy (Prx &prx, long timeoutMs=0, bool waitForScheduler=true) const |
int | getState () const |
Retrieve current state of the ManagedIceObject. More... | |
template<class TopicProxyType > | |
TopicProxyType | getTopic (const std::string &name) |
Returns a proxy of the specified topic. More... | |
template<class TopicProxyType > | |
void | getTopic (TopicProxyType &topicProxy, const std::string &name) |
Assigns a proxy of the specified topic to topicProxy . More... | |
std::vector< std::string > | getUnresolvedDependencies () const |
returns the names of all unresolved dependencies More... | |
ManagedIceObject (ManagedIceObject const &other) | |
void | offeringTopic (const std::string &name) |
Registers a topic for retrival after initialization. More... | |
void | preambleGetTopic (std::string const &name) |
void | setMetaInfo (const std::string &id, const VariantBasePtr &value) |
Allows to set meta information that can be queried live via Ice interface on the ArmarXManager. More... | |
void | startPeriodicTask (const std::string &uniqueName, std::function< void(void)> f, int periodMs, bool assureMeanInterval=false, bool forceSystemTime=true) |
bool | stopPeriodicTask (const std::string &name) |
bool | unsubscribeFromTopic (const std::string &name) |
Unsubscribe from a topic. More... | |
bool | usingProxy (const std::string &name, const std::string &endpoints="") |
Registers a proxy for retrieval after initialization and adds it to the dependency list. More... | |
void | usingTopic (const std::string &name, bool orderedPublishing=false) |
Registers a proxy for subscription after initialization. More... | |
void | waitForObjectScheduler () |
Waits until the ObjectScheduler could resolve all dependencies. More... | |
void | waitForProxy (std::string const &name, bool addToDependencies) |
Public Member Functions inherited from Logging | |
SpamFilterDataPtr | deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const |
disables the logging for the current line for the given amount of seconds. More... | |
MessageTypeT | getEffectiveLoggingLevel () const |
Logging () | |
void | setLocalMinimumLoggingLevel (MessageTypeT level) |
With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More... | |
void | setTag (const LogTag &tag) |
void | setTag (const std::string &tagName) |
virtual | ~Logging () |
Static Public Member Functions | |
template<class ItT > | |
static std::optional< std::vector< char > > | AreNotInConflict (ItT first, ItT last) |
Static Public Member Functions inherited from ManagedIceObject | |
static std::string | generateSubObjectName (const std::string &superObjectName, const std::string &subObjectName) |
Generates a unique name for a sub object from a general name and unique name. More... | |
static std::string | GetObjectStateAsString (int state) |
Static Public Attributes | |
static const NJointControllerBasePtr | NullPtr {nullptr} |
Static Public Attributes inherited from ManagedIceObject | |
static const ManagedIceObjectPtr | NullPtr |
A nullptr to be used when a const ref to a nullptr is required. More... | |
Protected Member Functions | |
std::string | getDefaultName () const override |
ThreadPoolPtr | getThreadPool () const |
void | onConnectComponent () final |
virtual void | onConnectNJointController () |
void | onDisconnectComponent () final |
virtual void | onDisconnectNJointController () |
void | onExitComponent () final |
virtual void | onExitNJointController () |
void | onInitComponent () final |
virtual void | onInitNJointController () |
virtual void | onPublish (const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) |
virtual void | onPublishActivation (const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) |
virtual void | onPublishDeactivation (const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) |
virtual void | rtPostDeactivateController () |
This function is called after the controller is deactivated. More... | |
virtual void | rtPreActivateController () |
This function is called before the controller is activated. More... | |
void | rtSetErrorState () |
Sets the error state to true. More... | |
template<typename Task > | |
void | runTask (const std::string &taskName, Task &&task) |
Executes a given task in a separate thread from the Application ThreadPool. More... | |
Protected Member Functions inherited from ManagedIceObject | |
template<class PluginT , class... ParamsT> | |
PluginT * | addPlugin (const std::string prefix="", ParamsT &&...params) |
template<class PluginT , class... ParamsT> | |
void | addPlugin (PluginT *&targ, const std::string prefix="", ParamsT &&...params) |
template<class PluginT , class... ParamsT> | |
void | addPlugin (std::experimental::observer_ptr< PluginT > &targ, const std::string prefix="", ParamsT &&...params) |
Ice::CommunicatorPtr | getCommunicator () const |
std::unique_ptr< ManagedIceObjectPlugin > & | getPluginPointer (std::type_info const &type, std::string const &prefix) |
ManagedIceObject () | |
Protected default constructor. More... | |
virtual void | postOnConnectComponent () |
virtual void | postOnDisconnectComponent () |
virtual void | postOnExitComponent () |
virtual void | postOnInitComponent () |
virtual void | preOnConnectComponent () |
virtual void | preOnDisconnectComponent () |
virtual void | preOnExitComponent () |
virtual void | preOnInitComponent () |
bool | removeProxyDependency (const std::string &name) |
This function removes the dependency of this object on the in parameter name specified object. More... | |
void | setName (std::string name) |
Override name of well-known object. More... | |
void | terminate () |
Initiates termination of this IceManagedObject. More... | |
~ManagedIceObject () override | |
Protected Member Functions inherited from Logging | |
bool | checkLogLevel (MessageTypeT level) const |
const LogSenderPtr & | getLogSender () const |
Retrieve log sender. More... | |
LogSenderPtr | loghelper (const char *file, int line, const char *function) const |
Protected Attributes | |
std::map< std::string, std::shared_ptr< ThreadPool::Handle > > | threadHandles |
std::mutex | threadHandlesMutex |
Protected Attributes inherited from Logging | |
MessageTypeT | minimumLoggingLevel |
SpamFilterDataPtr | spamFilter |
LogTag | tag |
Friends | |
template<class > | |
class | detail::NJointControllerRegistryEntryHelper |
This is required for the factory. More... | |
class | RobotUnitModule::NJointControllerAttorneyForControllerManagement |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::ControllerManagement. More... | |
class | RobotUnitModule::NJointControllerAttorneyForControlThread |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::ControlThread. More... | |
class | RobotUnitModule::NJointControllerAttorneyForPublisher |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::Publisher. More... | |
A high level controller writing its results into ControlTargets.
This is the abstract base class for all NJointControllers. It implements basic management routines required by the RobotUnit and some basic ice calls. NJointControllers are instantiated and managed by the RobotUnit.
A NJointControllerBase calculates ControlTargets for a set of ControlDevices in a specific ControlMode. This ControlMode is defined for each ControlDevice during construction.
A NJointControllerBase can is requested / not requested and active / inactive. All four combinations are possible.
If the user wants this NJointControllerBase to be executed it is in a requested state (see isControllerRequested). Otherwise the controler is not requested.
Calling activateController sets the state to requested. Calling deactivateController sets the state to not requested. If the NJointControllerBase causes an error or a different NJointControllerBase using one or more of the same ControlDevice's is requested, this NJointControllerBase is deactivated.
Is the NJointControllerBase executed by the ControlThread it is active (see isControllerActive).
To be executed by the ControlThread, the NJointControllerBase has to be requested at some point in the past.
If a controller is active, it has to write a valid ControlTarget for each of its ControlDevicea (if it fails, it will be deactivated).
In the Constructor, a NJointControllerBase has to declare all ControlDevices it uses.
The constructor takes a pointer to a configuration structure of the type NJointControllerBase::ConfigPtrT. If an implementation requires a special configuration structure (e.g.: SomeOtherCfg), it has to override this type by calling adding
to it's clas definition. The type SomeOtherCfg has to derive NJointControllerConfigPtr.
There is a way to generate a small gui widget for controller construction (see this section).
A NJointControllerBase can use peekControlDevice to examine a ControlDevice before using it (e.g.: checking the supported ControlTargets).
If a ControlDevice should be used by this NJointControllerBase, it has to call useControlDevice. This sets the ControlMode for the ControlDevice and returns a pointer to the ControlTarget. This pointer has to be used to send commands in each iteration of rtRun. The ControlMode can't be changed afterwards (A new NJointControllerBase has to be created).
A NJointControllerBase can use peekSensorDevice to examine a SensorDevice before using it.
If a SensorDevice should be used by this NJointControllerBase, it has to call useSensorDevice. This returns a pointer to the SensorValue.
If the controller needs a simox robot in rtRun, it should call useSynchronizedRtRobot. This will provide a simoxRobot via rtGetRobot. This robot is synchronized with the real robots state before calling rtRun
Each NJointControllerBase has two parts:
Here the NJointControllerBase has access to the robot's current state and has to write results into ControlTargets.
It must not:
This part consits of any ice communication. Here the NJointControllerBase can get new controll parameters or targets from other components.
All communication between RT and NonRT has to be lockfree. The NJointControllerBase has to use constructs like atomics or TripleBuffers (See armarx::NJointControllerWithTripleBuffer).
The above image shows the two participating domains: one RT thread and multiple ICE threads. If data has to flow along an arrow, you need some construct for non blocking message passing.
You have to execute expensive calculations in a different worker thread. This thread could calculate target values at its own speed (e.g. 100 Hz).
While rtRun runs at a higher frequency (e.g. 1000 Hz) and:
If you do some additional calculation in rtRun, you maybe need to pass config parameters from NonRT to RT using a nonblocking method.
The above image shows the three participating domains: one RT thread, one worker trhead and multiple ICE threads. If data has to flow along an arrow, you need some construct for non blocking message passing.
By implementing these functions:
The RobotUnitGui will provide a widget to configure and construct a NJointControllerBase of this type.
More examples can be found in the Tutorials Package
Include headers
Open the namespace
Typedef some pointers
The config has to inherit NJointControllerConfig and consists only of the joint name
The controller class has to inherit NJointControllerBase
The NJointControllerBase provides a config widget for the RobotUnitGuiPlugin
The ctor receives a pointer to the RobotUnit, a pointer to the config and a pointer to a VirtualRobot model.
The function to provide the class name.
This controller provides widgets for function calls.
The run function executed to calculate new targets
Hooks for this NJointControllerBase to execute code during publishing.
This NJointControllerBase uses one position SensorValue, calculates one position ControlTarget and stores the current position target and position value in atomics.
Close the class and the namespace
Include the required headers.
Open the namespace
This generates a config widget used to display a config gui in RobotUnitGui. It consist out of a HBoxLayout containing a Label and a StringComboBox
The StringComboBox only contains the names of ControlDevices accepting a position ControlTarget and providing a position SensorValue
This turns a map of variants into the config required by this NJointControllerBase. The Variant for the key 'name' defines the ControlDevice.
The constructors implementation.
It checks whether the provided config has the correct type.
Then it retrieves the SensorValue and ControlTarget, casts then to the required types and stores them to the member variables.
The class name has to be unique, hence the c++ class name should be used.
This NJointControllerBase provides two widgets for function calls.
The first widget has a Label and a FloatSpinBox.
The FloatSpinBox creates a variant called 'spinmearound'
The second widget also has a Label and a FloatSpinBox.
This returns a map of boths widgets. The keys will be used to identify the called function.
This function is called from the RobotUnitGuiPlugin when the prior defined functions are called. Both functions set the target position.
The rtRun function sets the ControlTarget to the target value set via the atomic and stores the current SensorValue to the other atomic.
The publish activation hook does nothing, but could be used to call DebugDraver::setRobotVisu.
The publish deactivation hook clears the DebugDrawer layer
The publish hook draws a sphere with radius of the position stored in the atomic times 2000 to the DebugDrawer.
This registers a factory for this NJointControllerBase. This factory is used by the RobotUnit to create the NJointControllerBase. The passed name has to match the name returned by getClassName.
This statically asserts a factory for the type NJointPositionPassThroughController is present.
Close the namespace
Definition at line 578 of file NJointControllerBase.h.
using ConfigPtrT = NJointControllerConfigPtr |
Definition at line 586 of file NJointControllerBase.h.
using GenerateConfigDescriptionFunctionSignature = WidgetDescription::WidgetPtr (*)( const VirtualRobot::RobotPtr&, const std::map<std::string, ConstControlDevicePtr>& controlDevices, const std::map<std::string, ConstSensorDevicePtr>& sensorDevices) |
Definition at line 590 of file NJointControllerBase.h.
using GenerateConfigFromVariantsFunctionSignature = ConfigPrtType (*)(const StringVariantBaseMap&) |
Definition at line 593 of file NJointControllerBase.h.
|
override |
Definition at line 405 of file NJointController.cpp.
|
finaloverride |
|
inlinestatic |
|
inlineoverride |
Definition at line 828 of file NJointControllerBase.h.
|
finaloverride |
|
finaloverride |
|
finaloverride |
|
overridepure virtual |
Implemented in Controller, Controller, Controller, Controller, NJointTaskspaceSafetyImpedanceController, NJointBiKAC, NJointHolonomicPlatformGlobalPositionController, NJointTaskspaceMixedImpedanceVelocityController, NJointTaskspaceAdmittanceController, NJointTaskspaceImpedanceController, NJointTaskspaceVelocityController, NJointHolonomicPlatformRelativePositionController, NJointHolonomicPlatformVelocityControllerWithRamp, NJointKinematicUnitPassThroughController, NJointTaskspaceCollisionAvoidanceImpedanceController, NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController, NJointHolonomicPlatformUnitVelocityPassThroughController, NJointTSAdmittanceMPController, NJointTSCollisionAvoidanceImpedanceMPController, NJointTSCollisionAvoidanceMixedImpedanceVelocityMPController, NJointTSImpedanceMPController, NJointTSMixedImpedanceVelocityMPController, NJointTSSafetyImpedanceMPController, NJointTSVelocityMPController, NJointCartesianNaturalPositionController, NJointCartesianWaypointController, NJointCartesianVelocityControllerWithRamp, NJointTaskspaceZeroTorqueOrVelocityController, NJointZeroTorqueOrVelocityWithFTController, NJointKVILImpedanceMPController, NJointCartesianTorqueController, NJointCartesianVelocityController, NJointTCPController, NJointTSDMPController, KeypointMPController, DeprecatedNJointTSDMPController, NJointCCDMPController, NJointBimanualCCDMPVelocityController, NJointKeypointsImpedanceController, NJointTaskSpaceImpedanceController, NJointBimanualCCDMPController, NJointKeypointsAdmittanceController, NJointTaskSpaceImpedanceDMPController, NJointKeypointsImpedanceMPController, NJointBimanualForceMPController, NJointKeypointsAdmittanceMPController, DeprecatedNJointTaskSpaceAdmittanceDMPController, DeprecatedNJointTaskSpaceImpedanceDMPController, NJointJointSpaceDMPController, NJointJSDMPController, NJointTrajectoryController, NJointBimanualCartesianAdmittanceController, NJointZeroTorqueController, NJointZeroTorqueOrVelocityController, NJointTorqueController, DSRTController, DSRTBimanualController, DSJointCarryController, NJointBimanualForceController, NJointBimanualObjLevelMultiMPController, NJointTaskSpaceAdaptiveDMPController, DeprecatedNJointPeriodicTSDMPCompliantController, NJointPeriodicTSDMPCompliantController, NJointAdaptiveWipingController, NJointAnomalyDetectionAdaptiveWipingController, NJointPeriodicTSDMPForwardVelController, NJointBimanualCCDMPController, NJointBimanualObjLevelController, and NJointBimanualObjLevelVelController.
|
inline |
Definition at line 1020 of file NJointControllerBase.h.
|
inline |
Definition at line 1008 of file NJointControllerBase.h.
|
inlinefinaloverride |
Definition at line 1001 of file NJointControllerBase.h.
|
inline |
Definition at line 1014 of file NJointControllerBase.h.
|
finaloverride |
Definition at line 79 of file NJointController.cpp.
|
finaloverride |
|
finaloverride |
Definition at line 114 of file NJointController.cpp.
|
inlineoverrideprotectedvirtual |
Implements ManagedIceObject.
Definition at line 683 of file NJointControllerBase.h.
|
inlineoverride |
Definition at line 822 of file NJointControllerBase.h.
|
inlinefinaloverride |
|
protected |
Definition at line 376 of file NJointController.cpp.
|
inlinefinaloverride |
Definition at line 795 of file NJointControllerBase.h.
|
inlinefinaloverride |
|
inlinefinaloverride |
Definition at line 783 of file NJointControllerBase.h.
|
inlinefinaloverride |
Definition at line 789 of file NJointControllerBase.h.
|
inline |
Definition at line 1027 of file NJointControllerBase.h.
std::optional< std::vector< char > > isNotInConflictWith | ( | const std::vector< char > & | used | ) | const |
Definition at line 94 of file NJointController.cpp.
|
finalprotectedvirtual |
Implements ManagedIceObject.
Definition at line 312 of file NJointController.cpp.
|
inlineprotectedvirtual |
Reimplemented in NJointTrajectoryController.
Definition at line 703 of file NJointControllerBase.h.
|
finalprotectedvirtual |
Reimplemented from ManagedIceObject.
Reimplemented in NJointBimanualCCDMPController.
Definition at line 319 of file NJointController.cpp.
|
inlineprotectedvirtual |
Reimplemented in DeprecatedNJointTSDMPController, NJointJSDMPController, NJointTSDMPController, DeprecatedNJointTaskSpaceImpedanceDMPController, NJointTaskSpaceImpedanceDMPController, DeprecatedNJointTaskSpaceAdmittanceDMPController, NJointBimanualCCDMPVelocityController, NJointCCDMPController, NJointBimanualCCDMPController, NJointBimanualForceMPController, DSRTController, DSRTBimanualController, Controller, DSJointCarryController, NJointBimanualObjLevelMultiMPController, NJointBimanualObjLevelController, NJointBimanualObjLevelVelController, NJointTaskSpaceAdaptiveDMPController, DeprecatedNJointPeriodicTSDMPCompliantController, NJointAnomalyDetectionAdaptiveWipingController, NJointBimanualForceController, NJointPeriodicTSDMPCompliantController, NJointAdaptiveWipingController, and NJointPeriodicTSDMPForwardVelController.
Definition at line 708 of file NJointControllerBase.h.
|
finalprotectedvirtual |
Reimplemented from ManagedIceObject.
Definition at line 326 of file NJointController.cpp.
|
inlineprotectedvirtual |
|
finalprotectedvirtual |
Implements ManagedIceObject.
Reimplemented in NJointBimanualCCDMPController.
Definition at line 305 of file NJointController.cpp.
|
inlineprotectedvirtual |
Reimplemented in NJointTaskspaceSafetyImpedanceController, NJointTaskspaceMixedImpedanceVelocityController, NJointTaskspaceAdmittanceController, NJointTaskspaceImpedanceController, NJointTaskspaceVelocityController, NJointTaskspaceZeroTorqueOrVelocityController, DeprecatedNJointTSDMPController, NJointJSDMPController, NJointTSDMPController, Controller, Controller, DeprecatedNJointTaskSpaceImpedanceDMPController, NJointTaskSpaceImpedanceDMPController, NJointKeypointsImpedanceController, Controller, DeprecatedNJointTaskSpaceAdmittanceDMPController, NJointKeypointsAdmittanceController, NJointBimanualCCDMPVelocityController, NJointCCDMPController, NJointBimanualCCDMPController, NJointBimanualForceMPController, KeypointMPController, NJointTrajectoryController, DSRTController, DSRTBimanualController, DSJointCarryController, NJointBimanualObjLevelMultiMPController, NJointBimanualObjLevelController, NJointBimanualObjLevelVelController, NJointTaskSpaceAdaptiveDMPController, DeprecatedNJointPeriodicTSDMPCompliantController, NJointAnomalyDetectionAdaptiveWipingController, NJointBimanualForceController, NJointPeriodicTSDMPCompliantController, NJointAdaptiveWipingController, and NJointPeriodicTSDMPForwardVelController.
Definition at line 698 of file NJointControllerBase.h.
|
inlineprotectedvirtual |
Reimplemented in NJointTaskspaceCollisionAvoidanceImpedanceController, NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController, Controller, Controller, Controller, NJointTaskspaceSafetyImpedanceController, NJointTaskspaceMixedImpedanceVelocityController, NJointTaskspaceAdmittanceController, NJointTaskspaceImpedanceController, NJointTaskspaceVelocityController, DeprecatedNJointTSDMPController, NJointBiKAC, NJointTaskspaceZeroTorqueOrVelocityController, NJointTSDMPController, KeypointMPController, DeprecatedNJointTaskSpaceImpedanceDMPController, NJointTaskSpaceImpedanceDMPController, DeprecatedNJointTaskSpaceAdmittanceDMPController, NJointBimanualCCDMPVelocityController, NJointZeroTorqueOrVelocityWithFTController, NJointCCDMPController, NJointBimanualCCDMPController, NJointKeypointsAdmittanceController, NJointKeypointsImpedanceController, NJointBimanualForceMPController, NJointJointSpaceDMPController, NJointJSDMPController, NJointTaskSpaceImpedanceController, NJointCartesianWaypointController, NJointCartesianNaturalPositionController, DSRTBimanualController, DSRTController, DSJointCarryController, NJointBimanualObjLevelMultiMPController, NJointBimanualObjLevelController, NJointBimanualObjLevelVelController, NJointTaskSpaceAdaptiveDMPController, NJointBimanualCCDMPController, DeprecatedNJointPeriodicTSDMPCompliantController, NJointAnomalyDetectionAdaptiveWipingController, NJointBimanualForceController, NJointPeriodicTSDMPCompliantController, NJointAdaptiveWipingController, NJointPeriodicTSDMPForwardVelController, NJointBimanualCartesianAdmittanceController, and Controller.
Definition at line 1073 of file NJointControllerBase.h.
|
inlineprotectedvirtual |
Definition at line 1063 of file NJointControllerBase.h.
|
inlineprotectedvirtual |
Definition at line 1068 of file NJointControllerBase.h.
ConstControlDevicePtr peekControlDevice | ( | const std::string & | deviceName | ) | const |
Get a const ptr to the given ControlDevice.
deviceName | The ControlDevice's name |
Definition at line 284 of file NJointController.cpp.
armarx::ConstSensorDevicePtr peekSensorDevice | ( | const std::string & | deviceName | ) | const |
Get a const ptr to the given SensorDevice.
deviceName | The SensorDevice's name |
Definition at line 275 of file NJointController.cpp.
|
inline |
Returns the class name.
(the c-string may be used for rt message logging)
Definition at line 911 of file NJointControllerBase.h.
|
inline |
Returns the indices of all ControlDevice's this NJointControllerBase calculates a ControlTarget for.
Definition at line 882 of file NJointControllerBase.h.
|
inline |
Sets the error state to true.
This will deactivate this controller!
Definition at line 891 of file NJointControllerBase.h.
|
inline |
Returns the instance name.
(the c-string may be used for rt message logging)
Definition at line 921 of file NJointControllerBase.h.
|
inline |
Returns the number of used ControlDevices.
Definition at line 901 of file NJointControllerBase.h.
|
inline |
TODO make protected and use attorneys.
Returns the virtual robot used by this NJointControllerBase in the rtRun
Definition at line 845 of file NJointControllerBase.h.
|
inline |
Returns the nodes of the virtual robot used by this NJointControllerBase in the rtRun.
Definition at line 857 of file NJointControllerBase.h.
|
inlineprotectedvirtual |
This function is called after the controller is deactivated.
You can use it to deactivate a thread (DO NOT JOIN THREADS!) e.g. via a std::atomic_bool.
Reimplemented in NJointTaskspaceSafetyImpedanceController, NJointTaskspaceMixedImpedanceVelocityController, NJointTaskspaceAdmittanceController, NJointTaskspaceImpedanceController, NJointTaskspaceVelocityController, NJointTaskspaceZeroTorqueOrVelocityController, DeprecatedNJointTSDMPController, NJointCartesianVelocityControllerWithRamp, Controller, NJointTSDMPController, NJointCartesianVelocityController, NJointKeypointsImpedanceController, Controller, NJointCartesianTorqueController, NJointZeroTorqueOrVelocityWithFTController, NJointTCPController, NJointTaskspaceCollisionAvoidanceImpedanceController, NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController, NJointCCDMPController, NJointCartesianWaypointController, NJointCartesianNaturalPositionController, NJointJointSpaceDMPController, NJointJSDMPController, NJointZeroTorqueOrVelocityController, NJointZeroTorqueController, NJointTrajectoryController, NJointTorqueController, DSRTBimanualController, DSRTController, and DSJointCarryController.
Definition at line 941 of file NJointControllerBase.h.
|
inlineprotectedvirtual |
This function is called before the controller is activated.
You can use it to activate a thread again (DO NOT SPAWN NEW THREADS!) e.g. via a std::atomic_bool.
Reimplemented in DeprecatedNJointTaskSpaceAdmittanceDMPController, NJointBimanualCCDMPVelocityController, NJointBimanualCCDMPController, Controller, NJointTaskspaceSafetyImpedanceController, NJointTaskspaceMixedImpedanceVelocityController, NJointTaskspaceAdmittanceController, NJointTaskspaceImpedanceController, NJointTaskspaceVelocityController, NJointTaskspaceZeroTorqueOrVelocityController, DeprecatedNJointTSDMPController, NJointCartesianVelocityControllerWithRamp, NJointTaskSpaceImpedanceController, Controller, Controller, NJointTSDMPController, NJointCartesianVelocityController, NJointKeypointsImpedanceController, Controller, NJointCartesianTorqueController, NJointZeroTorqueOrVelocityWithFTController, NJointTCPController, NJointKeypointsAdmittanceController, NJointTaskspaceCollisionAvoidanceImpedanceController, NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController, NJointHolonomicPlatformGlobalPositionController, NJointKVILImpedanceMPController, NJointHolonomicPlatformVelocityControllerWithRamp, NJointHolonomicPlatformRelativePositionController, NJointCCDMPController, NJointCartesianWaypointController, NJointCartesianNaturalPositionController, KeypointMPController, NJointJointSpaceDMPController, NJointJSDMPController, NJointKinematicUnitPassThroughController, NJointKeypointsImpedanceMPController, NJointKeypointsAdmittanceMPController, NJointZeroTorqueOrVelocityController, NJointZeroTorqueController, NJointTrajectoryController, NJointTorqueController, DSRTBimanualController, DSRTController, DSJointCarryController, NJointBimanualObjLevelController, NJointBimanualObjLevelMultiMPController, NJointBimanualCartesianAdmittanceController, DeprecatedNJointTaskSpaceImpedanceDMPController, NJointTaskSpaceImpedanceDMPController, NJointTaskSpaceAdaptiveDMPController, and NJointBimanualObjLevelVelController.
Definition at line 932 of file NJointControllerBase.h.
|
inlineprotected |
Sets the error state to true.
This will deactivate this controller!
Definition at line 949 of file NJointControllerBase.h.
|
inline |
Returns whether this NJointControllerBase calculates a ControlTarget for the given ControlDevice.
deviceIndex | The ControlDevice's index |
Definition at line 870 of file NJointControllerBase.h.
|
inlineprotected |
Executes a given task in a separate thread from the Application ThreadPool.
taskName | Descriptive name of this task to identify it on errors. |
task | std::function object (or lambda) that is to be executed. |
Definition at line 753 of file NJointControllerBase.h.
ControlTargetBase * useControlTarget | ( | const std::string & | deviceName, |
const std::string & | controlMode | ||
) |
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtRun is called.
deviceName | The ControlDevice's name |
controlMode | The ControlTarget's ControlMode |
Definition at line 410 of file NJointController.cpp.
|
inline |
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtRun is called.
deviceName | The ControlDevice's name |
controlMode | The ControlTarget's ControlMode |
Definition at line 634 of file NJointControllerBase.h.
|
inline |
Get a const ptr to the given SensorDevice's SensorValue.
deviceName | The SensorDevice's name |
Definition at line 658 of file NJointControllerBase.h.
const SensorValueBase * useSensorValue | ( | const std::string & | sensorDeviceName | ) | const |
Get a const ptr to the given SensorDevice's SensorValue.
deviceName | The SensorDevice's name |
Definition at line 383 of file NJointController.cpp.
const VirtualRobot::RobotPtr & useSynchronizedRtRobot | ( | bool | updateCollisionModel = false | ) |
Requests a VirtualRobot for use in rtRun *.
The robot is updated before rtRun is called and can be accessed via \rtGetRobot
updateCollisionModel | Whether the robot's collision model should be updated |
Definition at line 293 of file NJointController.cpp.
|
friend |
This is required for the factory.
Definition at line 1142 of file NJointControllerBase.h.
|
friend |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::ControllerManagement.
Definition at line 1126 of file NJointControllerBase.h.
|
friend |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::ControlThread.
Definition at line 1131 of file NJointControllerBase.h.
|
friend |
This class allows minimal access to private members of NJointControllerBase in a sane fashion for RobotUnitModule::Publisher.
Definition at line 1136 of file NJointControllerBase.h.
|
static |
Definition at line 987 of file NJointControllerBase.h.
|
protected |
Definition at line 769 of file NJointControllerBase.h.
|
protected |
Definition at line 770 of file NJointControllerBase.h.