Closed RunOrVeith closed 3 years ago
Hi @RunOrVeith. I've experienced this before and I actually came up with a simple fix for this. My apologies for not adding the fix here sooner. I'll get on it.
@RunOrVeith I've added the fix in the linked PR. It's a simple 1-line change that you can temporarily add in to get things going before we land the PR. :slightly_smiling_face:
If you inherit a gtsam class such as gtsam::NoiseModelFactor2, you need to import gtsam before your own python module, otherwise it will crash due to something similar to this issue.
It took us quite some time to find what the issue is, because the error is not very clear.
Results in the following error. VelocityFactor is the custom factor that I implemented, it inherits from gtsam::NoiseModelFactor2 and is exposed in the header as
It works if you do
I wonder if the import could be autogenerated inside the genreated toplevel
__init__.py
file that at the moment only doesfrom .my_module import *
.