DART  6.7.3
UniversalJoint.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_UNIVERSALJOINT_HPP_
34 #define DART_DYNAMICS_UNIVERSALJOINT_HPP_
35 
37 
38 namespace dart {
39 namespace dynamics {
40 
43 {
44 public:
45 
46  friend class Skeleton;
50 
52 
53  UniversalJoint(const UniversalJoint&) = delete;
54 
56  virtual ~UniversalJoint();
57 
59  void setProperties(const Properties& _properties);
60 
62  void setProperties(const UniqueProperties& _properties);
63 
66 
69 
71  void copy(const UniversalJoint& _otherJoint);
72 
74  void copy(const UniversalJoint* _otherJoint);
75 
77  UniversalJoint& operator=(const UniversalJoint& _otherJoint);
78 
79  // Documentation inherited
80  const std::string& getType() const override;
81 
83  static const std::string& getStaticType();
84 
85  // Documentation inherited
86  bool isCyclic(std::size_t _index) const override;
87 
89  void setAxis1(const Eigen::Vector3d& _axis);
90 
92  void setAxis2(const Eigen::Vector3d& _axis);
93 
95  const Eigen::Vector3d& getAxis1() const;
96 
98  const Eigen::Vector3d& getAxis2() const;
99 
100  // Documentation inherited
101  Eigen::Matrix<double, 6, 2> getRelativeJacobianStatic(
102  const Eigen::Vector2d& _positions) const override;
103 
104 protected:
105 
108 
109  // Documentation inherited
110  Joint* clone() const override;
111 
113 
114  // Documentation inherited
115  void updateDegreeOfFreedomNames() override;
116 
117  // Documentation inherited
118  void updateRelativeTransform() const override;
119 
120  // Documentation inherited
121  void updateRelativeJacobian(bool =true) const override;
122 
123  // Documentation inherited
124  void updateRelativeJacobianTimeDeriv() const override;
125 };
126 
127 } // namespace dynamics
128 } // namespace dart
129 
130 #endif // DART_DYNAMICS_UNIVERSALJOINT_HPP_
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
Definition: GenericJoint.hpp:49
class Joint
Definition: Joint.hpp:59
class Skeleton
Definition: Skeleton.hpp:59
class UniversalJoint
Definition: UniversalJoint.hpp:43
void copy(const UniversalJoint &_otherJoint)
Copy the Properties of another UniversalJoint.
Definition: UniversalJoint.cpp:78
const std::string & getType() const override
Definition: UniversalJoint.cpp:103
void setAspectProperties(const AspectProperties &properties)
Set the AspectProperties of this UniversalJoint.
Definition: UniversalJoint.cpp:65
void updateDegreeOfFreedomNames() override
Definition: UniversalJoint.cpp:180
const Eigen::Vector3d & getAxis2() const
Definition: UniversalJoint.cpp:144
Eigen::Matrix< double, 6, 2 > getRelativeJacobianStatic(const Eigen::Vector2d &_positions) const override
Definition: UniversalJoint.cpp:150
void updateRelativeJacobian(bool=true) const override
Definition: UniversalJoint.cpp:200
Joint * clone() const override
Definition: UniversalJoint.cpp:174
void updateRelativeTransform() const override
Definition: UniversalJoint.cpp:189
Properties getUniversalJointProperties() const
Get the Properties of this UniversalJoint.
Definition: UniversalJoint.cpp:72
static const std::string & getStaticType()
Get joint type for this class.
Definition: UniversalJoint.cpp:109
bool isCyclic(std::size_t _index) const override
Definition: UniversalJoint.cpp:116
void updateRelativeJacobianTimeDeriv() const override
Definition: UniversalJoint.cpp:206
const Eigen::Vector3d & getAxis1() const
Definition: UniversalJoint.cpp:138
void setAxis1(const Eigen::Vector3d &_axis)
Definition: UniversalJoint.cpp:122
void setProperties(const Properties &_properties)
Set the Properties of this UniversalJoint.
Definition: UniversalJoint.cpp:50
void setAxis2(const Eigen::Vector3d &_axis)
Definition: UniversalJoint.cpp:130
#define DART_BAKE_SPECIALIZED_ASPECT_IRREGULAR(TypeName, AspectName)
Definition: Composite.hpp:164
Definition: Random-impl.hpp:92
common::EmbedPropertiesOnTopOf< UniversalJoint, UniversalJointUniqueProperties, GenericJoint< math::R2Space > > UniversalJointBase
Definition: UniversalJointAspect.hpp:79
RealVectorSpace< 2u > R2Space
Definition: ConfigurationSpace.hpp:73
Definition: BulletCollisionDetector.cpp:63
Definition: SharedLibraryManager.hpp:43
Definition: UniversalJointAspect.hpp:65
Definition: UniversalJointAspect.hpp:51