5 #include <gtest/gtest.h> 28 SpatialMatrix test_cross(0., -3., 2., 0., 0., 0., 3., 0., -1., 0., 0., 0., -2., 1., 0., 0., 0., 0., 0., -6., 5., 0., -3., 2., 6., 0., -4., 3., 0., -1., -5., 4., 0.,
32 EXPECT_EQ(test_cross, s_vec_cross);
89 EXPECT_EQ(m.
wx(), 1.1);
90 EXPECT_EQ(m.
wy(), 2.2);
91 EXPECT_EQ(m.
wz(), 3.3);
92 EXPECT_EQ(m.
vx(), 4.4);
93 EXPECT_EQ(m.
vy(), 5.5);
94 EXPECT_EQ(m.
vz(), 6.6);
103 EXPECT_EQ(m.
wx(), -1.1);
104 EXPECT_EQ(m.
wy(), -2.2);
105 EXPECT_EQ(m.
wz(), -3.3);
106 EXPECT_EQ(m.
vx(), -4.4);
107 EXPECT_EQ(m.
vy(), -5.5);
108 EXPECT_EQ(m.
vz(), -6.6);
121 X_st.
E = X_66_matrix.block<3, 3>(0, 0);
143 int main(
int argc,
char** argv)
145 ::testing::InitGoogleTest(&argc, argv);
146 return RUN_ALL_TESTS();
SpatialMatrix crossm()
Get the spatial motion cross matrix, .
SpatialVector SpatialVectorZero
SpatialMatrix crossf()
Get the spatial force cross matrix.
SpatialMatrix Xrotx_mat(const double &xrot)
Creates a rotational transformation around the X-axis.
int main(int argc, char **argv)
SpatialMatrix crossf(const SpatialVector &v)
Get the spatial force cross matrix.
EIGEN_STRONG_INLINE double & vz()
Get a reference to the linear-z component.
void transform(const SpatialTransform &X)
Transforms a motion vector. Performs .
SpatialMatrix Xtrans_mat(const Vector3d &displacement)
Creates a transformation of a linear displacement.
A ForceVector is a SpatialVector containing 3 moments and 3 linear forces.
static Matrix3d toTildeForm(const Point3d &p)
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.
EIGEN_STRONG_INLINE double & vx()
Get a reference to the linear-x component.
TEST_F(MotionVectorTests, TestSpatialVectorCross)
EIGEN_STRONG_INLINE double & wz()
Get a reference to the angular-z component.
EIGEN_STRONG_INLINE double & vy()
Get a reference to the linear-y component.
SpatialMatrix Xroty_mat(const double &yrot)
Creates a rotational transformation around the Y-axis.
static bool checkSpatialMatrixEpsilonClose(const RobotDynamics::Math::SpatialMatrix &t1, const RobotDynamics::Math::SpatialMatrix &t2, const double epsilon)
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)
SpatialMatrix crossm(const SpatialVector &v)
Get the spatial motion cross matrix.
SpatialMatrix Xrotz_mat(const double &zrot)
Creates a rotational transformation around the Z-axis.