Skip to content
Snippets Groups Projects
Unverified Commit 7d39ac95 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #1053 from jcarpent/devel

Fix literal warning in Python 3.8
parents bda773d9 2254eb5c
Branches
Tags
No related merge requests found
//
// Copyright (c) 2015-2016 CNRS
// Copyright (c) 2015-2020 CNRS INRIA
//
#include "pinocchio/bindings/python/algorithm/algorithms.hpp"
......@@ -16,51 +16,51 @@ namespace pinocchio
bp::def("updateGeometryPlacements",
&updateGeometryPlacements<double,0,JointCollectionDefaultTpl,VectorXd>,
bp::args("model", "data", "geometry model", "geometry data", "Configuration vector q (size Model::nq)"),
bp::args("model", "data", "geometry_model", "geometry_data", "q"),
"Update the placement of the collision objects according to the current configuration."
"The algorithm also updates the current placement of the joint in Data."
);
bp::def("updateGeometryPlacements",
&updateGeometryPlacements<double,0,JointCollectionDefaultTpl>,
bp::args("model", "data", "geometry model", "geometry data"),
bp::args("model", "data", "geometry_model", "geometry_data"),
"Update the placement of the collision objects according to the current joint placement stored in data."
);
bp::def("setGeometryMeshScales",
(void (*)(GeometryModel &, const Vector3d &))&setGeometryMeshScales<Vector3d>,
bp::args("geometry model", "scale"),
bp::args("geometry_model", "scale"),
"Set a mesh scaling vector to each GeometryObject contained in the the GeometryModel."
);
bp::def("setGeometryMeshScales",
(void (*)(GeometryModel &, const double))&setGeometryMeshScales,
bp::args("geometry model", "scale"),
bp::args("geometry_model", "scale"),
"Set an isotropic mesh scaling to each GeometryObject contained in the the GeometryModel."
);
#ifdef PINOCCHIO_WITH_HPP_FCL
bp::def("computeCollision",computeCollision,
bp::args("geometry model", "geometry data", "collision pair index"),
bp::args("geometry_model", "geometry_data", "pair_index"),
"Check if the collision objects of a collision pair for a given Geometry Model and Data are in collision."
"The collision pair is given by the two index of the collision objects."
);
bp::def("computeCollisions",
(bool (*)(const GeometryModel &, GeometryData &, const bool))&computeCollisions,
bp::args("geometry model","geometry data","stop at first collision"),
bp::args("geometry_model","geometry_data","stop_at_first_collision"),
"Determine if collision pairs are effectively in collision."
);
bp::def("computeCollisions",
&computeCollisions<double,0,JointCollectionDefaultTpl,VectorXd>,
bp::args("model","data","geometry model","geometry data","Configuration q (size Model::nq)", "bool"),
bp::args("model","data","geometry_model","geometry_data","q", "bool"),
"Update the geometry for a given configuration and"
"determine if all collision pairs are effectively in collision or not."
);
bp::def("computeDistance",&computeDistance,
bp::args("geometry model","geometry data", "pairIndex"),
bp::args("geometry_model", "geometry_data", "pair_index"),
"Compute the distance between the two geometry objects of a given collision pair for a GeometryModel and associated GeometryData.",
bp::return_value_policy<bp::return_by_value>()
// bp::with_custodian_and_ward_postcall<0,1>()
......@@ -68,17 +68,18 @@ namespace pinocchio
bp::def("computeDistances",
(std::size_t (*)(const GeometryModel &, GeometryData &))&computeDistances,
bp::args("geometry model","geometry data"),
bp::args("geometry_model","geometry_data"),
"Compute the distance between each collision pair for a given GeometryModel and associated GeometryData."
);
bp::def("computeDistances",
&computeDistances<double,0,JointCollectionDefaultTpl,VectorXd>,
bp::args("model","data","geometry model","geometry data","Configuration q (size Model::nq)"),
bp::args("model","data","geometry_model","geometry_data","q"),
"Update the geometry for a given configuration and"
"compute the distance between each collision pair"
);
#endif // PINOCCHIO_WITH_HPP_FCL
#endif // PINOCCHIO_WITH_HPP_FCL
}
} // namespace python
} // namespace pinocchio
......@@ -102,7 +102,7 @@ class GepettoVisualizer(BaseVisualizer):
gui.setScale(meshName, npToTuple(meshScale))
if geometry_object.overrideMaterial:
gui.setColor(meshName, npToTuple(meshColor))
if meshTexturePath is not '':
if meshTexturePath != '':
gui.setTexture(meshName, meshTexturePath)
def loadViewerModel(self, rootNodeName="pinocchio"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment