Skip to content

Commit

Permalink
removed not necessary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegorbani committed Dec 14, 2023
1 parent 406d2e0 commit 45e42ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 2 additions & 5 deletions src/IK/include/BiomechanicalAnalysis/IK/InverseKinematics.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ class HumanIK
Eigen::VectorXd m_jointPositions;
Eigen::VectorXd m_jointVelocities;
Eigen::Matrix4d m_basePose;
Eigen::Vector3d m_baseLinearPosition;
Eigen::Matrix<double, 6, 1> m_baseVelocity;
manif::SO3d m_baseOrientation;
Eigen::Vector3d m_baseAngularVelocity;
Eigen::Vector3d m_gravity;

// tasks
Expand Down Expand Up @@ -100,10 +97,10 @@ class HumanIK
bool getBasePosition(Eigen::Ref<Eigen::Vector3d> basePosition) const;

// get the base velocity
bool getBaseVelocity(manif::SE3Tangentd & baseVelocity) const;
bool getBaseLinearVelocity(Eigen::Ref<Eigen::Vector3d> baseVelocity) const;

// get the base orientation
bool getBaseOrientation(manif::SO3d& baseOrientation) const;
bool getBaseOrientation(Eigen::Ref<Eigen::Matrix3d> baseOrientation) const;

// get the base angular velocity
bool getBaseAngularVelocity(Eigen::Ref<Eigen::Vector3d> baseAngularVelocity) const;
Expand Down
12 changes: 6 additions & 6 deletions src/IK/src/InverseKinematics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,28 @@ bool HumanIK::getJointVelocities(Eigen::Ref<Eigen::VectorXd> jointVelocities) co

bool HumanIK::getBasePosition(Eigen::Ref<Eigen::Vector3d> basePosition) const
{
basePosition = m_baseLinearPosition;
basePosition = m_basePose.topRightCorner<3, 1>();

return true;
}

bool HumanIK::getBaseVelocity(manif::SE3Tangentd &baseVelocity) const
bool HumanIK::getBaseLinearVelocity(Eigen::Ref<Eigen::Vector3d> baseVelocity) const
{
baseVelocity = m_baseVelocity;
baseVelocity = m_baseVelocity.topRows<3>();

return true;
}

bool HumanIK::getBaseOrientation(manif::SO3d& baseOrientation) const
bool HumanIK::getBaseOrientation(Eigen::Ref<Eigen::Matrix3d> baseOrientation) const
{
baseOrientation = m_baseOrientation;
baseOrientation = m_basePose.topLeftCorner<3, 3>();

return true;
}

bool HumanIK::getBaseAngularVelocity(Eigen::Ref<Eigen::Vector3d> baseAngularVelocity) const
{
baseAngularVelocity = m_baseAngularVelocity;
baseAngularVelocity = m_baseVelocity.bottomRows<3>();

return true;
}

0 comments on commit 45e42ce

Please sign in to comment.