DART  6.7.3
PlanarJoint.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2019, 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_PLANARRJOINT_HPP_
34 #define DART_DYNAMICS_PLANARRJOINT_HPP_
35 
37 
38 namespace dart {
39 namespace dynamics {
40 
48 {
49 public:
50 
51  friend class Skeleton;
56 
58 
59  PlanarJoint(const PlanarJoint&) = delete;
60 
62  virtual ~PlanarJoint();
63 
65  void setProperties(const Properties& _properties);
66 
68  void setProperties(const UniqueProperties& _properties);
69 
72 
75 
77  void copy(const PlanarJoint& _otherJoint);
78 
80  void copy(const PlanarJoint* _otherJoint);
81 
83  PlanarJoint& operator=(const PlanarJoint& _otherJoint);
84 
85  // Documentation inherited
86  const std::string& getType() const override;
87 
89  static const std::string& getStaticType();
90 
91  // Documentation inherited
92  bool isCyclic(std::size_t _index) const override;
93 
97  void setXYPlane(bool _renameDofs = true);
98 
102  void setYZPlane(bool _renameDofs = true);
103 
107  void setZXPlane(bool _renameDofs = true);
108 
113  void setArbitraryPlane(const Eigen::Vector3d& _transAxis1,
114  const Eigen::Vector3d& _transAxis2,
115  bool _renameDofs = true);
116 
118  PlaneType getPlaneType() const;
119 
121  const Eigen::Vector3d& getRotationalAxis() const;
122 
124  const Eigen::Vector3d& getTranslationalAxis1() const;
125 
127  const Eigen::Vector3d& getTranslationalAxis2() const;
128 
129  // Documentation inherited
130  Eigen::Matrix<double, 6, 3> getRelativeJacobianStatic(
131  const Eigen::Vector3d& _positions) const override;
132 
133 protected:
134 
137 
138  // Documentation inherited
139  Joint* clone() const override;
140 
142 
145  void updateDegreeOfFreedomNames() override;
146 
147  // Documentation inherited
148  void updateRelativeTransform() const override;
149 
150  // Documentation inherited
151  void updateRelativeJacobian(bool =true) const override;
152 
153  // Documentation inherited
154  void updateRelativeJacobianTimeDeriv() const override;
155 };
156 
157 } // namespace dynamics
158 } // namespace dart
159 
160 #endif // DART_DYNAMICS_PLANARRJOINT_HPP_
161 
BodyPropPtr properties
Definition: SdfParser.cpp:80
Terminator for the variadic template.
Definition: CompositeJoiner.hpp:45
This is an alternative to EmbedProperties which allows your class to also inherit other Composite obj...
Definition: EmbeddedAspect.hpp:248
typename Impl::Aspect Aspect
Definition: EmbeddedAspect.hpp:255
typename Impl::AspectProperties AspectProperties
Definition: EmbeddedAspect.hpp:254
class Joint
Definition: Joint.hpp:59
PlanarJoint represents a 3-dof joint, which has two orthogonal translational axes and one rotational ...
Definition: PlanarJoint.hpp:48
Properties getPlanarJointProperties() const
Get the Properties of this PlanarJoint.
Definition: PlanarJoint.cpp:75
void setAspectProperties(const AspectProperties &properties)
Set the AspectProperties of this PlanarJoint.
Definition: PlanarJoint.cpp:66
const Eigen::Vector3d & getRotationalAxis() const
Return rotational axis.
Definition: PlanarJoint.cpp:173
void updateDegreeOfFreedomNames() override
Set the names of this joint's DegreesOfFreedom.
Definition: PlanarJoint.cpp:230
void setProperties(const Properties &_properties)
Set the Properties of this PlanarJoint.
Definition: PlanarJoint.cpp:52
void updateRelativeJacobianTimeDeriv() const override
Definition: PlanarJoint.cpp:288
bool isCyclic(std::size_t _index) const override
Definition: PlanarJoint.cpp:119
const Eigen::Vector3d & getTranslationalAxis2() const
Return second translational axis.
Definition: PlanarJoint.cpp:185
Joint * clone() const override
Definition: PlanarJoint.cpp:224
PlaneType getPlaneType() const
Return plane type.
Definition: PlanarJoint.cpp:167
void setZXPlane(bool _renameDofs=true)
Set plane type as ZX-plane.
Definition: PlanarJoint.cpp:145
const std::string & getType() const override
Definition: PlanarJoint.cpp:106
Eigen::Matrix< double, 6, 3 > getRelativeJacobianStatic(const Eigen::Vector3d &_positions) const override
Definition: PlanarJoint.cpp:191
static const std::string & getStaticType()
Get joint type for this class.
Definition: PlanarJoint.cpp:112
void setXYPlane(bool _renameDofs=true)
Set plane type as XY-plane.
Definition: PlanarJoint.cpp:125
void updateRelativeJacobian(bool=true) const override
Definition: PlanarJoint.cpp:282
const Eigen::Vector3d & getTranslationalAxis1() const
Return first translational axis.
Definition: PlanarJoint.cpp:179
void setArbitraryPlane(const Eigen::Vector3d &_transAxis1, const Eigen::Vector3d &_transAxis2, bool _renameDofs=true)
Set plane type as arbitrary plane with two orthogonal translational axes.
Definition: PlanarJoint.cpp:155
void updateRelativeTransform() const override
Definition: PlanarJoint.cpp:268
void setYZPlane(bool _renameDofs=true)
Set plane type as YZ-plane.
Definition: PlanarJoint.cpp:135
void copy(const PlanarJoint &_otherJoint)
Copy the Properties of another PlanarJoint.
Definition: PlanarJoint.cpp:81
class Skeleton
Definition: Skeleton.hpp:59
#define DART_BAKE_SPECIALIZED_ASPECT_IRREGULAR(TypeName, AspectName)
Definition: Composite.hpp:164
Definition: Random-impl.hpp:92
PlaneType
Plane type.
Definition: PlanarJointAspect.hpp:50
Definition: BulletCollisionDetector.cpp:63
Definition: SharedLibraryManager.hpp:43
Definition: PlanarJointAspect.hpp:111
Properties that are unique to PlanarJoints.
Definition: PlanarJointAspect.hpp:66