Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JointPath] add local_p arg for calcJacobian #127

Merged
merged 2 commits into from
Oct 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hrplib/hrpModel/JointPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void JointPath::onJointPathUpdated()
}


void JointPath::calcJacobian(dmatrix& out_J) const
void JointPath::calcJacobian(dmatrix& out_J, const Vector3& local_p) const
{
const int n = joints.size();
out_J.resize(6, n);
Expand All @@ -143,7 +143,7 @@ void JointPath::calcJacobian(dmatrix& out_J) const
case Link::ROTATIONAL_JOINT:
{
Vector3 omega(link->R * link->a);
Vector3 arm(targetLink->p - link->p);
Vector3 arm(targetLink->p + targetLink->R * local_p - link->p);
if(!isJointDownward(i)){
omega *= -1.0;
}
Expand Down
2 changes: 1 addition & 1 deletion hrplib/hrpModel/JointPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace hrp {
linkPath.calcForwardKinematics(calcVelocity, calcAcceleration);
}

void calcJacobian(dmatrix& out_J) const;
void calcJacobian(dmatrix& out_J, const Vector3& local_p = Vector3::Zero()) const;

inline dmatrix Jacobian() const {
dmatrix J;
Expand Down