Skip to content

Some questions about forward dynamic with contact constraint(contact-dynamics.hpp) #2168

Answered by stephane-caron
xiaosuyang asked this question in Q&A
Discussion options

You must be logged in to vote

Constraint Jacobian

You can use the Jacobian of a frame, computed e.g. by computeFrameJacobian, to express your contact constraint $J(q) v = 0$. See also discussion #1455 to learn more about this topic.

Drift term

The drift $\gamma = \dot{J}(q, v) v$ that you are looking for will be in data.a[joint_id] after calling forwardKinematics(model,data,q,v,0*v) (note the zero acceleration 0*v in the last argument). You can also use getFrameAcceleration (or getFrameClassicalAcceleration) to get that acceleration in the frame that corresponds to your Jacobian. See discussion #1395 about this.

(We should also update the documentation to link to this: taking care of this in #2169.)

You can also look …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@josyulakrishna
Comment options

@stephane-caron
Comment options

Answer selected by xiaosuyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants