brentyi / jaxlie

Rigid transforms + Lie groups in JAX
MIT License
234 stars 15 forks source link

Feature/jlog #22

Open simeon-ned opened 4 months ago

simeon-ned commented 4 months ago

Reduce the size of following text, specifically do not use separate bullet for groups, just make list of them:"Thank you for providing that information. Based on the content you shared, I can summarize the key points:

This pull request adds analytical Jacobians for the logarithm (log) operation for all groups presented in jaxlie. These Jacobians are also known as right inverse Jacobians. They represent the partial derivative of the log operation with respect to the group element:

$$\text{Jlog}(T) = \frac{\partial \log_3(T)}{\partial T}$$

The implementation are based on derivations presented in the "micro Lie theory" paper, specifically equations 41c, 79, 126, 144, 163, and 179. Similar functionality is also implemented in established robotics libraries like Pinocchio, indicating the practical importance of these Jacobians in robotics applications.

brentyi commented 4 months ago

Actually, for SE(2) and SE(3), are you able to reuse/refactor the code for the "V" and "V_inv" matrices? https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se2.py#L164-L175 https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se3.py#L142-L159 https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se2.py#L208-L221 https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se3.py#L183-L205

These already seem to describe the parts of the left/right Jacobians that are the trickiest to compute.

simeon-ned commented 4 months ago

Actually, for SE(2) and SE(3), are you able to reuse/refactor the code for the "V" and "V_inv" matrices?

https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se2.py#L164-L175

https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se3.py#L142-L159

https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se2.py#L208-L221

https://github.com/brentyi/jaxlie/blob/84babf5c04ba6287cdec250ab1eed2f6d0a53988/jaxlie/_se3.py#L183-L205

These already seem to describe the parts of the left/right Jacobians that are the trickiest to compute.

Great suggestion, should I encupsulate V, V_inv in to separate method or create standalone function similar to _skew in SE3?

brentyi commented 4 months ago

I'd vote for a helper function for now so it's not exposed in the API, it's easier to add things to the API later than to remove them!