Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Nov 28, 2024
1 parent 2f5dc15 commit d920e2f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Where each group supports:
**`adjoint()`**, **`apply()`**, **`multiply()`**, **`inverse()`**,
**`identity()`**, **`from_matrix()`**, and **`as_matrix()`** operations. (see
[./examples/se3_example.py](./examples/se3_basics.py))
- Taylor approximations near singularities.
- Helpers for optimization on manifolds (see
[./examples/se3_optimization.py](./examples/se3_optimization.py),
<code>jaxlie.<strong>manifold.\*</strong></code>).
Expand All @@ -78,24 +79,10 @@ pip install jaxlie

---

### In the wild

- [jaxfg](https://github.com/brentyi/jaxfg) applies `jaxlie` to nonlinear least
squares problems with block-sparse structure. (for pose graph optimization,
bundle adjustment, etc)
- [tensorf-jax](https://github.com/brentyi/tensorf-jax) is an unofficial
implementation of
[Tensorial Radiance Fields (Chen et al, ECCV 2022)](https://apchenstu.github.io/TensoRF/)
using `jaxlie`.
![Render of a lego](https://github.com/brentyi/tensorf-jax/raw/main/lego_render.gif)

---

### Misc

`jaxlie` was originally written for our IROS 2021 paper
([link](https://github.com/brentyi/dfgo)). If it's useful for you, you're
welcome to cite:
`jaxlie` was originally written when I was learning about Lie groups for our IROS 2021 paper
([link](https://github.com/brentyi/dfgo)):

```
@inproceedings{yi2021iros,
Expand Down
4 changes: 2 additions & 2 deletions jaxlie/_se2.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def exp(cls, tangent: hints.Array) -> "SE2":
jax.Array,
jnp.where(
use_taylor,
jnp.ones_like(theta), # Any non-zero value should do here.
1.0, # Any non-zero value should do here.
theta,
),
)
Expand Down Expand Up @@ -193,7 +193,7 @@ def log(self) -> jax.Array:
# reverse-mode AD.
safe_cos_minus_one = jnp.where(
use_taylor,
jnp.ones_like(cos_minus_one), # Any non-zero value should do here.
1.0, # Any non-zero value should do here.
cos_minus_one,
)

Expand Down
4 changes: 2 additions & 2 deletions jaxlie/_se3.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def exp(cls, tangent: hints.Array) -> SE3:
jax.Array,
jnp.where(
use_taylor,
jnp.ones_like(theta_squared), # Any non-zero value should do here.
1.0, # Any non-zero value should do here.
theta_squared,
),
)
Expand Down Expand Up @@ -173,7 +173,7 @@ def log(self) -> jax.Array:
# reverse-mode AD.
theta_squared_safe = jnp.where(
use_taylor,
jnp.ones_like(theta_squared), # Any non-zero value should do here.
1.0, # Any non-zero value should do here.
theta_squared,
)
del theta_squared
Expand Down
2 changes: 1 addition & 1 deletion jaxlie/_so3.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def exp(cls, tangent: hints.Array) -> SO3:
safe_theta = jnp.sqrt(
jnp.where(
use_taylor,
jnp.ones_like(theta_squared), # Any constant value should do here.
1.0, # Any constant value should do here.
theta_squared,
)
)
Expand Down

0 comments on commit d920e2f

Please sign in to comment.