54 EXPECT_STREQ(
"Reference frame mismatch during subtraction of SpatialAccelerations!", e.
what());
75 SpatialAcceleration a2(model->bodyFrames[2], model->bodyFrames[1], currentExpressedInFrame, 0.1, 0.2, 0.3, -0.1, -0.2, -0.3);
78 SpatialTransform X = currentExpressedInFrame->getTransformToDesiredFrame(newFrame);
105 SpatialAcceleration a2(bodyFrame, baseFrame, currentExpressedInFrame, 0.1, 0.2, 0.3, -0.1, -0.2, -0.3);
108 SpatialMotion m2(bodyFrame, baseFrame, currentExpressedInFrame, 0.5, -0.1, -0, .11, 0.23, 0.9);
109 SpatialMotion m1(currentExpressedInFrame, newFrame, currentExpressedInFrame, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6);
115 SpatialTransform X = currentExpressedInFrame->getTransformToDesiredFrame(newFrame);
141 SpatialAcceleration a2(model->bodyFrames[2], model->bodyFrames[1], currentExpressedInFrame, 0.1, 0.2, 0.3, -0.1, -0.2, -0.3);
143 SpatialMotion m2(currentExpressedInFrame, newFrame, currentExpressedInFrame, 0.5, -0.1, -0, .11, 0.23, 0.9);
144 SpatialMotion m1(model->bodyFrames[2], model->bodyFrames[1], currentExpressedInFrame, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6);
152 int main(
int argc,
char** argv)
154 ::testing::InitGoogleTest(&argc, argv);
155 return RUN_ALL_TESTS();
ReferenceFramePtr getReferenceFrame() const
Get a pointer to the reference frame this FrameObject is expressed in.
A custom exception for frame operations.
MotionVector toMotionVector() const
Get a copy of this SpatialMotion as type MotionVector.
void transform(const SpatialTransform &X)
Transforms a motion vector. Performs .
TEST_F(FixedBase3DoFPlanar, testAdd)
static ReferenceFramePtr getWorldFrame()
Get a pointer to the world frame.
virtual const char * what() const
EIGEN_STRONG_INLINE void set(const MotionVector &v)
Setter.
int main(int argc, char **argv)
SpatialAccelerationTests()
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
virtual void changeFrame(ReferenceFramePtr desiredFrame)
Change the ReferenceFrame this FrameObject is expressed in.
A SpatialMotion vector is a MotionVector with a RobotDynamics::ReferenceFrame it is expressed in...
void updateKinematics(Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, const Math::VectorNd &QDDot)
Updates and computes velocities and accelerations of the bodies.
Math types such as vectors and matrices and utility functions.
static bool checkSpatialVectorsEpsilonClose(const RobotDynamics::Math::SpatialVector &v1, const RobotDynamics::Math::SpatialVector &v2, const double epsilon)
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...