Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Iterator over Variables and FactorGraph in Python #6

Open
itzsid opened this issue Dec 16, 2019 · 1 comment
Open

Iterator over Variables and FactorGraph in Python #6

itzsid opened this issue Dec 16, 2019 · 1 comment
Assignees
Labels
new feature Request new feature

Comments

@itzsid
Copy link

itzsid commented Dec 16, 2019

Hi Jing/Zhaoyang,

Great work with the library especially the Python wrapper. I was playing with it and I was not able to iterate over Variables. I could iterate over FactorGraph but I was not able to extract anything out of each factor.

I tried iterating like this:

 for key in initials:
     print(key)

And I get an error:

Traceback (most recent call last):
  File "gps_factor_example.py", line 109, in <module>
    for key in initials:
KeyError: '[python::Variables] key does not exist'

Wondering if I am doing something wrong or this is not supported yet.

@dongjing3309
Copy link
Owner

Hi Sidd @itzsid ! I don't think the key iterator is implemented now. I will have a look, and if you want to have a look ahead, the location of the python binding of Variables is at python/minisam_wrapper/variables.cpp, which needs some pybind11 knowledge to understand :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
new feature Request new feature
Projects
None yet
Development

No branches or pull requests

2 participants