From d87f5f9b0d857c19d1341cabd1bf7be7a9f53cfa Mon Sep 17 00:00:00 2001 From: Tim Schneider Date: Tue, 28 May 2024 00:55:15 +0200 Subject: [PATCH] Made python binding of JointWaypoint accept JointState targets --- python/python.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/python.cpp b/python/python.cpp index c07af435..aadfa913 100644 --- a/python/python.cpp +++ b/python/python.cpp @@ -747,14 +747,14 @@ PYBIND11_MODULE(_franky, m) { "return_when_finished"_a = true, "finish_wait_factor"_a = 1.2); - py::class_>(m, "JointWaypoint") + py::class_>(m, "JointWaypoint") .def(py::init<>( []( - const Vector7d &target, + const JointState &target, ReferenceType reference_type, RelativeDynamicsFactor relative_dynamics_factor, std::optional minimum_time) { - return Waypoint{ + return Waypoint{ target, reference_type, relative_dynamics_factor, minimum_time}; } ), @@ -762,10 +762,10 @@ PYBIND11_MODULE(_franky, m) { py::arg_v("reference_type", ReferenceType::Absolute, "_franky.ReferenceType.Absolute"), "relative_dynamics_factor"_a = 1.0, "minimum_time"_a = std::nullopt) - .def_readonly("target", &Waypoint::target) - .def_readonly("reference_type", &Waypoint::reference_type) - .def_readonly("relative_dynamics_factor", &Waypoint::relative_dynamics_factor) - .def_readonly("minimum_time", &Waypoint::minimum_time); + .def_readonly("target", &Waypoint::target) + .def_readonly("reference_type", &Waypoint::reference_type) + .def_readonly("relative_dynamics_factor", &Waypoint::relative_dynamics_factor) + .def_readonly("minimum_time", &Waypoint::minimum_time); py::class_, std::shared_ptr>( m, "JointWaypointMotion")