CartesianNaturalPositionController Class Reference

#include <RobotAPI/libraries/core/CartesianNaturalPositionController.h>

Public Member Functions

Eigen::VectorXf actualElbVel (const Eigen::VectorXf &jointVel)
 
Eigen::VectorXf actualTcpVel (const Eigen::VectorXf &jointVel)
 
const Eigen::VectorXf calculate (float dt, VirtualRobot::IKSolver::CartesianSelection mode=VirtualRobot::IKSolver::All)
 
const Eigen::VectorXf calculateNullspaceTargetDifference ()
 
 CartesianNaturalPositionController (const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodePtr &elbow, float maxPositionAcceleration, float maxOrientationAcceleration, float maxNullspaceAcceleration, const VirtualRobot::RobotNodePtr &tcp=nullptr)
 
void clearFeedForwardVelocity ()
 
void clearNullspaceTarget ()
 
const Eigen::Vector3f & getCurrentElbowTarget () const
 
const Eigen::VectorXf & getCurrentNullspaceTarget () const
 
const Eigen::Matrix4f & getCurrentTarget () const
 
const Eigen::Vector3f getCurrentTargetPosition () const
 
float getOrientationError () const
 
float getPositionError () const
 
std::string getStatusText ()
 
bool hasNullspaceTarget () const
 
bool isTargetNear () const
 
bool isTargetReached () const
 
void setConfig (const CartesianNaturalPositionControllerConfig &cfg)
 
void setFeedForwardVelocity (const Eigen::Vector3f &feedForwardVelocityPos, const Eigen::Vector3f &feedForwardVelocityOri)
 
void setFeedForwardVelocity (const Eigen::Vector6f &feedForwardVelocity)
 
void setNullSpaceControl (bool enabled)
 
void setNullspaceTarget (const Eigen::VectorXf &nullspaceTarget)
 
void setNullspaceTarget (const std::vector< float > &nullspaceTarget)
 
void setTarget (const Eigen::Matrix4f &tcpTarget, const Eigen::Vector3f &elbowTarget)
 

Static Public Member Functions

static Eigen::VectorXf LimitInfNormTo (const Eigen::VectorXf &vec, const std::vector< float > &maxValue)
 

Public Attributes

bool autoClearFeedForward = true
 
Eigen::Vector6f cartesianVelocity = Eigen::Vector6f::Zero()
 
Eigen::Vector3f elbowTarget
 
Eigen::Vector6f feedForwardVelocity = Eigen::Vector6f::Zero()
 
float jointLimitAvoidanceKp = 0.f
 
float jointLimitAvoidanceScale = 0.f
 
Eigen::VectorXf lastJointVelocity
 
std::vector< floatmaxJointVelocity
 
std::vector< floatmaxNullspaceVelocity
 
bool nullSpaceControlEnabled = true
 
Eigen::VectorXf nullspaceTarget = Eigen::VectorXf(0)
 
float nullspaceTargetKp = 0
 
CartesianPositionController pcElb
 
CartesianPositionController pcTcp
 
Eigen::Matrix4f tcpTarget
 
float thresholdOrientationNear = 0.f
 
float thresholdOrientationReached = 0.f
 
float thresholdPositionNear = 0.f
 
float thresholdPositionReached = 0.f
 
CartesianVelocityController vcElb
 
CartesianVelocityControllerWithRamp vcTcp
 

Detailed Description

Definition at line 49 of file CartesianNaturalPositionController.h.

Constructor & Destructor Documentation

◆ CartesianNaturalPositionController()

CartesianNaturalPositionController ( const VirtualRobot::RobotNodeSetPtr &  rns,
const VirtualRobot::RobotNodePtr &  elbow,
float  maxPositionAcceleration,
float  maxOrientationAcceleration,
float  maxNullspaceAcceleration,
const VirtualRobot::RobotNodePtr &  tcp = nullptr 
)

Definition at line 37 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ actualElbVel()

Eigen::VectorXf actualElbVel ( const Eigen::VectorXf &  jointVel)

Definition at line 307 of file CartesianNaturalPositionController.cpp.

◆ actualTcpVel()

Eigen::VectorXf actualTcpVel ( const Eigen::VectorXf &  jointVel)

Definition at line 302 of file CartesianNaturalPositionController.cpp.

◆ calculate()

const Eigen::VectorXf calculate ( float  dt,
VirtualRobot::IKSolver::CartesianSelection  mode = VirtualRobot::IKSolver::All 
)

Definition at line 104 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

◆ calculateNullspaceTargetDifference()

const Eigen::VectorXf calculateNullspaceTargetDifference ( )

Definition at line 82 of file CartesianNaturalPositionController.cpp.

+ Here is the caller graph for this function:

◆ clearFeedForwardVelocity()

void clearFeedForwardVelocity ( )

Definition at line 200 of file CartesianNaturalPositionController.cpp.

+ Here is the caller graph for this function:

◆ clearNullspaceTarget()

void clearNullspaceTarget ( )

Definition at line 195 of file CartesianNaturalPositionController.cpp.

+ Here is the caller graph for this function:

◆ getCurrentElbowTarget()

const Eigen::Vector3f & getCurrentElbowTarget ( ) const

Definition at line 235 of file CartesianNaturalPositionController.cpp.

◆ getCurrentNullspaceTarget()

const Eigen::VectorXf & getCurrentNullspaceTarget ( ) const

