6 #include <gtest/gtest.h> 30 EXPECT_EQ(f.
mx(), 1.1);
31 EXPECT_EQ(f.
my(), 2.2);
32 EXPECT_EQ(f.
mz(), 3.3);
33 EXPECT_EQ(f.
fx(), 4.4);
34 EXPECT_EQ(f.
fy(), 5.5);
35 EXPECT_EQ(f.
fz(), 6.6);
44 EXPECT_EQ(f.
mx(), -1.1);
45 EXPECT_EQ(f.
my(), -2.2);
46 EXPECT_EQ(f.
mz(), -3.3);
47 EXPECT_EQ(f.
fx(), -4.4);
48 EXPECT_EQ(f.
fy(), -5.5);
49 EXPECT_EQ(f.
fz(), -6.6);
78 int main(
int argc,
char** argv)
80 ::testing::InitGoogleTest(&argc, argv);
81 return RUN_ALL_TESTS();
SpatialVector SpatialVectorZero
TEST_F(ForceVectorTests, testConstructorsAndAccessors)
SpatialTransform Xtrans(const Vector3d &r)
Get pure translation transform.
A ForceVector is a SpatialVector containing 3 moments and 3 linear forces.
EIGEN_STRONG_INLINE double & fy()
Get reference to y-linear component.
EIGEN_STRONG_INLINE double & fx()
Get reference to x-linear component.
EIGEN_STRONG_INLINE double & fz()
Get reference to z-linear component.
EIGEN_STRONG_INLINE double & my()
Get reference to y-angular component.
SpatialTransform Xrotx(const double &xrot)
Get transform with zero translation and pure rotation about x axis.
EIGEN_STRONG_INLINE double & mz()
Get reference to z-angular component.
int main(int argc, char **argv)
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)
EIGEN_STRONG_INLINE double & mx()
Get reference to x-angular component.
ForceVector transform_copy(const SpatialTransform &X) const
Copy then transform a ForceVector by .