5 #include <gtest/gtest.h> 37 EXPECT_STREQ(e.
what(),
"Error: invalid joint type!");
65 EXPECT_STREQ(e.
what(),
"Error: Invalid use of Joint constructor Joint(JointType type). Only allowed when type != JointTypeCustom");
75 EXPECT_STREQ(e.
what(),
"Error: Invalid use of Joint constructor Joint(JointType type).");
88 EXPECT_STREQ(e.
what(),
"Error: Invalid use of Joint constructor Joint(JointType type, int degreesOfFreedom). Only allowed when type == JointTypeCustom.");
92 EXPECT_EQ(j1.mDoFCount, 1);
110 int main(
int argc,
char** argv)
112 ::testing::InitGoogleTest(&argc, argv);
113 return RUN_ALL_TESTS();
int main(int argc, char **argv)
Describes all properties of a single body.
User defined joints of varying size.
unsigned int appendBody(const Math::SpatialTransform &joint_frame, const Joint &joint, const Body &body, std::string body_name="")
Adds a Body to the model such that the previously added Body is the Parent.
unsigned int addBody(const unsigned int parent_id, const Math::SpatialTransform &joint_frame, const Joint &joint, const Body &body, std::string body_name="")
Connects a given body to the model.
bool validate_spatial_axis(Math::SpatialVector &axis)
Checks whether we have pure rotational or translational axis.
unsigned int q_size
The size of the -vector. For models without spherical joints the value is the same as Model::dof_coun...
virtual const char * what() const
Describes a joint relative to the predecessor body.
3 DoF joint that uses Euler XYZ convention (faster than emulated
Math::SpatialTransform jcalc_XJ(Model &model, unsigned int joint_id, const Math::VectorNd &q)
SpatialTransform Xrotx(const double &xrot)
Get transform with zero translation and pure rotation about x axis.
unsigned int mDoFCount
Number of degrees of freedom of the joint. Note: CustomJoints.
Math::SpatialVector * mJointAxes
The spatial axes of the joint.
static bool checkSpatialMatrixEpsilonClose(const RobotDynamics::Math::SpatialMatrix &t1, const RobotDynamics::Math::SpatialMatrix &t2, const double epsilon)
Contains all information about the rigid body model.
static bool checkSpatialVectorsEq(const RobotDynamics::Math::SpatialVector &v1, const RobotDynamics::Math::SpatialVector &v2)
Namespace for all structures of the RobotDynamics library.
TEST_F(JointTestsFixture, testJointJcalc_XJ)