-
Notifications
You must be signed in to change notification settings - Fork 42
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
Gradients w.r.t. joint displacements #28
Comments
Related to #8 that came with a similar request but was not followed up upon by the original poster |
Hi Jonathan, thanks for your interest! We haven't worked towards anything like this, but it sounds interesting. Feel free to work on it and post your thoughts and questions here, and we can chime in. I suspect it'll take some work though. Some initial thoughts: |
I will start working on it to provide a prototype based on M-DH parameters after Craig. To this purpose, I wrote a Regarding the batching: My first attempt was to create a |
I see two approaches:
Either way, I don't think you need a separate Currently, for efficiency reasons the link and joint offsets are computed at construction time and cached (assumed constant). They're used inside the methods in ways such as: link_offset_i = self.link_offsets[chain_idx]
if link_offset_i is not None:
frame_transform = frame_transform @ link_offset_i
joint_offset_i = self.joint_offsets[chain_idx]
if joint_offset_i is not None:
frame_transform = frame_transform @ joint_offset_i So it's pretty easy to insert in arguments |
I pushed a first draft to #32 and would be happy to discuss it |
Dear pytorch kinematics team, thank you for this amazing repo!
I am interested in computing the FK gradients, but not only w.r.t joint angles, but also with respect to the robot morphology (for my purpose, it is sufficient to say it is captured by the joint displacements). A naive approach is to just monkey-patch the current implementation and setting
requires_grad=True
for the displacement matrices.However, usually, joint displacements are parameterized in robotics, most commonly using (modified) DH-parameters. Alternatively, a fully flexible 6D (displacement + axis angle) parameterization would be of interest to me to compute the gradient w.r.t. these parameters only.
Did you do any development in this direction yet? If not so, I could start working on a PR if this is a feature of interest for the repository -- would this be a feature you would be willing to support in the future given an initial implementation?
The text was updated successfully, but these errors were encountered: