Skip to content

Separate Pybind modules for inner namespaces #49

Description

@varunagrawal

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

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

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. :-)

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions