33 #include "dart/dynamics/ReferentialSkeleton.hpp" 35 #ifndef DART_DYNAMICS_GROUP_HPP_ 36 # define DART_DYNAMICS_GROUP_HPP_ 49 const std::string& _name =
"Group",
50 const std::vector<BodyNode*>& _bodyNodes = std::vector<BodyNode*>(),
51 bool _includeJoints =
true,
52 bool _includeDofs =
true);
59 const std::string& _name,
60 const std::vector<DegreeOfFreedom*>& _dofs,
61 bool _includeBodyNodes =
true,
62 bool _includeJoints =
true);
66 const std::string& _name,
const MetaSkeletonPtr& _metaSkeleton);
69 virtual ~Group() =
default;
75 GroupPtr
cloneGroup(
const std::string& cloneName)
const;
82 const std::string& cloneName)
const override;
105 const std::vector<BodyNode*>& _bodyNodes,
bool _warning =
true);
122 const std::vector<BodyNode*>& _bodyNodes,
bool _warning =
true);
138 const std::vector<BodyNode*>& _bodyNodes,
bool _warning =
true);
154 const std::vector<BodyNode*>& _bodyNodes,
bool _warning =
true);
163 bool addJoint(
Joint* _joint,
bool _addDofs =
true,
bool _warning =
true);
174 const std::vector<Joint*>& _joints,
175 bool _addDofs =
true,
176 bool _warning =
true);
187 Joint* _joint,
bool _removeDofs =
true,
bool _warning =
true);
198 const std::vector<Joint*>& _joints,
199 bool _removeDofs =
true,
200 bool _warning =
true);
220 const std::vector<DegreeOfFreedom*>& _dofs,
221 bool _addJoint =
true,
222 bool _warning =
true);
233 DegreeOfFreedom* _dof,
bool _cleanupJoint =
true,
bool _warning =
true);
244 const std::vector<DegreeOfFreedom*>& _dofs,
245 bool _cleanupJoint =
true,
246 bool _warning =
true);
251 const std::string& _name,
252 const std::vector<BodyNode*>& _bodyNodes,
258 const std::string& _name,
259 const std::vector<DegreeOfFreedom*>& _dofs,
260 bool _includeBodyNodes,
261 bool _includeJoints);
264 Group(
const std::string& _name,
const MetaSkeletonPtr& _metaSkeleton);
270 #endif // DART_DYNAMICS_GROUP_HPP_ bool addComponent(BodyNode *_bn, bool _warning=true)
Add a BodyNode and its parent DegreesOfFreedom to this Group.
Definition: Group.cpp:255
void swapDofIndices(std::size_t _index1, std::size_t _index2)
Swap the index of DegreeOfFreedom _index1 with _index2.
Definition: Group.cpp:201
virtual ~Group()=default
Destructor.
class Joint
Definition: Joint.hpp:57
bool addJoints(const std::vector< Joint *> &_joints, bool _addDofs=true, bool _warning=true)
Add a set of Joints to this Group.
Definition: Group.cpp:480
bool removeComponents(const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
Remove a set of BodyNodes and their parent DegreesOfFreedom from this Group.
Definition: Group.cpp:333
bool addDofs(const std::vector< DegreeOfFreedom *> &_dofs, bool _addJoint=true, bool _warning=true)
Add a set of DegreesOfFreedom to this Group.
Definition: Group.cpp:600
Group(const std::string &_name, const std::vector< BodyNode *> &_bodyNodes, bool _includeJoints, bool _includeDofs)
Default constructor.
Definition: Group.cpp:692
bool addBodyNode(BodyNode *_bn, bool _warning=true)
Add a BodyNode to this Group.
Definition: Group.cpp:344
Definition: Aspect.cpp:40
bool removeComponent(BodyNode *_bn, bool _warning=true)
Remove a BodyNode and its parent DegreesOfFreedom from this Group.
Definition: Group.cpp:299
bool addComponents(const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
Add set of BodyNodes and their parent DegreesOfFreedom to this Group.
Definition: Group.cpp:288
bool removeDof(DegreeOfFreedom *_dof, bool _cleanupJoint=true, bool _warning=true)
Remove a DegreeOfFreedom from this Group.
Definition: Group.cpp:611
GroupPtr cloneGroup() const
Creates and returns a clone of this Group.
Definition: Group.cpp:76
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:74
DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coord...
Definition: DegreeOfFreedom.hpp:54
ReferentialSkeleton is a base class used to implement Linkage, Group, and other classes that are used...
Definition: ReferentialSkeleton.hpp:47
bool addBodyNodes(const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
Add a set of BodyNodes to this Group.
Definition: Group.cpp:376
bool removeBodyNodes(const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
Remove a set of BodyNodes from this Group.
Definition: Group.cpp:420
bool addJoint(Joint *_joint, bool _addDofs=true, bool _warning=true)
Add a Joint to this Group.
Definition: Group.cpp:431
bool removeJoint(Joint *_joint, bool _removeDofs=true, bool _warning=true)
Remove a Joint from this Group.
Definition: Group.cpp:491
bool addDof(DegreeOfFreedom *_dof, bool _addJoint=true, bool _warning=true)
Add a DegreeOfFreedom to this Group.
Definition: Group.cpp:554
void swapBodyNodeIndices(std::size_t _index1, std::size_t _index2)
Swap the index of BodyNode _index1 with _index2.
Definition: Group.cpp:151
bool removeBodyNode(BodyNode *_bn, bool _warning=true)
Remove a BodyNode from this Group.
Definition: Group.cpp:387
bool removeDofs(const std::vector< DegreeOfFreedom *> &_dofs, bool _cleanupJoint=true, bool _warning=true)
Remove a set of DegreesOfFreedom from this Group.
Definition: Group.cpp:679
bool removeJoints(const std::vector< Joint *> &_joints, bool _removeDofs=true, bool _warning=true)
Remove a set of Joints from this Group.
Definition: Group.cpp:543
static GroupPtr create(const std::string &_name="Group", const std::vector< BodyNode *> &_bodyNodes=std::vector< BodyNode *>(), bool _includeJoints=true, bool _includeDofs=true)
Create a Group out of a set of BodyNodes.
Definition: Group.cpp:43