3 #include <gtest/gtest.h> 36 ref_body_id = body_a_id;
37 point_position =
Vector3d(1., 0., 0.);
49 ref_body_id = body_a_id;
51 point_position =
Vector3d(1., 0., 0.);
63 point_position =
Vector3d(1., 0., 0.);
71 point_position =
Vector3d(-1., 0., 0.);
84 point_position =
Vector3d(1., 0., 0.);
91 point_position =
Vector3d(-1., 0., 0.);
104 point_position =
Vector3d(1., 0., 0.);
112 point_position =
Vector3d(1., 1., 0.);
126 ref_body_id = body_b_id;
127 point_position =
Vector3d(0., 0., 0.);
143 ref_body_id = body_c_id;
144 point_position =
Vector3d(1., 1., 1.);
146 VectorNd qddot_1 = VectorNd::Zero(model->dof_count);
147 VectorNd qddot_2 = VectorNd::Zero(model->dof_count);
148 VectorNd qddot_0 = VectorNd::Zero(model->dof_count);
161 MatrixNd G = MatrixNd::Zero(3, model->dof_count);
164 VectorNd net_acc = G * (qddot_1 - qddot_2);
197 point_position =
Vector3d(0., 0., 0.);
210 unsigned int fixed_body_id = model->addBody(body_c_id, fixed_transform,
Joint(
JointTypeFixed), fixed_body,
"fixed_body");
213 point_position =
Vector3d(0., 0., 0.);
222 int main(
int argc,
char** argv)
224 ::testing::InitGoogleTest(&argc, argv);
225 return RUN_ALL_TESTS();
void calcPointJacobian(Model &model, const Math::VectorNd &Q, unsigned int body_id, const Math::Vector3d &point_position, Math::MatrixNd &G, bool update_kinematics=true)
Computes the 3D point jacobian for a point on a body.
Describes all properties of a single body.
SpatialTransform Xtrans(const Vector3d &r)
Get pure translation transform.
Fixed joint which causes the inertial properties to be merged with.
Math::FrameVector calcPointAcceleration(Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, const Math::VectorNd &QDDot, unsigned int body_id, const Math::Vector3d &point_position, bool update_kinematics=true)
Computes the linear acceleration of a point on a body.
SpatialTransform Xrotz(const double &zrot)
Get transform with zero translation and pure rotation about z axis.
int main(int argc, char **argv)
Describes a joint relative to the predecessor body.
TEST_F(FixedBase3DoF, TestCalcPointSimple)
Math types such as vectors and matrices and utility functions.
static bool checkVector3dEpsilonClose(const RobotDynamics::Math::Vector3d &v1, const RobotDynamics::Math::Vector3d &v2, const double epsilon)
RdlCalcAccelerationTests()
void forwardDynamics(Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, const Math::VectorNd &Tau, Math::VectorNd &QDDot, Math::SpatialForceV *f_ext=nullptr, bool update_kinematics=true)
Computes forward dynamics with the Articulated Body Algorithm.
Namespace for all structures of the RobotDynamics library.