Merge pull request #35 from CYDXYYJ/patch-1

Change In Python Example
fixes-turtlebasket
Mattia Montanari 2022-11-01 09:56:43 +01:00 committed by GitHub
commit 018b27cc08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -8,9 +8,9 @@ PYBIND11_MODULE(opengjkc, m) {
[](Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor> &arr1,
Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor> &arr2)
-> double {
struct simplex s;
struct bd bd1;
struct bd bd2;
gkSimplex s;
gkPolytope bd1;
gkPolytope bd2;
bd1.numpoints = arr1.rows();
std::vector<double *> arr1_rows(arr1.rows());
for (int i = 0; i < arr1.rows(); ++i)
@ -23,8 +23,8 @@ PYBIND11_MODULE(opengjkc, m) {
arr2_rows[i] = arr2.row(i).data();
bd2.coord = arr2_rows.data();
double a = gjk(bd1, bd2, &s);
double a = compute_minimum_distance(bd1, bd2, &s);
return a;
});
}
}