DART 6.12.2
Loading...
Searching...
No Matches
SkeletonAspect.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2021, The DART development contributors
3 * All rights reserved.
4 *
5 * The list of contributors can be found at:
6 * https://github.com/dartsim/dart/blob/master/LICENSE
7 *
8 * This file is provided under the following "BSD-style" License:
9 * Redistribution and use in source and binary forms, with or
10 * without modification, are permitted provided that the following
11 * conditions are met:
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials provided
17 * with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef DART_DYNAMICS_DETAIL_SKELETONASPECT_HPP_
34#define DART_DYNAMICS_DETAIL_SKELETONASPECT_HPP_
35
36#include <Eigen/Core>
37
42
43namespace dart {
44namespace dynamics {
45
46class Skeleton;
47
48namespace detail {
49
50//==============================================================================
55{
57 std::string mName;
58
63
65 Eigen::Vector3d mGravity;
66
68 double mTimeStep;
69
73
78
81 const std::string& _name = "Skeleton",
82 bool _isMobile = true,
83 const Eigen::Vector3d& _gravity = Eigen::Vector3d(0.0, 0.0, -9.81),
84 double _timeStep = 0.001,
85 bool _enabledSelfCollisionCheck = false,
86 bool _enableAdjacentBodyCheck = false);
87
88 virtual ~SkeletonAspectProperties() = default;
89};
90
91//==============================================================================
92using BodyNodeStateVector = std::vector<common::Composite::State>;
93using BodyNodePropertiesVector = std::vector<common::Composite::Properties>;
94using JointStateVector = std::vector<common::Composite::State>;
95using JointPropertiesVector = std::vector<common::Composite::Properties>;
96
97//==============================================================================
98void setAllBodyNodeStates(Skeleton* skel, const BodyNodeStateVector& states);
99
100//==============================================================================
102
103//==============================================================================
106
107//==============================================================================
109
110//==============================================================================
113 Skeleton,
117
118//==============================================================================
121 Skeleton,
125
126//==============================================================================
128 Skeleton,
131
132//==============================================================================
133void setAllJointStates(Skeleton* skel, const JointStateVector& states);
134
135//==============================================================================
137
138//==============================================================================
141
142//==============================================================================
144
145//==============================================================================
148 Skeleton,
152
153//==============================================================================
156 Skeleton,
160
161//==============================================================================
163 Skeleton,
166
167//==============================================================================
170
171//==============================================================================
173 Skeleton,
176
177} // namespace detail
178} // namespace dynamics
179} // namespace dart
180
181#endif // DART_DYNAMICS_DETAIL_SKELETONASPECT_HPP_
BodyPropPtr properties
Definition SdfParser.cpp:80
If your Aspect has Properties, then that Properties class should inherit this Aspect::Properties clas...
Definition Aspect.hpp:86
If your Aspect has a State, then that State class should inherit this Aspect::State class.
Definition Aspect.hpp:65
This is an alternative to EmbedProperties which allows your class to also inherit other Composite obj...
Definition EmbeddedAspect.hpp:240
Definition Cloneable.hpp:140
Definition ProxyAspect.hpp:61
RequiresAspect allows classes that inherit Composite to know which Aspects are required for their ope...
Definition RequiresAspect.hpp:50
class Skeleton
Definition Skeleton.hpp:60
BodyNodePropertiesVector getAllBodyNodeProperties(const Skeleton *skel)
Definition Skeleton.cpp:236
common::ProxyCloneable< common::Aspect::State, Skeleton, BodyNodeStateVector, &setAllBodyNodeStates, &getAllBodyNodeStates > BodyNodeVectorProxyAspectState
Definition SkeletonAspect.hpp:116
std::vector< common::Composite::State > JointStateVector
Definition SkeletonAspect.hpp:94
std::vector< common::Composite::State > BodyNodeStateVector
Definition SkeletonAspect.hpp:92
common::ProxyCloneable< common::Aspect::State, Skeleton, JointStateVector, &setAllJointStates, &getAllJointStates > JointVectorProxyAspectState
Definition SkeletonAspect.hpp:151
JointPropertiesVector getAllJointProperties(const Skeleton *skel)
Definition Skeleton.cpp:289
void setAllJointProperties(Skeleton *skel, const JointPropertiesVector &properties)
Definition Skeleton.cpp:275
std::vector< common::Composite::Properties > JointPropertiesVector
Definition SkeletonAspect.hpp:95
JointStateVector getAllJointStates(const Skeleton *skel)
Definition Skeleton.cpp:262
void setAllBodyNodeProperties(Skeleton *skel, const BodyNodePropertiesVector &properties)
Definition Skeleton.cpp:222
std::vector< common::Composite::Properties > BodyNodePropertiesVector
Definition SkeletonAspect.hpp:93
void setAllBodyNodeStates(Skeleton *skel, const BodyNodeStateVector &states)
Definition Skeleton.cpp:196
BodyNodeStateVector getAllBodyNodeStates(const Skeleton *skel)
Definition Skeleton.cpp:209
void setAllJointStates(Skeleton *skel, const JointStateVector &states)
Definition Skeleton.cpp:249
Definition BulletCollisionDetector.cpp:60
The Properties of this Skeleton which are independent of the components within the Skeleton,...
Definition SkeletonAspect.hpp:55
bool mEnabledAdjacentBodyCheck
True if self collision check is enabled, including adjacent bodies.
Definition SkeletonAspect.hpp:77
double mTimeStep
Time step for implicit joint damping force.
Definition SkeletonAspect.hpp:68
std::string mName
Name of the Skeleton.
Definition SkeletonAspect.hpp:57
Eigen::Vector3d mGravity
Gravity vector.
Definition SkeletonAspect.hpp:65
bool mEnabledSelfCollisionCheck
True if self collision check is enabled.
Definition SkeletonAspect.hpp:72
bool mIsMobile
If the skeleton is not mobile, its dynamic effect is equivalent to having infinite mass.
Definition SkeletonAspect.hpp:62