The Criteria class is used to specify how a Linkage should be constructed.
More...
#include <Linkage.hpp>
|
struct | Target |
| This structure defines targets for the expansion criteria and the desired behavior for those targets. More...
|
|
struct | Terminal |
| Any expansion performed by the criteria will be halted if mTerminal is reached. More...
|
|
|
std::vector< BodyNode * > | satisfy () const |
| Return a vector of BodyNodes that satisfy the parameters of the Criteria.
|
|
| Criteria ()=default |
| Constructs an empty criteria that will lead to creating an empty Linkage.
|
|
| Criteria (BodyNode *start, BodyNode *target, bool includeUpstreamParentJoint=false) |
| Utility constructor to create a contiguous sequence of BodyNodes that doesn't include branches in it. More...
|
|
|
Target | mStart |
| This Target will serve as the starting point for the criteria satisfaction.
|
|
std::vector< Target > | mTargets |
| The Linkage will extend from mStart to each of these targets. More...
|
|
std::vector< Terminal > | mTerminals |
| Any expansion (whether from an ExpansionPolicy or an attempt to reach an entry in mTargets) will be halted if it reaches any entry in mTerminal.
|
|
|
void | refreshTerminalMap () const |
| Refresh the content of mMapOfTerminals.
|
|
void | expansionPolicy (BodyNode *_start, ExpansionPolicy _policy, std::vector< BodyNode *> &_bns) const |
| Satisfy the expansion policy of a target.
|
|
void | expandDownstream (BodyNode *_start, std::vector< BodyNode *> &_bns, bool _includeStart) const |
| Expand downstream.
|
|
void | expandUpstream (BodyNode *_start, std::vector< BodyNode *> &_bns, bool _includeStart) const |
| Expand upstream.
|
|
void | expandToTarget (const Target &_start, const Target &_target, std::vector< BodyNode *> &_bns) const |
| Construct a path from start to target.
|
|
std::vector< BodyNode * > | climbToTarget (BodyNode *_start, BodyNode *_target) const |
| Expand upwards from the _start BodyNode to the _target BodyNode.
|
|
std::vector< BodyNode * > | climbToCommonRoot (const Target &_start, const Target &_target, bool _chain) const |
| Expand upwards from both BodyNodes to a common root.
|
|
void | trimBodyNodes (std::vector< BodyNode *> &_bns, bool _chain, bool _movingUpstream) const |
| Crawl through the list and cut it off anywhere that the criteria is violated.
|
|
The Criteria class is used to specify how a Linkage should be constructed.
◆ ExpansionPolicy
The ExpansionPolicy indicates how the collection of BodyNodes should expand from the starting BodyNode (mStart)
Enumerator |
---|
INCLUDE | Do not expand from the target.
Include everything up to the target and then stop.
|
EXCLUDE | Do not expand from the target.
Include everything up to the target, but NOT the target, and then stop.
|
DOWNSTREAM | Include the target, and then expand downstream, toward the leaves of the tree.
|
UPSTREAM | Include the target, and then expand upstream, toward the root of the tree.
|
◆ Criteria()
dart::dynamics::Linkage::Criteria::Criteria |
( |
BodyNode * |
start, |
|
|
BodyNode * |
target, |
|
|
bool |
includeUpstreamParentJoint = false |
|
) |
| |
Utility constructor to create a contiguous sequence of BodyNodes that doesn't include branches in it.
The start and target can be interchangeably set if both are included in the sequence.
- Parameters
-
[in] | start | The first BodyNode in the sequence. If nullptr is passed the sequence will expand from target to the root. |
[in] | target | The second BodyNode in the sequence. If nullptr is passed the sequence will expand from start to the root. |
[in] | includeUpstreamParentJoint | Set this to true if the parent joint of whichever is upstream of the other should be included. |
◆ mTargets
std::vector<Target> dart::dynamics::Linkage::Criteria::mTargets |
The Linkage will extend from mStart to each of these targets.
Each BodyNode along the way will be included in the Linkage, including the mTarget. However, if a terminal BodyNode is reached along the way, then nothing past the terminal BodyNode will be included. Therefore, If you want to expand towards a target but not include the target, you can set the BodyNode as both an mTarget and an mTerminal, and set the mInclusive flag in mTerminal to false.
The documentation for this struct was generated from the following files: