From 1fef829feb5117db3cb5e087c5ed4242bd70efb9 Mon Sep 17 00:00:00 2001 From: Giulio Romualdi Date: Sat, 6 Nov 2021 14:54:41 +0100 Subject: [PATCH] Make rotation and position property readable and writable in the pybind11 Transform bindings --- bindings/pybind11/idyntree_core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/pybind11/idyntree_core.cpp b/bindings/pybind11/idyntree_core.cpp index 2292a772890..c699a0b06bc 100644 --- a/bindings/pybind11/idyntree_core.cpp +++ b/bindings/pybind11/idyntree_core.cpp @@ -31,8 +31,8 @@ void transformClassDefinition(py::class_& transform) { .def(py::init()) .def(py::init&>()) .def_static("Identity", &Transform::Identity) - .def_property_readonly("rotation", &Transform::getRotation) - .def_property_readonly("position", &Transform::getPosition) + .def_property("rotation", &Transform::getRotation, &Transform::setRotation) + .def_property("position", &Transform::getPosition, &Transform::setPosition) .def("inverse", &Transform::inverse) .def(py::self * py::self) .def(