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
KinematicTree: getter for joints #598
Conversation
d18c77d
to
0ecdc83
Compare
Each KDL::Segment has to be associated with a joint. It can be a fixed joint with no transform but it has to have joint by convention. I don't remember how joint and segment names map onto the URDF ones. Our convention was following KDL. Is there a mismatch between the joint/segment naming between KDL and exotica? |
Yes. In plain KDL: kdl_parser::treeFromUrdfModel(*urdf_model, robot_tree);
for(const std::pair<std::string, KDL::TreeElement>& segm : robot_tree.getSegments()) {
const std::string segm_name = segm.second.segment.getName();
const std::string jnt_name = segm.second.segment.getJoint().getName();
std::cout << segm_name << " -> " << jnt_name << std::endl;
} gives the link name for the segment and its attached joint name (here examplarily for a Kinova Jaco):
In EXOTica, the
The |
Good spot. For the |
There seem to be two sets of Do we need different sets of |
There are two sets of elements so that we can keep track of model elements separately from the world elements. Every time you load a new scene, all world elements are destroyed and recreated while the robot elements are kept as they are. The robot model therefore doens't have to be reloaded. It's not the prettiest solution but it removes some complexity of tracking different parts of the scene. Changing this would be great but it would also probably break all the API and it would require a lot of work on code that a lot of our experiment code heavily depends. Especially collision checking, which is why we introduced a lot of this machinery in the first place. |
0ecdc83
to
cfb3914
Compare
I have to revert my statement partially. Only the world frames are named after their joints. The actual robot frames are named correctly. I got confused because EXOTica is using the virtual world joint name as link name, e.g. <virtual_joint name="world_joint" type="floating" parent_frame="world" child_link="root" /> gives:
i.e. the 6 frames for the 6D world pose are named after the joints instead of using the
|
I included a fix that correctly names the world frames:
|
Agree with the fix, I introduced the bug when I fixed the wide-spread floating-base issue (or non-existing support) about two years ago. It will break user code, though. |
39b4570
to
fb765a5
Compare
KinematicTree: getter for joints
This adds getter for the joint elements of the
KinematicTree
.At the moment, the
KinematicElement
s returned byGetControlledJointsMap
have emptyparent_name
and thesegment.getName()
returns the joint name instead of the link name, i.e.segment.getName()
andsegment.getJoint().getName()
both return the same joint name.From http://docs.ros.org/jade/api/orocos_kdl/html/classKDL_1_1Segment.html:
I would assume that the
KDL::Segment
always refers to a frame/link and not a joint.Is this intended?
Edit:
And
closest_robot_link.lock()
is NULL which also appears to be wrong.