borglab / borglab/wrap

Separate Pybind modules for inner namespaces

Open
#49 6 comments 0 reactions 2 assignees Claimed by @ProfFan View on GitHub
Dominant language
C++
Stars
37
Forks
17
Avg merge
1d 4h
Merged PRs (30d)
9

Description

## Feature

Currently, all namespaces under the top level `gtsam` (e.g. `symbol_shorthand`) are added as pybind submodules. This requires the python import to look like

```python
from gtsam.gtsam.symbol_shorthand import X
```

aka a gtsam module inside a gtsam module.

We can get rid of the inner gtsam module by configuring the pybind wrapper to create separate modules for all the inner namespaces, allowing us to do

```python
from gtsam.symbol_shorthand import X
```

which is more intuitive and neater, especially since `import gtsam.symbol_shorthand` works.

## Motivation

Outlined above.

## Pitch

Update the Pybind wrapper to have separate modules for each inner namespace.
Currently there are 5:

- [ ] noiseModel
- [ ] mEstimator
- [ ] symbol_shorthand
- [ ] imuBias
- [ ] utilities

## Alternatives

N/A

## Additional context

@ProfFan should be able to provide details on whether this is doable without breaking other stuff since he's the lead on the Pybind wrapper. :-)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.