DART 6.10.1
Loading...
Searching...
No Matches
EndEffector.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_ENDEFFECTOR_HPP_
34#define DART_DYNAMICS_ENDEFFECTOR_HPP_
35
42
43namespace dart {
44namespace dynamics {
45
46class BodyNode;
47class Skeleton;
48class EndEffector;
49
50//==============================================================================
52 Support,
53 detail::SupportStateData,
54 detail::SupportPropertiesData,
55 EndEffector,
56 &detail::SupportUpdate>
57{
58public:
60
61
64 DART_COMMON_SET_GET_ASPECT_PROPERTY(math::SupportGeometry, Geometry)
65 // void setGeometry(const math::SupportGeometry&);
66 // const math::SupportGeometry& getGeometry() const;
67
70 void setActive(bool _supporting = true);
71
73 bool isActive() const;
74};
75
76//==============================================================================
77class EndEffector final : public common::EmbedPropertiesOnTopOf<
79 detail::EndEffectorProperties,
80 detail::EndEffectorCompositeBase>
81{
82public:
83 friend class Skeleton;
84 friend class BodyNode;
85
87
90
92
94 virtual ~EndEffector() = default;
95
96 //----------------------------------------------------------------------------
98 //----------------------------------------------------------------------------
99
102 void setProperties(const BasicProperties& _properties);
103
106 void setProperties(const UniqueProperties& properties, bool useNow = false);
107
109 void setAspectProperties(const AspectProperties& properties);
110
112 Properties getEndEffectorProperties() const;
113
115 void copy(const EndEffector& _otherEndEffector);
116
118 void copy(const EndEffector* _otherEndEffector);
119
121 EndEffector& operator=(const EndEffector& _otherEndEffector);
122
127 void setDefaultRelativeTransform(
128 const Eigen::Isometry3d& _newDefaultTf, bool _useNow = false);
129
133 void resetRelativeTransform();
134
136
137 //----------------------------------------------------------------------------
139 //----------------------------------------------------------------------------
140
141 // Documentation inherited
142 void dirtyTransform() override;
143
145
146protected:
148 explicit EndEffector(BodyNode* parent, const BasicProperties& properties);
149
150 // Documentation inherited
151 Node* cloneNode(BodyNode* _parent) const override;
152};
153
154} // namespace dynamics
155} // namespace dart
156
157#endif // DART_DYNAMICS_ENDEFFECTOR_HPP_
#define DART_COMMON_SET_GET_ASPECT_PROPERTY(Type, Name)
Definition Aspect.hpp:209
#define DART_COMMON_ASPECT_STATE_PROPERTY_CONSTRUCTORS(ClassName)
Definition Aspect.hpp:175
BodyPropPtr properties
Definition SdfParser.cpp:80
Definition AspectWithVersion.hpp:82
detail::CompositeProperties Properties
Definition Composite.hpp:56
void setAspectProperties(const Aspect::Properties &someProperties) override final
Definition AspectWithVersion.hpp:321
void setProperties(const PropertiesData &properties)
Set the Properties of this Aspect.
Definition AspectWithVersion.hpp:356
Definition CompositeData.hpp:186
Definition CompositeData.hpp:107
BodyNode class represents a single node of the skeleton.
Definition BodyNode.hpp:79
Definition EndEffector.hpp:81
virtual ~EndEffector()=default
Destructor.
The Node class is a base class for BodyNode and any object that attaches to a BodyNode.
Definition Node.hpp:81
class Skeleton
Definition Skeleton.hpp:59
Definition EndEffector.hpp:57
void setActive(bool _supporting=true)
Pass in true if this EndEffector should be used to support the robot, like a foot.
Definition EndEffector.cpp:59
bool isActive() const
Get whether this EndEffector is currently being used for support.
Definition EndEffector.cpp:69
#define DART_BAKE_SPECIALIZED_ASPECT(AspectName)
Definition Composite.hpp:226
Definition BulletCollisionDetector.cpp:65
Definition EndEffectorAspect.hpp:50