Skip to content

Commit

Permalink
Fix KinDynComputations::getFrameBiasAcc
Browse files Browse the repository at this point in the history
Bug Fixes
---------
* Fixed cache invalidation bug in the getFrameBiasAcc method of KinDynComputations. The internal
  cache used by getBiasAcc was never updated even if the method setRobotState was called, so the
  getFrameBiasAcc method always returned the bias acceleration corresponding to the first call to setRobotState.
* Fixed getBiasAcc method in KinDynComputations to take into account the effect of non-zero and non-parallel
  linear and angular base velocity, described in #370 .

New features
------------
* The getFrameAcc method that returns the acceleration of a frame was added to the KinDynComputations class.
  As this method takes in input every time the robot acceleration, it is computationally expensive and
  is not suitable to be used for multiple frames in a tight loop. If you need a computationally convenient
  method to access frame accelerations, please open an issue.
* It is now possible to specify a non-zero bias base acceleration as input of the ForwardBiasAccKinematics function.
  This is convenient if the bias acceleration that is being computed is the bias acceleration obtained with the
  MIXED velocity representation.
  • Loading branch information
traversaro committed Sep 12, 2018
1 parent 81edd03 commit 5e25d54
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 94 deletions.
21 changes: 21 additions & 0 deletions src/high-level/include/iDynTree/KinDynComputations.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class KinDynComputations {

// Resize internal data structures after a model has been successfully loaded
void resizeInternalDataStructures();

public:

/**
Expand Down Expand Up @@ -407,13 +408,33 @@ class KinDynComputations {
*/
iDynTree::Twist getFrameVel(const FrameIndex frameIdx);

/**
* Return the frame acceleration, with the convention specified by getFrameVelocityRepresentation .
*
* @warning As this method recomputes the accelerations of all links for each call, it may be computationally expensive.
*/
Vector6 getFrameAcc(const std::string & frameName,
const Vector6& baseAcc,
const VectorDynSize& s_ddot);

/**
* Return the frame acceleration, with the convention specified by getFrameVelocityRepresentation .
*
* @warning As this method recomputes the accelerations of all links for each call, it may be computationally expensive.
*/
Vector6 getFrameAcc(const FrameIndex frameIdx,
const Vector6& baseAcc,
const VectorDynSize& s_ddot);

bool getFrameFreeFloatingJacobian(const std::string & frameName,
iDynTree::MatrixDynSize & outJacobian);

bool getFrameFreeFloatingJacobian(const FrameIndex frameIndex,
iDynTree::MatrixDynSize & outJacobian);




/**
* Return the relative Jacobian between the two frames
*
Expand Down
Loading

0 comments on commit 5e25d54

Please sign in to comment.