cisst-saw
Loading...
Searching...
No Matches
mtsVFFollow Class Reference

Calculate joint angles that take the robot from the current position and orientation to a desired one. More...

#include <mtsVFFollow.h>

Inheritance diagram for mtsVFFollow:
mtsVFJointPosition mtsVFBase mtsGenericObject cmnGenericObject

Public Member Functions

 mtsVFFollow ()
 mtsVFFollow (const std::string &name, mtsVFDataBase *data)
void FillInTableauRefs (const mtsVFBase::CONTROLLERMODE mode, const double TickTime)
 Updates co with virtual fixture data.
Public Member Functions inherited from mtsVFJointPosition
 mtsVFJointPosition ()
 mtsVFJointPosition (const std::string &name, mtsVFDataBase *data)
void FillInTableauRefs (const mtsVFBase::CONTROLLERMODE mode, const double TickTime)
 Updates co with virtual fixture data.
void ConvertRefs (const mtsVFBase::CONTROLLERMODE mode, const double TickTime)
 Converts the data in the references if a change in mode is needed.
Public Member Functions inherited from mtsVFBase
 mtsVFBase ()
 mtsVFBase (const std::string &name, mtsVFDataBase *data)
 ~mtsVFBase ()
virtual void ComputeConstraintSize ()
void ReserveSpace (nmrConstraintOptimizer &co)
 Reserves space in the control optimizer.
void LookupStateData (const std::map< std::string, prmKinematicsState * > &k, const std::map< std::string, prmSensorState * > &s)
 Updates internal state data.
void SetTableauRefs (nmrConstraintOptimizer &co)
 Updates internal references with co tableau.
vctDoubleMat Skew (const vctDoubleVec &in)
virtual void AssignRefs (const mtsVFBase::CONTROLLERMODE, const double, const vctDoubleVec &, vctDoubleMat &, vctDoubleVec &, vctDoubleMat &, vctDoubleVec &, vctDoubleMat &, vctDoubleVec &)
Public Member Functions inherited from mtsGenericObject
 mtsGenericObject (void)
 mtsGenericObject (double timestamp, bool automaticTimestamp, bool valid)
 mtsGenericObject (const mtsGenericObject &other)
virtual ~mtsGenericObject (void)
mtsGenericObjectoperator= (const mtsGenericObject &other)
bool SetTimestampIfAutomatic (double timestamp)
virtual void ToStream (std::ostream &outputStream) const
virtual void ToStreamRaw (std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
virtual bool FromStreamRaw (std::istream &inputStream, const char delimiter=' ')
virtual void SerializeRaw (std::ostream &outputStream) const
virtual void DeSerializeRaw (std::istream &inputStream)
size_t ScalarNumber (void) const
bool ScalarNumberIsFixed (void) const
Public Member Functions inherited from cmnGenericObject
virtual ~cmnGenericObject (void)
virtual const cmnClassServicesBaseServices (void) const =0
bool ReconstructFrom (const cmnGenericObject &other)
std::string ToString (void) const
virtual cmnLogger::StreamBufTypeGetLogMultiplexer (void) const
virtual double Scalar (const size_t CMN_UNUSED(index)) const CISST_THROW(std
virtual std::string ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const

Public Attributes

prmKinematicsState * CurrentKinematics
prmKinematicsState * DesiredKinematics
Public Attributes inherited from mtsVFBase
std::string Name
 Name of the virtual fixture.
mtsVFDataBase * Data
 Internally stored data.
std::vector< prmKinematicsState * > Kinematics
 Frame object.
std::vector< prmSensorState * > Sensors
 Sensor object.
vctDoubleVec DOFSelections
vctDynamicMatrixRef< double > ObjectiveMatrixRef
 Objective data reference.
vctDynamicMatrixRef< double > ObjectiveMatrixSlackRef
 Objective slack reference.
vctDynamicVectorRef< double > ObjectiveVectorRef
 Objective vector reference.
vctDynamicMatrixRef< double > IneqConstraintMatrixRef
 Inequality constraint data reference.
vctDynamicMatrixRef< double > IneqConstraintMatrixSlackRef
 Inequality constraint slack reference.
vctDynamicVectorRef< double > IneqConstraintVectorRef
 Inequality constraint vector reference.
vctDynamicVectorRef< double > IneqConstraintVectorSlackRef
 Inequality constraint slack reference.
vctDynamicMatrixRef< double > EqConstraintMatrixRef
 Equality constraint data reference.
vctDynamicMatrixRef< double > EqConstraintMatrixSlackRef
 Equality constraint slack reference.
vctDynamicVectorRef< double > EqConstraintVectorRef
 Equality constraint vector reference.

Additional Inherited Members

Public Types inherited from mtsVFBase
enum  CONTROLLERMODE { JPOS = 1 , JVEL = 2 , CARTPOS = 3 , CARTVEL = 4 }
Static Public Attributes inherited from mtsVFBase
static std::string DefaultKinematicsName

Detailed Description

Calculate joint angles that take the robot from the current position and orientation to a desired one.

This is useful for having the arm follow a path, particularly one that leads the end effector slightly at each instant to indicate the new destination.

fill in refs min || J*dq - [v_T ; v_R] || v_T = p_des - R_des * R^(-1)_cur * p_cur v_R = sk(A)^(-1) * A - sk(A)^(-1) * R_des * R^(-1)_cur * A J is the jacobian, p_des is the desired frame's translation, R_des is the desired frame's rotation, R^(-1)_cur is the inverse of the current frame's rotation, p_cur is the current frame's translation, A is an arbitrary vector, sk(A)^(-1) is the inverse of the skew matrix of A

The goal is constructing the dx parameter which contains: [x, y, z, rx*theta, ry*theta, rz*theta] This is the same xdot format output by J*qdot that way we try to make xdot - J*qdot == [0,0,0,0,0,0].transpose() which means that you've found the joint angles that will put you at exactly the desired position and rotation

Constructor & Destructor Documentation

◆ mtsVFFollow() [1/2]

mtsVFFollow::mtsVFFollow ( )
inline

Constructor

◆ mtsVFFollow() [2/2]

mtsVFFollow::mtsVFFollow ( const std::string & name,
mtsVFDataBase * data )
inline

Constructor

Parameters
nameString name of object

Member Function Documentation

◆ FillInTableauRefs()

void mtsVFFollow::FillInTableauRefs ( const mtsVFBase::CONTROLLERMODE mode,
const double TickTime )
virtual

Updates co with virtual fixture data.

FillInTableauRefs

Implements mtsVFBase.

Member Data Documentation

◆ CurrentKinematics

prmKinematicsState* mtsVFFollow::CurrentKinematics

◆ DesiredKinematics

prmKinematicsState* mtsVFFollow::DesiredKinematics

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