Go to the documentation of this file.
9 typedef unsigned int uint;
81 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
88 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
95 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
102 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
109 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
116 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
123 CPPUNIT_ASSERT_EQUAL(f1,s.
pose(q));
149 Chain chain2 = chain1;
158 bool isSubtree(
const SegmentMap::const_iterator container,
const SegmentMap::const_iterator contained);
173 CPPUNIT_ASSERT(tree1.
addSegment(segment1,
"root"));
174 CPPUNIT_ASSERT(tree1.
addSegment(segment2,
"root"));
175 CPPUNIT_ASSERT(tree1.
addSegment(segment3,
"Segment 1"));
176 CPPUNIT_ASSERT(tree1.
addSegment(segment4,
"Segment 3"));
177 CPPUNIT_ASSERT(!tree1.
addSegment(segment1,
"Segment 6"));
178 CPPUNIT_ASSERT(!tree1.
addSegment(segment1,
"Segment 4"));
183 CPPUNIT_ASSERT(tree2.
addSegment(segment5,
"root"));
184 CPPUNIT_ASSERT(tree2.
addSegment(segment6,
"root"));
185 CPPUNIT_ASSERT(tree2.
addSegment(segment7,
"Segment 6"));
204 CPPUNIT_ASSERT(tree2.
addChain(chain1,
"Segment 6"));
206 CPPUNIT_ASSERT(tree1.
addTree(tree2,
"Segment 2"));
209 Chain extract_chain1;
210 CPPUNIT_ASSERT(tree1.
getChain(
"Segment 2",
"Segment 4", extract_chain1));
211 Chain extract_chain2;
212 CPPUNIT_ASSERT(tree1.
getChain(
"Segment 4",
"Segment 2", extract_chain2));
213 CPPUNIT_ASSERT(tree1.
getChain(
"Segment 4",
"Segment 2", extract_chain2));
229 CPPUNIT_ASSERT(f1 == f2.
Inverse());
233 CPPUNIT_ASSERT(tree1.
getSubTree(subroot, subtree));
251 bool isSubtree(
const SegmentMap::const_iterator container,
const SegmentMap::const_iterator contained) {
253 if(container->first != contained->first)
257 for(
unsigned int i=0; i < children.
size(); i++) {
261 if((*it)->first == children[i]->first)
std::string tree2str(const SegmentMap::const_iterator it, const std::string &separator, const std::string &preamble, unsigned int level)
void addChain(const Chain &chain)
Frame Inverse() const
Gives back inverse transformation of a Frame.
SegmentMap::const_iterator getRootSegment() const
const Joint & getJoint() const
Twist twist(const double &qdot) const
IMETHOD void random(doubleVel &F)
Vector p
origine of the Frame
CPPUNIT_TEST_SUITE_REGISTRATION(KinFamTest)
static Rotation RotY(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
bool isSubtree(const SegmentMap::const_iterator container, const SegmentMap::const_iterator contained)
#define GetTreeElementChildren(tree_element)
unsigned int getNrOfSegments() const
Frame pose(const double &q) const
A concrete implementation of a 3 dimensional vector class.
represents both translational and rotational velocities.
bool addChain(const Chain &chain, const std::string &hook_name)
static Rotation RotZ(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Frame pose(const double &q) const
represents a frame transformation in 3D space (rotation + translation)
virtual int JntToCart(const JntArray &q_in, Frame &p_out, int segmentNr=-1)
bool getSubTree(const std::string &segment_name, Tree &tree) const
Twist twist(const double &q, const double &qdot) const
This class encapsulates a tree kinematic interconnection structure. It is built out of segments.
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body ine...
bool addSegment(const Segment &segment, const std::string &hook_name)
Twist RefPoint(const Vector &v_base_AB) const
void addSegment(const Segment &segment)
bool addTree(const Tree &tree, const std::string &hook_name)
bool getChain(const std::string &chain_root, const std::string &chain_tip, Chain &chain) const
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
const JointType & getType() const
This class encapsulates a simple joint, that is with one parameterized degree of freedom and with sca...
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
SegmentMap::const_iterator getSegment(const std::string &segment_name) const
unsigned int getNrOfJoints() const