Definition at line 240 of file CartesianNaturalPositionController.cpp.

◆ getCurrentTarget()

const Eigen::Matrix4f & getCurrentTarget ( ) const

Definition at line 225 of file CartesianNaturalPositionController.cpp.

+ Here is the caller graph for this function:

◆ getCurrentTargetPosition()

const Eigen::Vector3f getCurrentTargetPosition ( ) const

Definition at line 230 of file CartesianNaturalPositionController.cpp.

◆ getOrientationError()

float getOrientationError ( ) const

Definition at line 210 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositionError()

float getPositionError ( ) const

Definition at line 205 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatusText()

std::string getStatusText ( )

Definition at line 262 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

◆ hasNullspaceTarget()

bool hasNullspaceTarget ( ) const

Definition at line 245 of file CartesianNaturalPositionController.cpp.

◆ isTargetNear()

bool isTargetNear ( ) const

Definition at line 220 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

◆ isTargetReached()

bool isTargetReached ( ) const

Definition at line 215 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

◆ LimitInfNormTo()

Eigen::VectorXf LimitInfNormTo ( const Eigen::VectorXf &  vec,
const std::vector< float > &  maxValue 
)
static

Definition at line 60 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setConfig()

void setConfig ( const CartesianNaturalPositionControllerConfig &  cfg)

Definition at line 270 of file CartesianNaturalPositionController.cpp.

+ Here is the call graph for this function:

◆ setFeedForwardVelocity() [1/2]

void setFeedForwardVelocity ( const Eigen::Vector3f &  feedForwardVelocityPos,
const Eigen::Vector3f &  feedForwardVelocityOri 
)

Definition at line 175 of file CartesianNaturalPositionController.cpp.

◆ setFeedForwardVelocity() [2/2]

void setFeedForwardVelocity ( const Eigen::Vector6f feedForwardVelocity)

Definition at line 170 of file CartesianNaturalPositionController.cpp.

◆ setNullSpaceControl()

void setNullSpaceControl ( bool  enabled)

Definition at line 257 of file CartesianNaturalPositionController.cpp.

◆ setNullspaceTarget() [1/2]

void setNullspaceTarget ( const Eigen::VectorXf &  nullspaceTarget)

Definition at line 181 of file CartesianNaturalPositionController.cpp.

◆ setNullspaceTarget() [2/2]

void setNullspaceTarget ( const std::vector< float > &  nullspaceTarget)

Definition at line 186 of file CartesianNaturalPositionController.cpp.

◆ setTarget()

void setTarget ( const Eigen::Matrix4f &  tcpTarget,
const Eigen::Vector3f &  elbowTarget 
)

Definition at line 164 of file CartesianNaturalPositionController.cpp.

Member Data Documentation

◆ autoClearFeedForward

bool autoClearFeedForward = true

Definition at line 117 of file CartesianNaturalPositionController.h.

◆ cartesianVelocity

Eigen::Vector6f cartesianVelocity = Eigen::Vector6f::Zero()

Definition at line 116 of file CartesianNaturalPositionController.h.

◆ elbowTarget

Eigen::Vector3f elbowTarget

Definition at line 103 of file CartesianNaturalPositionController.h.

◆ feedForwardVelocity

Eigen::Vector6f feedForwardVelocity = Eigen::Vector6f::Zero()

Definition at line 115 of file CartesianNaturalPositionController.h.

◆ jointLimitAvoidanceKp

float jointLimitAvoidanceKp = 0.f

Definition at line 122 of file CartesianNaturalPositionController.h.

◆ jointLimitAvoidanceScale

float jointLimitAvoidanceScale = 0.f

Definition at line 121 of file CartesianNaturalPositionController.h.

◆ lastJointVelocity

Eigen::VectorXf lastJointVelocity

Definition at line 100 of file CartesianNaturalPositionController.h.

◆ maxJointVelocity

std::vector<float> maxJointVelocity

Definition at line 111 of file CartesianNaturalPositionController.h.

◆ maxNullspaceVelocity

std::vector<float> maxNullspaceVelocity

Definition at line 112 of file CartesianNaturalPositionController.h.

◆ nullSpaceControlEnabled

bool nullSpaceControlEnabled = true

Definition at line 120 of file CartesianNaturalPositionController.h.

◆ nullspaceTarget

Eigen::VectorXf nullspaceTarget = Eigen::VectorXf(0)

Definition at line 104 of file CartesianNaturalPositionController.h.

◆ nullspaceTargetKp

float nullspaceTargetKp = 0

Definition at line 123 of file CartesianNaturalPositionController.h.

◆ pcElb

◆ pcTcp

◆ tcpTarget

Eigen::Matrix4f tcpTarget

Definition at line 102 of file CartesianNaturalPositionController.h.

◆ thresholdOrientationNear

float thresholdOrientationNear = 0.f

Definition at line 109 of file CartesianNaturalPositionController.h.

◆ thresholdOrientationReached

float thresholdOrientationReached = 0.f

Definition at line 107 of file CartesianNaturalPositionController.h.

◆ thresholdPositionNear

float thresholdPositionNear = 0.f

Definition at line 108 of file CartesianNaturalPositionController.h.

◆ thresholdPositionReached

float thresholdPositionReached = 0.f

Definition at line 106 of file CartesianNaturalPositionController.h.

◆ vcElb

◆ vcTcp


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