mc_tvm::CollisionFunction Class Reference

#include <mc_tvm/CollisionFunction.h>

Inheritance diagram for mc_tvm::CollisionFunction:
Collaboration diagram for mc_tvm::CollisionFunction:

Classes

struct  ObjectData
 

Public Member Functions

 CollisionFunction (Convex &c1, Convex &c2, const Eigen::VectorXd &r1Selector, const Eigen::VectorXd &r2Selector, double dt)
 
void tick ()
 
double distance () const noexcept
 
const Convexc1 () const noexcept
 
const Eigen::Vector3d & p1 () const noexcept
 
const Convexc2 () const noexcept
 
const Eigen::Vector3d & p2 () const noexcept
 

Protected Member Functions

void updateValue ()
 
void updateVelocity ()
 
void updateJacobian ()
 
void updateNormalAcceleration ()
 

Protected Attributes

uint64_t iter_ = 0
 
uint64_t prevIter_ = 0
 
Convexc1_
 
Convexc2_
 
double dt_
 
Eigen::Vector3d p1_ = Eigen::Vector3d::Zero()
 
Eigen::Vector3d p2_ = Eigen::Vector3d::Zero()
 
sch::CD_Pair pair_
 
std::vector< ObjectDatadata_
 
Eigen::Vector3d normVecDist_ = Eigen::Vector3d::Zero()
 
Eigen::Vector3d prevNormVecDist_ = Eigen::Vector3d::Zero()
 
Eigen::Vector3d speedVec_ = Eigen::Vector3d::Zero()
 
Eigen::MatrixXd fullJac_
 
Eigen::MatrixXd distJac_
 

Detailed Description

This class implements a collision function for two given objects

Constructor & Destructor Documentation

◆ CollisionFunction()

mc_tvm::CollisionFunction::CollisionFunction ( Convex c1,
Convex c2,
const Eigen::VectorXd &  r1Selector,
const Eigen::VectorXd &  r2Selector,
double  dt 
)

Constructor

Parameters
c1First collision object
c2Second collision object
r1SelectorJoint selector for the first robot
r2SelectorJoint selector for the second robot
dtTimestep

Member Function Documentation

◆ c1()

const Convex& mc_tvm::CollisionFunction::c1 ( ) const
inlinenoexcept

First convex involved in the collision

◆ c2()

const Convex& mc_tvm::CollisionFunction::c2 ( ) const
inlinenoexcept

Second convex involved in the collision

◆ distance()

double mc_tvm::CollisionFunction::distance ( ) const
inlinenoexcept

Distance between the two objects

◆ p1()

const Eigen::Vector3d& mc_tvm::CollisionFunction::p1 ( ) const
inlinenoexcept

Closest point on c1 in inertial frame coordinates

◆ p2()

const Eigen::Vector3d& mc_tvm::CollisionFunction::p2 ( ) const
inlinenoexcept

Closest point on c2 in inertial frame coordinates

◆ tick()

void mc_tvm::CollisionFunction::tick ( )

Called once every iteration to advance the iteration counter

◆ updateJacobian()

void mc_tvm::CollisionFunction::updateJacobian ( )
protected

◆ updateNormalAcceleration()

void mc_tvm::CollisionFunction::updateNormalAcceleration ( )
protected

◆ updateValue()

void mc_tvm::CollisionFunction::updateValue ( )
protected

◆ updateVelocity()

void mc_tvm::CollisionFunction::updateVelocity ( )
protected

Member Data Documentation

◆ c1_

Convex* mc_tvm::CollisionFunction::c1_
protected

◆ c2_

Convex* mc_tvm::CollisionFunction::c2_
protected

◆ data_

std::vector<ObjectData> mc_tvm::CollisionFunction::data_
protected

◆ distJac_

Eigen::MatrixXd mc_tvm::CollisionFunction::distJac_
protected

◆ dt_

double mc_tvm::CollisionFunction::dt_
protected

◆ fullJac_

Eigen::MatrixXd mc_tvm::CollisionFunction::fullJac_
protected

Intermediate computation

◆ iter_

uint64_t mc_tvm::CollisionFunction::iter_ = 0
protected

◆ normVecDist_

Eigen::Vector3d mc_tvm::CollisionFunction::normVecDist_ = Eigen::Vector3d::Zero()
protected

◆ p1_

Eigen::Vector3d mc_tvm::CollisionFunction::p1_ = Eigen::Vector3d::Zero()
protected

◆ p2_

Eigen::Vector3d mc_tvm::CollisionFunction::p2_ = Eigen::Vector3d::Zero()
protected

◆ pair_

sch::CD_Pair mc_tvm::CollisionFunction::pair_
protected

◆ prevIter_

uint64_t mc_tvm::CollisionFunction::prevIter_ = 0
protected

◆ prevNormVecDist_

Eigen::Vector3d mc_tvm::CollisionFunction::prevNormVecDist_ = Eigen::Vector3d::Zero()
protected

◆ speedVec_

Eigen::Vector3d mc_tvm::CollisionFunction::speedVec_ = Eigen::Vector3d::Zero()
protected

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