TaskspaceController< ConfigType, ConfigDictType > Class Template Referenceabstract

#include <armarx/control/common/control_law/TaskspaceController.h>

Public Types

using Config = ConfigType
 
using ConfigDict = ConfigDictType
 
using FTConfig = common::ft::arondto::FTConfig
 

Public Member Functions

void applyAdmittanceInterface (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void applyInverseDynamics (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void applyInverseKinematics (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void computeInertiaInverse (TSCtrlRtStatus &rtStatus)
 
void firstRun ()
 
void initialize (const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodeSetPtr &rtRns)
 
bool isControlModeValid (const std::vector< std::string > &nameList, const std::map< std::string, std::string > &jointControlModeMap)
 
bool isForceTorqueSafe ()
 
virtual void run (ConfigType &c, TSCtrlRtStatus &robotStatus)=0
 
void setForceTorqueGuard (bool forceGuard, bool torqueGuard)
 
void updateJacobian (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void updateNullspaceForceCommand (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void updateNullspaceTwistCommand (ConfigType &c, TSCtrlRtStatus &rtStatus)
 Admittance.
 
void updateTSAdmittanceCommand (ConfigType &c, TSCtrlRtStatus &rtStatus)
 Impedance.
 
void updateTSError (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void updateTSForceCommand (ConfigType &c, TSCtrlRtStatus &rtStatus)
 Velocity.
 
void updateTSTwistCommand (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void updateTwist (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
void validate (ConfigType &c, TSCtrlRtStatus &rtStatus)
 
virtual ~TaskspaceController ()=default
 

Public Attributes

common::ft::FTSensor ftsensor
 
VirtualRobot::RobotNodePtr rtTCP
 
VirtualRobot::RobotNodePtr tcp
 

Member Typedef Documentation

◆ Config

template<typename ConfigType, typename ConfigDictType>
using Config = ConfigType

◆ ConfigDict

template<typename ConfigType, typename ConfigDictType>
using ConfigDict = ConfigDictType

◆ FTConfig

template<typename ConfigType, typename ConfigDictType>
using FTConfig = common::ft::arondto::FTConfig

Constructor & Destructor Documentation

◆ ~TaskspaceController()

template<typename ConfigType, typename ConfigDictType>
virtual ~TaskspaceController ( )
virtualdefault

Member Function Documentation

◆ applyAdmittanceInterface()

template<typename ConfigType, typename ConfigDictType>
void applyAdmittanceInterface ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

◆ applyInverseDynamics()

template<typename ConfigType, typename ConfigDictType>
void applyInverseDynamics ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Map TS target force to JS

write torque target

◆ applyInverseKinematics()

template<typename ConfigType, typename ConfigDictType>
void applyInverseKinematics ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Map TS target velocity to JS

◆ computeInertiaInverse()

template<typename ConfigType, typename ConfigDictType>
void computeInertiaInverse ( TSCtrlRtStatus & rtStatus)

Determine the size of the submatrix (M x M)

Extract elements: Loop over rows and columns

Invert and cast to float

◆ firstRun()

template<typename ConfigType, typename ConfigDictType>
void firstRun ( )

◆ initialize()

template<typename ConfigType, typename ConfigDictType>
void initialize ( const VirtualRobot::RobotNodeSetPtr & rns,
const VirtualRobot::RobotNodeSetPtr & rtRns )

◆ isControlModeValid()

template<typename ConfigType, typename ConfigDictType>
bool isControlModeValid ( const std::vector< std::string > & nameList,
const std::map< std::string, std::string > & jointControlModeMap )

◆ isForceTorqueSafe()

template<typename ConfigType, typename ConfigDictType>
bool isForceTorqueSafe ( )

◆ run()

template<typename ConfigType, typename ConfigDictType>
virtual void run ( ConfigType & c,
TSCtrlRtStatus & robotStatus )
pure virtual

◆ setForceTorqueGuard()

template<typename ConfigType, typename ConfigDictType>
void setForceTorqueGuard ( bool forceGuard,
bool torqueGuard )

◆ updateJacobian()

template<typename ConfigType, typename ConfigDictType>
void updateJacobian ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

---------------------------— compute jacobi ---------------------------------------—

◆ updateNullspaceForceCommand()

template<typename ConfigType, typename ConfigDictType>
void updateNullspaceForceCommand ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Nullspace PD Control

◆ updateNullspaceTwistCommand()

template<typename ConfigType, typename ConfigDictType>
void updateNullspaceTwistCommand ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Admittance.

Nullspace PD Control

◆ updateTSAdmittanceCommand()

template<typename ConfigType, typename ConfigDictType>
void updateTSAdmittanceCommand ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Impedance.

-------------------------— admittance control ------------------------------------------— calculate pose error between the virtual pose and the target pose

admittance control law and Euler Integration -> virtual pose

----------------------------------— Impedance control -----------------------------— calculate pose error between target pose and current pose !!! This is very important: you have to keep position and orientation both with UI unit (meter, radian) to calculate impedance force.

◆ updateTSError()

template<typename ConfigType, typename ConfigDictType>
void updateTSError ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

----------------------------------— TS Error -----------------------------— calculate pose error between target pose and current pose !!! This is very important: you have to keep position and orientation both with UI unit (meter, radian) to calculate impedance force.

position error in meter

◆ updateTSForceCommand()

template<typename ConfigType, typename ConfigDictType>
void updateTSForceCommand ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

Velocity.

Unit in N, and Nm

◆ updateTSTwistCommand()

template<typename ConfigType, typename ConfigDictType>
void updateTSTwistCommand ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

------------------------— Velocity control ----------------------------------------— Unit in m/s and rad/s

◆ updateTwist()

template<typename ConfigType, typename ConfigDictType>
void updateTwist ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

---------------------------— update velocity/twist --------------------------------—

in m/s

◆ validate()

template<typename ConfigType, typename ConfigDictType>
void validate ( ConfigType & c,
TSCtrlRtStatus & rtStatus )

run in rt thread

safety guard by FT and target pose

this should not be moved to non rt, just in case non rt thread dies, rt still functions safely

Member Data Documentation

◆ ftsensor

template<typename ConfigType, typename ConfigDictType>
common::ft::FTSensor ftsensor

◆ rtTCP

template<typename ConfigType, typename ConfigDictType>
VirtualRobot::RobotNodePtr rtTCP

◆ tcp

template<typename ConfigType, typename ConfigDictType>
VirtualRobot::RobotNodePtr tcp

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