Conscience Core
Classes | Public Member Functions | Public Attributes | List of all members
CscJacobianInverseKinematic Class Reference

#include <CscJacobianInverseKinematic.h>

Classes

struct  TargetIKParams
 

Public Member Functions

 CscJacobianInverseKinematic (CscEnvironmentSimulator *env, float maxHorizontalDistance, float maxVerticalDistance, float maxDepthDistance, CscPoint3d *offsetCenter, CscState *beginState, const CscEntityModel *entityModel, vector< TargetIKParams * > targets, map< int, CscPoint3d * > &centerOfMassOfAllMemberByMemberId, bool debugWithBox=false, bool constraintOnDistance=false, vector< int > pivotIdToIgnore=vector< int >())
 
void initIk ()
 
CscPoint3dgetEntityCenterOfMass ()
 
void changeTargets (vector< TargetIKParams * > newTargets, bool relativeValues=false)
 
void compute ()
 
void computeRandomly ()
 
double getDistanceFromTarget ()
 
map< int, float > getResult () const
 
vector< vector< int > > getPivotIdPaths () const
 
vector< TargetIKParams * > getTargets () const
 
void updateThetasRandomly ()
 
 ~CscJacobianInverseKinematic ()
 
void changeTargetsWithCenterOfMass (const bool applyDimensionXYZ[3], vector< int > idTargetsToChange)
 Modifies the target positions based on the center of mass. More...
 
Tree getIkTree ()
 

Public Attributes

const float targetPrecision = 1.5f
 

Constructor & Destructor Documentation

◆ CscJacobianInverseKinematic()

CscJacobianInverseKinematic::CscJacobianInverseKinematic ( CscEnvironmentSimulator env,
float  maxHorizontalDistance,
float  maxVerticalDistance,
float  maxDepthDistance,
CscPoint3d offsetCenter,
CscState beginState,
const CscEntityModel entityModel,
vector< TargetIKParams * >  targets,
map< int, CscPoint3d * > &  centerOfMassOfAllMemberByMemberId,
bool  debugWithBox = false,
bool  constraintOnDistance = false,
vector< int >  pivotIdToIgnore = vector<int>() 
)

◆ ~CscJacobianInverseKinematic()

CscJacobianInverseKinematic::~CscJacobianInverseKinematic ( )

Member Function Documentation

◆ changeTargets()

void CscJacobianInverseKinematic::changeTargets ( vector< TargetIKParams * >  newTargets,
bool  relativeValues = false 
)

@Param relativeValues FALSE by default. if TRUE, inputs targets values as added to previous one. If FALSE, inputs targets replace previous one

◆ changeTargetsWithCenterOfMass()

void CscJacobianInverseKinematic::changeTargetsWithCenterOfMass ( const bool  applyDimensionXYZ[3],
vector< int >  idTargetsToChange 
)

Modifies the target positions based on the center of mass.

Given a set of target IDs to change and a boolean array indicating which dimensions (X, Y, Z) to apply changes to, this function modifies the target positions. If a dimension should change for a particular target (as indicated by applyDimensionXYZ), the target's position in that dimension is set to the entity's center of mass position. Otherwise, it remains unchanged.

Parameters
applyDimensionXYZBoolean array indicating which dimensions to change: [0] for X, [1] for Y, and [2] for Z.
idTargetsToChangeVector containing IDs of targets to modify.
Note
This function modifies global members like entityCenterOfMass and targets. Also, it internally computes the new targets based on the center of mass and replaces the old targets with them using changeTargets.

◆ compute()

void CscJacobianInverseKinematic::compute ( )

◆ computeRandomly()

void CscJacobianInverseKinematic::computeRandomly ( )

◆ getDistanceFromTarget()

double CscJacobianInverseKinematic::getDistanceFromTarget ( )

◆ getEntityCenterOfMass()

CscPoint3d * CscJacobianInverseKinematic::getEntityCenterOfMass ( )

◆ getIkTree()

Tree CscJacobianInverseKinematic::getIkTree ( )

◆ getPivotIdPaths()

vector< vector< int > > CscJacobianInverseKinematic::getPivotIdPaths ( ) const

◆ getResult()

map< int, float > CscJacobianInverseKinematic::getResult ( ) const

◆ getTargets()

vector< CscJacobianInverseKinematic::TargetIKParams * > CscJacobianInverseKinematic::getTargets ( ) const

◆ initIk()

void CscJacobianInverseKinematic::initIk ( )

◆ updateThetasRandomly()

void CscJacobianInverseKinematic::updateThetasRandomly ( )

Member Data Documentation

◆ targetPrecision

const float CscJacobianInverseKinematic::targetPrecision = 1.5f

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