Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

PyKDL with Ubuntu 16.04 does not access correct memory when creating or copying frames. #129

Closed
daenny opened this issue Feb 8, 2018 · 6 comments

Comments

@daenny
Copy link

daenny commented Feb 8, 2018

When copying or creating a new KDL frame and directly accessing the vector or rotation matrix, the result is not correct.
It seems as if not the correct memory is accessed. When splitting the creation and the access in two lines it works as expected.
See code below (tested with: Linux 4.13.0-32-generic #35~16.04.1-Ubuntu)

# coding: utf-8
import PyKDL as kdl
a = kdl.Frame(kdl.Rotation.RPY(1,2,3), kdl.Vector(1,2,3)).p
a
# [6.91476e-310,6.91476e-310,6.91476e-310]
a = kdl.Frame(kdl.Rotation.RPY(1,2,3), kdl.Vector(1,2,3))
a.p
# [           1,           2,           3]
b = (kdl.Frame() * a).p
b
# [6.91476e-310,6.91476e-310,6.91476e-310]
import copy
copy.deepcopy(a).p
# [6.91476e-310,6.91476e-310,6.91476e-310]

Under 14.04 this code works as expected.

@daenny
Copy link
Author

daenny commented Feb 22, 2018

It seems that this is as SIP issue. See the other issue. SIP above 4.16.8 generates python bindings which do not work correctly and above 4.19 it even segfaults on import...

@smits
Copy link
Member

smits commented Mar 28, 2018

I can reproduce this, no idea on how to fix this yet though.

@mrana6
Copy link

mrana6 commented Jun 17, 2019

Has anyone fixed this yet? Im getting seg faults on running PyKDL on 16.04. Im using sip 4.19.8

@MatthijsBurgh
Copy link
Collaborator

Please check my comment in #41 for possible fixes

@MatthijsBurgh
Copy link
Collaborator

PR for PyKDL based on PyBind11 is open: #229

python-sip fix is also pending for approval in ubuntu launchpad, so that should also be released in a few weeks.

@MatthijsBurgh
Copy link
Collaborator

A fixed version of python-sip is now available on updates both for Xenial and Bionic.

@daenny daenny closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants