============================================================================== Exercises PART A: the default World solver is a BoxedLcpConstraintSolver with the Dantzig primary and the PGS secondary solver. Stepping a non-axis-aligned closed loop must not produce NaN/Inf or abort.
| 192 | // the Dantzig primary and the PGS secondary solver. Stepping a non-axis-aligned |
| 193 | // closed loop must not produce NaN/Inf or abort. |
| 194 | TEST(Issue719, NonAxisAlignedClosedLoopDefaultSolver) |
| 195 | { |
| 196 | BodyNode* base = nullptr; |
| 197 | BodyNode* lastLink = nullptr; |
| 198 | Eigen::Vector3d loopAnchor = Eigen::Vector3d::Zero(); |
| 199 | SkeletonPtr skel = createNonAxisAlignedFourBar(&base, &lastLink, loopAnchor); |
| 200 | |
| 201 | WorldPtr world = World::create(); |
| 202 | world->setGravity(Eigen::Vector3d(0.0, 0.0, -9.81)); |
| 203 | world->addSkeleton(skel); |
| 204 | |
| 205 | // Close the kinematic loop with a ball joint constraint between the last |
| 206 | // link and the base. This is what makes the chain a closed loop. |
| 207 | auto loopConstraint = std::make_shared<constraint::BallJointConstraint>( |
| 208 | lastLink, base, loopAnchor); |
| 209 | world->getConstraintSolver()->addConstraint(loopConstraint); |
| 210 | |
| 211 | EXPECT_NO_FATAL_FAILURE( |
| 212 | stepAndCheckLoopClosed(world, skel, base, lastLink, loopAnchor)); |
| 213 | } |
| 214 | |
| 215 | //============================================================================== |
| 216 | // Exercises PART B: with the secondary solver explicitly disabled (nullptr) |
nothing calls this directly
no test coverage detected