Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Oct 13, 2024
1 parent 674542a commit a66fc4b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,25 @@ problems. We accelerate optimization by analyzing the structure of graphs:
repeated factor and variable types are vectorized, and the sparsity of adjacency
in the graph is translated into sparse matrix operations.

Use cases are primarily in least squares problems that are (1) sparse and (2)
inefficient to solve with gradient-based methods.

Currently supported:

- Automatic sparse Jacobians.
- Optimization on manifolds like SO(2), SO(3), SE(2), and SE(3).
- Optimization on manifolds.
- Examples provided for SO(2), SO(3), SE(2), and SE(3).
- Nonlinear solvers: Levenberg-Marquardt and Gauss-Newton.
- Multiple solvers for linear subproblems:
- Linear subproblem solvers:
- Sparse direct with Cholesky / CHOLMOD, on CPU.
- Sparse iterative with Conjugate Gradient.
- Preconditioning: block and point Jacobi.
- Inexact Newton via Eisenstat-Walker.
- Dense Cholesky for smaller problems.

Use cases are primarily in least squares problems that are inherently (1)
sparse and (2) inefficient to solve with gradient-based methods. These are
common in robotics.

For the first iteration of this library, written for
[IROS 2021](https://github.com/brentyi/dfgo), see
[jaxfg](https://github.com/brentyi/jaxfg). `jaxls` is a rewrite that aims to be
faster and easier to use. For additional references, see inspirations like
For the first iteration of this library, written for [IROS 2021](https://github.com/brentyi/dfgo), see
[jaxfg](https://github.com/brentyi/jaxfg). `jaxls` is a rewrite that is faster
and easier to use. For additional references, see inspirations like
[GTSAM](https://gtsam.org/), [Ceres Solver](http://ceres-solver.org/),
[minisam](https://github.com/dongjing3309/minisam),
[SwiftFusion](https://github.com/borglab/SwiftFusion),
Expand Down
2 changes: 1 addition & 1 deletion examples/pose_graph_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
graph = jaxls.FactorGraph.make(factors, vars)

# Solve the optimization problem.
solution = graph.solve(linear_solver=jaxls.DenseLinearSolver())
solution = graph.solve()
print("All solutions", solution)
print("Pose 0", solution[vars[0]])
print("Pose 1", solution[vars[1]])
6 changes: 3 additions & 3 deletions src/jaxls/_preconditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def make_point_jacobi_precoditioner(
block_l2_cols = jnp.sum(block_row.blocks_concat**2, axis=1).flatten()
indices = jnp.concatenate(
[
(start_col[:, None] + jnp.arange(width)[None, :])
for start_col, width in zip(
block_row.start_cols, block_row.block_widths
(start_col[:, None] + jnp.arange(block_cols)[None, :])
for start_col, block_cols in zip(
block_row.start_cols, block_row.block_num_cols
)
],
axis=1,
Expand Down

0 comments on commit a66fc4b

Please sign in to comment.