diff --git a/capabilities/CMakeLists.txt b/capabilities/CMakeLists.txt index e3d4d0c86..3aa7a88c5 100644 --- a/capabilities/CMakeLists.txt +++ b/capabilities/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(moveit_task_constructor_capabilities) find_package(ament_cmake REQUIRED) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 48cfd1b9d..15eaba553 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(moveit_task_constructor_core) find_package(ament_cmake REQUIRED) diff --git a/core/include/moveit/task_constructor/stage.h b/core/include/moveit/task_constructor/stage.h index dfeb4c1df..af4ec063c 100644 --- a/core/include/moveit/task_constructor/stage.h +++ b/core/include/moveit/task_constructor/stage.h @@ -283,7 +283,7 @@ class PropagatingEitherWayPrivate; /** Base class for stages that can propagate InterfaceStates * * They read an InterfaceState on one side (start or end) and - * push a new InterfaceState to the opposite site. + * push a new InterfaceState to the opposite side. * By default, the class auto-derives its actual propagation direction from the context. * In order to enforce forward, backward, or bothway propagation, one can use restrictDirection(). */ diff --git a/core/python/bindings/src/core.cpp b/core/python/bindings/src/core.cpp index 5825d0679..f770131d1 100644 --- a/core/python/bindings/src/core.cpp +++ b/core/python/bindings/src/core.cpp @@ -95,6 +95,8 @@ void export_core(pybind11::module& m) { } }); + py::classh(m, "Introspection", "Introspection class"); + py::classh(m, "Solution", "Abstract base class for solutions of a stage") .def_property("cost", &SolutionBase::cost, &SolutionBase::setCost, "float: Cost associated with the solution") .def_property("comment", &SolutionBase::comment, &SolutionBase::setComment, @@ -109,12 +111,12 @@ void export_core(pybind11::module& m) { ":visualization_msgs:`Marker`: Markers to visualize important aspects of the trajectory (read-only)") .def( "toMsg", - [](const SolutionBase& self) { + [](const SolutionBase& self, moveit::task_constructor::Introspection* introspection) { moveit_task_constructor_msgs::msg::Solution msg; - self.toMsg(msg); + self.toMsg(msg, introspection); return msg; }, - "Convert to the ROS message ``Solution``"); + "Convert to the ROS message ``Solution``", py::arg("introspection") = nullptr); py::classh(m, "SubTrajectory", "Solution trajectory connecting two InterfaceStates of a stage") @@ -462,6 +464,8 @@ void export_core(pybind11::module& m) { .def( "setCostTerm", [](Task& self, const LambdaCostTerm::SubTrajectoryShortSignature& f) { self.setCostTerm(f); }, "Specify a function to calculate trajectory costs") + .def("introspection", &Task::introspection, py::return_value_policy::reference_internal, + "Access introspection object") .def("reset", &Task::reset, "Reset task (and all its stages)") .def("init", py::overload_cast<>(&Task::init), "Initialize the task (and all its stages)") .def("plan", &Task::plan, "max_solutions"_a = 0, R"( diff --git a/core/python/bindings/src/core.h b/core/python/bindings/src/core.h index 9fa71a6e9..9c7f4e3de 100644 --- a/core/python/bindings/src/core.h +++ b/core/python/bindings/src/core.h @@ -140,3 +140,4 @@ PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::Fallbacks) PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::Merger) PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::WrapperBase) PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::Task) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::Introspection) diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 3125f740d..5643c5885 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(moveit_task_constructor_demo) set(CMAKE_CXX_STANDARD 17) diff --git a/msgs/CMakeLists.txt b/msgs/CMakeLists.txt index 428076e70..4b2c0d793 100644 --- a/msgs/CMakeLists.txt +++ b/msgs/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(moveit_task_constructor_msgs) find_package(ament_cmake REQUIRED) diff --git a/rviz_marker_tools/CMakeLists.txt b/rviz_marker_tools/CMakeLists.txt index 3311b9dec..df61cd595 100644 --- a/rviz_marker_tools/CMakeLists.txt +++ b/rviz_marker_tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(rviz_marker_tools) find_package(ament_cmake REQUIRED) diff --git a/visualization/CMakeLists.txt b/visualization/CMakeLists.txt index 82de00f24..a220b3a62 100644 --- a/visualization/CMakeLists.txt +++ b/visualization/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(moveit_task_constructor_visualization) find_package(ament_cmake REQUIRED)