@@ -95,6 +95,8 @@ void export_core(pybind11::module& m) {
95
95
}
96
96
});
97
97
98
+ py::classh<Introspection>(m, " Introspection" , " Introspection class" );
99
+
98
100
py::classh<SolutionBase>(m, " Solution" , " Abstract base class for solutions of a stage" )
99
101
.def_property (" cost" , &SolutionBase::cost, &SolutionBase::setCost, " float: Cost associated with the solution" )
100
102
.def_property (" comment" , &SolutionBase::comment, &SolutionBase::setComment,
@@ -109,12 +111,12 @@ void export_core(pybind11::module& m) {
109
111
" :visualization_msgs:`Marker`: Markers to visualize important aspects of the trajectory (read-only)" )
110
112
.def (
111
113
" toMsg" ,
112
- [](const SolutionBase& self) {
114
+ [](const SolutionBase& self, moveit::task_constructor::Introspection* introspection ) {
113
115
moveit_task_constructor_msgs::Solution msg;
114
- self.toMsg (msg);
116
+ self.toMsg (msg, introspection );
115
117
return msg;
116
118
},
117
- " Convert to the ROS message ``Solution``" );
119
+ " Convert to the ROS message ``Solution``" , py::arg ( " introspection " ) = nullptr );
118
120
119
121
py::classh<SubTrajectory, SolutionBase>(m, " SubTrajectory" ,
120
122
" Solution trajectory connecting two InterfaceStates of a stage" )
@@ -462,6 +464,8 @@ void export_core(pybind11::module& m) {
462
464
.def (
463
465
" setCostTerm" , [](Task& self, const LambdaCostTerm::SubTrajectoryShortSignature& f) { self.setCostTerm (f); },
464
466
" Specify a function to calculate trajectory costs" )
467
+ .def (" introspection" , &Task::introspection, py::return_value_policy::reference_internal,
468
+ " Access introspection object" )
465
469
.def (" reset" , &Task::reset, " Reset task (and all its stages)" )
466
470
.def (" init" , py::overload_cast<>(&Task::init), " Initialize the task (and all its stages)" )
467
471
.def (" plan" , &Task::plan, " max_solutions" _a = 0 , R"(
0 commit comments