Skip to content

Commit

Permalink
Fix a bug in inverseKinBackend. Restore the 'active' property in Quas…
Browse files Browse the repository at this point in the history
…iStaticConstraint
  • Loading branch information
hongkai-dai committed Feb 27, 2014
1 parent 8108191 commit da48409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion systems/plants/@RigidBodyManipulator/inverseKinBackend.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
end
ikoptions = varargin{end};
% qsc = QuasiStaticConstraint(obj);
qsc = QuasiStaticConstraint(obj,1);
qsc = QuasiStaticConstraint(obj,[-inf,inf],1);
qsc = qsc.setActive(false);
[joint_min,joint_max] = obj.getJointLimits();
joint_min = bsxfun(@times,joint_min,ones(1,nT));
Expand Down
3 changes: 2 additions & 1 deletion systems/plants/constraint/RigidBodyConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ QuasiStaticConstraint::QuasiStaticConstraint(RigidBodyManipulator* robot, const
{
this->m_robotnumset = robotnumset;
this->shrinkFactor = 0.9;
this->active = false;
this->num_bodies = 0;
this->num_pts = 0;
this->type = RigidBodyConstraint::QuasiStaticConstraintType;
}

QuasiStaticConstraint::QuasiStaticConstraint(const QuasiStaticConstraint &rhs):RigidBodyConstraint(rhs),m_robotnumset(rhs.m_robotnumset),shrinkFactor(rhs.shrinkFactor),num_bodies(rhs.num_bodies),num_pts(rhs.num_pts),bodies(rhs.bodies),num_body_pts(rhs.num_body_pts),body_pts(rhs.body_pts)
QuasiStaticConstraint::QuasiStaticConstraint(const QuasiStaticConstraint &rhs):RigidBodyConstraint(rhs),m_robotnumset(rhs.m_robotnumset),shrinkFactor(rhs.shrinkFactor),active(rhs.active),num_bodies(rhs.num_bodies),num_pts(rhs.num_pts),bodies(rhs.bodies),num_body_pts(rhs.num_body_pts),body_pts(rhs.body_pts)
{
}

Expand Down

0 comments on commit da48409

Please sign in to comment.