OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

set_origin() Function gone?

Open Fsamhouri opened this issue 3 years ago • 1 comments

I was reading through the OpenSfM documentation as I am trying to set my own coordinate frame for reconstruction. To set our own coordinate frame, we are told to use set_origin(). After looking through the repo, it appears as though get_origin() and set_origin() are no longer in the types.py file. Was this feature removed from OpenSfM competely? Is there another way to set our own coordinate frame?

Fsamhouri avatar Feb 14 '23 10:02 Fsamhouri

Hi @Fsamhouri ,

A simple search through the code would have yielded the result: https://github.com/mapillary/OpenSfM/blob/21c22a9b3a506dcc6da4f4a0931a6b6b56019fb8/opensfm/src/geometry/python/pybind.cc#L341

Simply use shot.pose.set_origin(...) and shot.pose.get_origin(). We moved most of the Python types to C++, so that's why they are exposed via Python bindings.

Good luck, Fabian

fabianschenk avatar Feb 14 '23 15:02 fabianschenk