diff --git a/bindings/python/multibody/geometry-object.hpp b/bindings/python/multibody/geometry-object.hpp index 8cb47618b0..420684917e 100644 --- a/bindings/python/multibody/geometry-object.hpp +++ b/bindings/python/multibody/geometry-object.hpp @@ -23,9 +23,9 @@ namespace pinocchio : public boost::python::def_visitor< GeometryObjectPythonVisitor > { typedef GeometryObject::CollisionGeometryPtr CollisionGeometryPtr; - + template - void visit(PyClass& cl) const + void visit(PyClass& cl) const { cl .def(bp::init("GeometryType") .value("VISUAL",VISUAL) .value("COLLISION",COLLISION) @@ -107,7 +107,7 @@ namespace pinocchio } }; - + } // namespace python } // namespace pinocchio diff --git a/bindings/python/multibody/model.hpp b/bindings/python/multibody/model.hpp index 571eb48599..4f75b6e5ff 100644 --- a/bindings/python/multibody/model.hpp +++ b/bindings/python/multibody/model.hpp @@ -220,8 +220,8 @@ namespace pinocchio .add_property("nvs",&Model::nvs) .add_property("parents",&Model::parents) .add_property("names",&Model::names) - .add_property("name",&Model::name) - .add_property("referenceConfigurations", &Model::referenceConfigurations) + .def_readwrite("name",&Model::name) + .def_readwrite("referenceConfigurations", &Model::referenceConfigurations) .def_readwrite("rotorInertia",&Model::rotorInertia, "Vector of rotor inertia parameters.") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c7c255ba36..7638fcf0c7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -67,7 +67,7 @@ IF(BUILD_PYTHON_INTERFACE) inverse-dynamics-derivatives ) - IF(BUILD_WITH_UDRF_SUPPORT) + IF(BUILD_WITH_URDF_SUPPORT) LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES overview-urdf gepetto-viewer @@ -77,7 +77,7 @@ IF(BUILD_PYTHON_INTERFACE) robot-wrapper-viewer geometry-models ) - ENDIF(BUILD_WITH_UDRF_SUPPORT) + ENDIF(BUILD_WITH_URDF_SUPPORT) IF(hpp-fcl_FOUND) LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES diff --git a/examples/build-reduced-model.py b/examples/build-reduced-model.py index d05b03cb4d..d8b7a31f59 100644 --- a/examples/build-reduced-model.py +++ b/examples/build-reduced-model.py @@ -1,12 +1,13 @@ import pinocchio as pin import numpy as np -from os.path import* + +from os.path import * # Goal: Build a reduced model from an existing URDF model by fixing the desired joints at a specified position. # Load UR robot arm # This path refers to Pinocchio source code but you can define your own directory here. -pinocchio_model_dir = join(dirname(os.dirname(str(abspath(__file__)))), "models") +pinocchio_model_dir = join(dirname(dirname(str(abspath(__file__)))), "models") model_path = pinocchio_model_dir + '/others/robots' mesh_dir = model_path # You should change here to set up your own URDF file diff --git a/package.xml b/package.xml index 445b6314cc..97617b9343 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ pinocchio - 2.5.2 + 2.5.3 A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives. diff --git a/unittest/python/bindings_model.py b/unittest/python/bindings_model.py index 20be56a1a9..4c7ba077d8 100644 --- a/unittest/python/bindings_model.py +++ b/unittest/python/bindings_model.py @@ -14,6 +14,7 @@ def test_empty_model_sizes(self): self.assertEqual(model.nbodies, 1) self.assertEqual(model.nq, 0) self.assertEqual(model.nv, 0) + model.name = "empty_model" def test_add_joint(self): model = pin.Model()