SpatialAcceleration.hpp
Go to the documentation of this file.
1 /*
2  * RDL - Robot Dynamics Library
3  * Copyright (c) 2017 Jordan Lack <jlack1987@gmail.com>
4  *
5  * Licensed under the zlib license. See LICENSE for more details.
6  */
7 
8 #ifndef __RDL_SPATIAL_ACCELERATION_HPP__
9 #define __RDL_SPATIAL_ACCELERATION_HPP__
10 
12 
26 namespace RobotDynamics
27 {
28 namespace Math
29 {
38 {
39  public:
44  {
45  }
46 
59  SpatialAcceleration(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const double wx, const double wy, const double wz,
60  const double vx, const double vy, const double vz)
61  : SpatialMotion(bodyFrame, baseFrame, expressedInFrame, wx, wy, wz, vx, vy, vz)
62  {
63  }
64 
74  : SpatialMotion(bodyFrame, baseFrame, expressedInFrame, w.x(), w.y(), w.z(), v.x(), v.y(), v.z())
75  {
76  }
77 
86  : SpatialMotion(bodyFrame, baseFrame, expressedInFrame, v)
87  {
88  }
89 
94  SpatialAcceleration(const SpatialAcceleration& spatialAcceleration)
95  : SpatialMotion(spatialAcceleration.getBodyFrame(), spatialAcceleration.getBaseFrame(), spatialAcceleration.getReferenceFrame(), spatialAcceleration)
96  {
97  }
98 
107  void changeFrameWithRelativeMotion(ReferenceFramePtr newFrame, SpatialMotion twistOfCurrentFrameWithRespectToNewFrame,
108  const SpatialMotion& twistOfBodyWrtBaseExpressedInCurrent);
109 
115  void operator+=(const SpatialAcceleration& vector);
116 
122  void operator-=(const SpatialAcceleration& vector);
123 };
124 
132 {
133  v1 += v2;
134  return v1;
135 }
136 
144 {
145  v1 -= v2;
146  return v1;
147 }
148 typedef std::vector<SpatialAcceleration, Eigen::aligned_allocator<SpatialAcceleration>> SpatialAccelerationV;
149 } // namespace Math
150 } // namespace RobotDynamics
151 
152 #endif //__RDL_SPATIAL_ACCELERATION_HPP__
ReferenceFramePtr getReferenceFrame() const
Get a pointer to the reference frame this FrameObject is expressed in.
Definition: FrameObject.hpp:52
SpatialAcceleration(const SpatialAcceleration &spatialAcceleration)
Constructor.
std::vector< SpatialAcceleration, Eigen::aligned_allocator< SpatialAcceleration > > SpatialAccelerationV
EIGEN_STRONG_INLINE double & vz()
Get a reference to the linear-z component.
SpatialAcceleration(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const double wx, const double wy, const double wz, const double vx, const double vy, const double vz)
Constructor.
FramePoint operator+(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:295
EIGEN_STRONG_INLINE double & wx()
Get a reference to the angular-x component.
EIGEN_STRONG_INLINE double & wy()
Get a reference to the angular-y component.
SpatialAcceleration(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const Vector3d &w, const Vector3d v)
Constructor.
EIGEN_STRONG_INLINE double & vx()
Get a reference to the linear-x component.
SpatialAcceleration(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const SpatialVector &v)
Constructor.
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
A SpatialMotion vector is a MotionVector with a RobotDynamics::ReferenceFrame it is expressed in...
void operator+=(const SpatialAcceleration &vector)
Add a SpatialAcceleration, . Frame checks are performed to ensure frame rules are adhered to...
ReferenceFramePtr getBaseFrame() const
Get a SpatialMotions SpatialMotion::baseFrame.
EIGEN_STRONG_INLINE double & wz()
Get a reference to the angular-z component.
void operator-=(const SpatialAcceleration &vector)
Subtract a SpatialAcceleration, . Frame checks are performed to ensure frame rules are adhered to...
EIGEN_STRONG_INLINE double & vy()
Get a reference to the linear-y component.
ReferenceFramePtr getBodyFrame() const
Get a SpatialMotions SpatialMotion::bodyFrame.
FramePoint operator-(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:301
SpatialAcceleration. For clarity, the ReferenceFrames are stated as follows. A spatial acceleration i...
void changeFrameWithRelativeMotion(ReferenceFramePtr newFrame, SpatialMotion twistOfCurrentFrameWithRespectToNewFrame, const SpatialMotion &twistOfBodyWrtBaseExpressedInCurrent)
Use this method to change the ReferenceFrame::expressedInFrame of a SpatialAcceleration if there is r...
Namespace for all structures of the RobotDynamics library.
Definition: Body.h:21
SpatialAcceleration()
Constructor. ReferenceFrame is initialized to nullptr and vector elements to 0.


rdl_dynamics
Author(s):
autogenerated on Tue Apr 20 2021 02:25:28