diff --git a/include/movex/waypoint.hpp b/include/movex/waypoint.hpp index d8d95c1f..96b1e040 100644 --- a/include/movex/waypoint.hpp +++ b/include/movex/waypoint.hpp @@ -51,7 +51,7 @@ struct Waypoint { // explicit Waypoint(const Affine& affine, double blend_max_distance): affine(affine), blend_max_distance(blend_max_distance) {} explicit Waypoint(const Affine& affine, std::optional elbow, double blend_max_distance): affine(affine), elbow(elbow), blend_max_distance(blend_max_distance), reference_type(ReferenceType::Absolute) {} - + explicit Waypoint(const Affine& affine, double velocity_rel, double blend_max_distance, std::optional elbow): affine(affine), velocity_rel(velocity_rel), blend_max_distance(blend_max_distance), elbow(elbow), reference_type(ReferenceType::Absolute) {} Affine getTargetAffine(const Affine& frame, const Affine& old_affine) const { switch (reference_type) { diff --git a/src/frankx/python.cpp b/src/frankx/python.cpp index cc081c50..04e35105 100644 --- a/src/frankx/python.cpp +++ b/src/frankx/python.cpp @@ -72,6 +72,7 @@ PYBIND11_MODULE(_frankx, m) { .def(py::init(), "minimum_time"_a) .def(py::init(), "affine"_a, "reference_type"_a = ReferenceType::Absolute, "dynamic_rel"_a = 1.0) .def(py::init(), "affine"_a, "elbow"_a, "reference_type"_a = ReferenceType::Absolute, "dynamic_rel"_a = 1.0) + .def(py::init>(), "affine"_a, "velocity_rel"_a, "blend_max_distance"_a, "elbow"_a = std::nullopt) .def_readwrite("velocity_rel", &Waypoint::velocity_rel) .def_readonly("affine", &Waypoint::affine) .def_readonly("elbow", &Waypoint::elbow)