Tree ID solver and Tree/TreeElement class extension
Rohan Smith <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <[email protected]> |
I'm interested in writing a tree ID solver based on the current chain ID
solver. The first issues I can think of is the lack of a q, q_dot, and
q_dotdot, and that the ChainIdSolver uses a JntArray, which won't work
for a tree. Given that these are only used for calculation of other
pieces of information, a map<std::string, Eigen::Vector3d> could work
but since they're only used in a few places, the time it takes to
retrieve them from the map may overshadow the time it takes to use them.
The next is the frames, twists, and wrenches of the tree, which can be
in a map<std::string, etc> and just copied locally and written back when
they're no longer needed.
Before I spend a decent amount of time on this, I'd like to get others'
feedback about how they would go about it.
Some root->leaf->root functions:
int TreeIdSolver_RNE::CartToJnt(const Tree &tree)
{
// Calculate things such as v, a, f, for the root segment
SegmentMap::const_iterator iter;
for (iter = tree.getRootSegment().children.begin(); iter !=
tree.getRootSegment().children.end(); iter++)
{
RecursiveSolver(iter);
}
// Calculate torque for root segment
}
int TreeIdSolver_RNE::RecursiveSolver(const
SegmentMap::const_iterator& current)
{
// Calculate things such as X, S, v, a, f, then continue
SegmentMap::const_iterator children;
for (children = current->children.begin(); children !=
current->children.end(); children++)
{
RecursiveSolver(children);
}
// Calculate torque for the segment
}
--
Cheers,
Rohan Smith
--
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev