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

[QUESTION] What is the joint angle target for JOINT_MODE_TARGET_POSTION? #373

Open
lisiyao21 opened this issue Nov 29, 2024 · 0 comments
Open
Assignees
Labels
question The issue author requires information

Comments

@lisiyao21
Copy link

lisiyao21 commented Nov 29, 2024

Hi! Thanks for this great work! I wish to know what is the target for joint_6d angles when using JOINT_MODE_TARGET_POSTION?
When I use joint_6d with only 3 rotational freedom, should the "positional" target here be joint rotation?

But It seems not to be axis angle. In XPBD integrator code:

    rel_q = wp.quat_inverse(q_p) * q_c
    qtwist = wp.normalize(wp.quat(rel_q[0], 0.0, 0.0, rel_q[3]))
    qswing = rel_q * wp.quat_inverse(qtwist)

    # decompose to a compound rotation each axis
    s = wp.sqrt(rel_q[0] * rel_q[0] + rel_q[3] * rel_q[3])
    invs = 1.0 / s
    invscube = invs * invs * invs

    # handle axis-angle joints

    # rescale twist from quaternion space to angular
    err_0 = 2.0 * wp.asin(wp.clamp(qtwist[0], -1.0, 1.0))
    err_1 = qswing[1]
    err_2 = qswing[2]

When setting joint_act, should I first transform the rotvec (axis angle) to such decomposition? thanks!

@lisiyao21 lisiyao21 added the question The issue author requires information label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue author requires information
Projects
None yet
Development

No branches or pull requests

2 participants