Segfault while reading Pose2 values from python wrapper

Issue #356 resolved
Lachlan Nicholson created an issue

Similar to Issue#313 a segmentation fault occurs when reading Pose2 data from the values array from the python interface.

Repeatable via:

a = gtsam.Values()
a.insert(1234567, gtsam.Pose2())
a.insert(1234568, gtsam.Pose3())
print(a.atPose3(1234568).translation().vector())
print(a.atPose2(1234567).translation().vector()) 

Comments (8)

  1. Lachlan Nicholson reporter

    I actually wasn't aware that there was a cython wrapper, I'll look into this now!

  2. Lachlan Nicholson reporter

    The cython wrapper seems to retrieve Pose2 values just fine! I am however receiving a segfault with the cython wrapper when trying to access any array.

    e.g

    a = gtsam.Pose3()
    b = a.matrix()
    

    Likely an Eigen issue.

  3. Lachlan Nicholson reporter

    The above issue was resolved by correctly installing the cython python module (or importing from build/cython instead of build/cython/gtsam).

    Just for clarification, the boost::python wrapper still segfaults when accessing a Pose2 element from a Values object as described above. The cython wrapper does not have this issue.

  4. Duy-Nguyen Ta

    Great! Thanks for the information! The python wrapper hasn't been tested thoroughly, but the cython wrapper should be fully functional. If you have other issues with the cython wrapper, please let us know.

  5. Log in to comment