39 #include <gtest/gtest.h> 41 #include <unsupported/Eigen/AutoDiff> 60 tf2.translation() = p;
71 using derivative_t = Eigen::Matrix<S, 3, 1>;
72 using scalar_t = Eigen::AutoDiffScalar<derivative_t>;
73 using input_t = Eigen::Matrix<scalar_t, 3, 1>;
75 input_t pos(40, 0, 0);
76 pos(0).derivatives() = derivative_t::Unit(3, 0);
77 pos(1).derivatives() = derivative_t::Unit(3, 1);
78 pos(2).derivatives() = derivative_t::Unit(3, 2);
86 pos(0).derivatives() = derivative_t::Unit(3, 0);
87 pos(1).derivatives() = derivative_t::Unit(3, 1);
88 pos(2).derivatives() = derivative_t::Unit(3, 2);
95 pos(0).derivatives() = derivative_t::Unit(3, 0);
96 pos(1).derivatives() = derivative_t::Unit(3, 1);
97 pos(2).derivatives() = derivative_t::Unit(3, 2);
108 test_basic<double>();
112 int main(
int argc,
char* argv[])
114 ::testing::InitGoogleTest(&argc, argv);
115 return RUN_ALL_TESTS();
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
int main(int argc, char *argv[])
Eigen::Matrix< S, 3, 1 > Vector3
GTEST_TEST(FCL_AUTO_DIFF, basic)
S getDistance(const Vector3< S > &p)
collision and distance solver based on libccd library.
Center at zero point sphere.
bool shapeDistance(const Shape1 &s1, const Transform3< S > &tf1, const Shape2 &s2, const Transform3< S > &tf2, S *dist=nullptr, Vector3< S > *p1=nullptr, Vector3< S > *p2=nullptr) const
distance computation between two shapes