Skip to content

add a default warpper#3

Open
haleqiu wants to merge 3 commits into
MarkChenYutian:mainfrom
haleqiu:main
Open

add a default warpper#3
haleqiu wants to merge 3 commits into
MarkChenYutian:mainfrom
haleqiu:main

Conversation

@haleqiu

@haleqiu haleqiu commented Mar 15, 2026

Copy link
Copy Markdown

Warp-accelerated drop-in replacement for PyPose Lie operations.

# Warp-accelerated (default for most code)
import PyposeWarp as pp
R = pp.SO3(torch.tensor([0., 0., 0., 1.]))  # warp-backed
w = pp.so3(torch.zeros(3)).Exp()             # warp Exp kernel
T = pp.identity_SE3(batch_size)              # warp-backed identity
# Generic pypose fallback (for modules not yet supported, e.g. EKF Jacobians)
import PyposeWarp.generic as pp
R = pp.SO3(torch.tensor([0., 0., 0., 1.]))  # original pypose
J = torch.autograd.functional.jacobian(f, x, vectorize=True)  # works

Both can coexist in the same process. PyposeWarp patches pypose globally
on import, including pypose.module.IMUPreintegrator internals. The generic
submodule provides a snapshot of the original constructors for code that needs
autograd Jacobian compatibility.

haleqiu added 3 commits March 14, 2026 22:09
…ule-level exports

Warp-backed constructors (SO3, so3, SE3, se3, identity_*, randn_*,
euler2SO3, mat2SO3, mat2SE3, from_matrix) are now local module
attributes. __getattr__ delegates non-Lie APIs to the unpatched pypose
module, allowing PyposeWarp and pypose to coexist without interference.

Made-with: Cursor
Comment thread __init__.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit concerned about this - the export pipeline seems too complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants