DART  6.7.3
WeldJoint.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_WELDJOINT_HPP_
34 #define DART_DYNAMICS_WELDJOINT_HPP_
35 
36 #include <string>
37 
38 #include <Eigen/Dense>
39 
41 
42 namespace dart {
43 namespace dynamics {
44 
46 class WeldJoint : public ZeroDofJoint
47 {
48 public:
49 
50  friend class Skeleton;
51 
53  {
55 
56  Properties(const Joint::Properties& _properties = Joint::Properties());
57 
58  virtual ~Properties() = default;
59  };
60 
61  WeldJoint(const WeldJoint&) = delete;
62 
64  virtual ~WeldJoint();
65 
68 
69  // Documentation inherited
70  const std::string& getType() const override;
71 
73  static const std::string& getStaticType();
74 
75  // Documentation inherited
76  bool isCyclic(std::size_t _index) const override;
77 
78  // Documentation inherited
79  void setTransformFromParentBodyNode(const Eigen::Isometry3d& _T) override;
80 
81  // Documentation inherited
82  void setTransformFromChildBodyNode(const Eigen::Isometry3d& _T) override;
83 
84 protected:
85 
88 
89  // Documentation inherited
90  Joint* clone() const override;
91 
92  //----------------------------------------------------------------------------
93  // Recursive algorithms
94  //----------------------------------------------------------------------------
95 
96  // Documentation inherited
97  void updateRelativeTransform() const override;
98 
99  // Documentation inherited
100  void updateRelativeSpatialVelocity() const override;
101 
102  // Documentation inherited
103  void updateRelativeSpatialAcceleration() const override;
104 
105  // Documentation inherited
106  void updateRelativePrimaryAcceleration() const override;
107 
108  // Documentation inherited
109  void updateRelativeJacobian(bool =true) const override;
110 
111  // Documentation inherited
112  void updateRelativeJacobianTimeDeriv() const override;
113 };
114 
115 } // namespace dynamics
116 } // namespace dart
117 
118 #endif // DART_DYNAMICS_WELDJOINT_HPP_
119 
#define DART_DEFINE_ALIGNED_SHARED_OBJECT_CREATOR(class_name)
Definition: Memory.hpp:148
BodyPropPtr properties
Definition: SdfParser.cpp:80
class Joint
Definition: Joint.hpp:59
class Skeleton
Definition: Skeleton.hpp:59
class WeldJoint
Definition: WeldJoint.hpp:47
void setTransformFromChildBodyNode(const Eigen::Isometry3d &_T) override
Set transformation from child body node to this joint.
Definition: WeldJoint.cpp:90
void updateRelativeSpatialVelocity() const override
Update spatial velocity of the child BodyNode relative to the parent BodyNode expressed in the child ...
Definition: WeldJoint.cpp:118
void updateRelativeJacobian(bool=true) const override
Update spatial Jacobian of the child BodyNode relative to the parent BodyNode expressed in the child ...
Definition: WeldJoint.cpp:138
void updateRelativePrimaryAcceleration() const override
Update J * \ddot{q} of this joint.
Definition: WeldJoint.cpp:132
WeldJoint(const WeldJoint &)=delete
const std::string & getType() const override
Gets a string representing the joint type.
Definition: WeldJoint.cpp:57
static const std::string & getStaticType()
Get joint type for this class.
Definition: WeldJoint.cpp:63
virtual ~WeldJoint()
Destructor.
Definition: WeldJoint.cpp:51
bool isCyclic(std::size_t _index) const override
Get whether a generalized coordinate is cyclic.
Definition: WeldJoint.cpp:70
void updateRelativeTransform() const override
Update transform of the child BodyNode relative to the parent BodyNode expressed in the child BodyNod...
Definition: WeldJoint.cpp:112
void updateRelativeJacobianTimeDeriv() const override
Update time derivative of spatial Jacobian of the child BodyNode relative to the parent BodyNode expr...
Definition: WeldJoint.cpp:144
void updateRelativeSpatialAcceleration() const override
Update spatial acceleration of the child BodyNode relative to the parent BodyNode expressed in the ch...
Definition: WeldJoint.cpp:125
void setTransformFromParentBodyNode(const Eigen::Isometry3d &_T) override
Set transformation from parent body node to this joint.
Definition: WeldJoint.cpp:82
Joint * clone() const override
Create a clone of this Joint.
Definition: WeldJoint.cpp:106
Properties getWeldJointProperties() const
Get the Properties of this WeldJoint.
Definition: WeldJoint.cpp:76
class ZeroDofJoint
Definition: ZeroDofJoint.hpp:48
Definition: BulletCollisionDetector.cpp:63
Definition: WeldJoint.hpp:53
Properties(const Joint::Properties &_properties=Joint::Properties())
Definition: WeldJoint.cpp:44
Definition: ZeroDofJoint.hpp:52
Definition: JointAspect.hpp:112