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

KDL doing magic stuff #348

Closed
MatthijsBurgh opened this issue Jul 18, 2017 · 5 comments
Closed

KDL doing magic stuff #348

MatthijsBurgh opened this issue Jul 18, 2017 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@MatthijsBurgh
Copy link
Member

Not working in amigo-console and in rosrun

robot.base.get_location().frame.p
[           0,     4.14262,           0]

location = robot.base.get_location()
location.frame.p
[     1.36757,     4.14262,           0]

frame = robot.base.get_location().frame
frame.p
[     1.36757,     4.14262,           0]

p = robot.base.get_location().frame.p
p
[           0,     4.14262,           0]

robot.base.get_location().extractVectorStamped()
[           0,     4.14262,           0] @ /map

VS = robot.base.get_location().extractVectorStamped()
VS
[           0,     4.14262,           0] @ /map

location = robot.base.get_location()
location.extractVectorStamped()
[     1.36757,     4.14262,           0] @ /map

VS = location.extractVectorStamped()
VS
[     1.36757,     4.14262,           0] @ /map

fs = kdl_conversions.FrameStamped(kdl.Frame(kdl.Rotation.Quaternion(1, 0, 0, 0), kdl.Vector(1, 2, 3)), "/map")
fs.extractVectorStamped()
[           1,           2,           3] @ /map
@MatthijsBurgh MatthijsBurgh added the bug Something isn't working label Jul 18, 2017
@LoyVanBeek
Copy link
Member

What's funny is that only the x value is acting weird.

I'm suspecting some pointed-at values getting lost or a simple conversion issue

@MatthijsBurgh
Copy link
Member Author

extractVectorStamped() can be fixed by using return deepcopy(XXX)

@MatthijsBurgh
Copy link
Member Author

import PyKDL as kdl
rot = kdl.Rotation.Quaternion(1, 0, 0, 0)
trans = kdl.Vector(1, 2, 3)
frame=kdl.Frame(rot, trans)
print "\nframe.p"
print frame.p
print "\nkdl.Frame(frame)"
print kdl.Frame(frame)
print "\nkdl.Frame(frame).p"
print kdl.Frame(frame).p

This shows the real fault. No code from us at all. So It has to be a bug in PyKDL

@MatthijsBurgh
Copy link
Member Author

Issue is already known:
orocos/orocos_kinematics_dynamics#41

@MatthijsBurgh
Copy link
Member Author

Also solved by building PyKDL from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants