Skip to content

Commit

Permalink
Merge branch 'master' into ros2
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jan 19, 2025
2 parents 325c401 + 8318546 commit cf1c452
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion capabilities/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/include/moveit/task_constructor/stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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().
*/
Expand Down
10 changes: 7 additions & 3 deletions core/python/bindings/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ void export_core(pybind11::module& m) {
}
});

py::classh<Introspection>(m, "Introspection", "Introspection class");

py::classh<SolutionBase>(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,
Expand All @@ -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<SubTrajectory, SolutionBase>(m, "SubTrajectory",
"Solution trajectory connecting two InterfaceStates of a stage")
Expand Down Expand Up @@ -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"(
Expand Down
1 change: 1 addition & 0 deletions core/python/bindings/src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion rviz_marker_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit cf1c452

Please sign in to comment.