orocos_kinematics_dynamics icon indicating copy to clipboard operation
orocos_kinematics_dynamics copied to clipboard

PyKDL - 'Tree" Object Attribute Error

Open willnil opened this issue 4 years ago • 3 comments
trafficstars

My issue is similar to issue #74, in which I have problems with the 'Tree' object when using PyKDL. I cannot access some of the functions listed in the API.

AttributeError: 'Tree' object has no attribute 'getSegment'

According to issue #74, I think it is not fixed yet as some functions are not exported yet in the kinfam.cpp. I cannot use the functions getSegment, getRootSegment and getSegments.

It would be great if you have updates on this problem. Thanks.

willnil avatar Aug 26 '21 01:08 willnil

I am not sure all functions are possible as we are depending on the functionality of PyBind11. When you have time, please give it a try and open a PR. I may not have time for a month to take a better look at this.

MatthijsBurgh avatar Aug 26 '21 05:08 MatthijsBurgh

I am not sure what the return type of these functions should be. Just the Segment, the TreeElement or the std::pair<std::string,TreeElement>?

I think the best would be to return the map(dict?) for getSegments and the pair(tuple?) for the other functions?

@meyerj @smits Do you have an opinion on this.

edit: This would require adding TreeElement to PyKDL. This requires the parent and children to be handled correctly.

MatthijsBurgh avatar Sep 09 '21 08:09 MatthijsBurgh

@kashifzr I am deleting your comment, just open a new issue. There is zero correlation between your problem and this issue.

MatthijsBurgh avatar Oct 05 '21 09:10 MatthijsBurgh