|
| 1 | +diff --git a/python/bindings/CMakeLists.txt b/python/bindings/CMakeLists.txt |
| 2 | +index 26c86ac..d5cd670 100644 |
| 3 | +--- a/python/bindings/CMakeLists.txt |
| 4 | ++++ b/python/bindings/CMakeLists.txt |
| 5 | +@@ -17,6 +17,7 @@ pybind11_add_module(pymoveit_mtc |
| 6 | + ) |
| 7 | + target_include_directories(pymoveit_mtc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) |
| 8 | + target_link_libraries(pymoveit_mtc PUBLIC ${PROJECT_NAME} ${PROJECT_NAME}_stages ${PROJECT_NAME}_python_tools) |
| 9 | ++set_target_properties(pymoveit_mtc PROPERTIES CXX_SCAN_FOR_MODULES OFF) |
| 10 | + |
| 11 | + # install libs |
| 12 | + install(TARGETS ${PROJECT_NAME}_python_tools |
| 13 | +diff --git a/src/cost_terms.cpp b/src/cost_terms.cpp |
| 14 | +index 9ddb94f..9896d36 100644 |
| 15 | +--- a/src/cost_terms.cpp |
| 16 | ++++ b/src/cost_terms.cpp |
| 17 | +@@ -298,8 +298,8 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const |
| 18 | + } }; |
| 19 | + |
| 20 | + auto collision_comment = [=](const auto& distance) { |
| 21 | +- return fmt::format(PREFIX + "allegedly valid solution collides between '{}' and '{}'", distance.link_names[0], |
| 22 | +- distance.link_names[1]); |
| 23 | ++ return fmt::format(fmt::runtime(PREFIX + "allegedly valid solution collides between '{}' and '{}'"), |
| 24 | ++ distance.link_names[0], distance.link_names[1]); |
| 25 | + }; |
| 26 | + |
| 27 | + double distance{ 0.0 }; |
| 28 | +@@ -313,10 +313,10 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const |
| 29 | + } |
| 30 | + distance = distance_data.distance; |
| 31 | + if (!cumulative) |
| 32 | +- comment = fmt::format(PREFIX + "distance {} between '{}' and '{}'", distance, distance_data.link_names[0], |
| 33 | +- distance_data.link_names[1]); |
| 34 | ++ comment = fmt::format(fmt::runtime(PREFIX + "distance {} between '{}' and '{}'"), distance, |
| 35 | ++ distance_data.link_names[0], distance_data.link_names[1]); |
| 36 | + else |
| 37 | +- comment = fmt::format(PREFIX + "cumulative distance {}", distance); |
| 38 | ++ comment = fmt::format(fmt::runtime(PREFIX + "cumulative distance {}"), distance); |
| 39 | + } else { // check trajectory |
| 40 | + for (size_t i = 0; i < s.trajectory()->getWayPointCount(); ++i) { |
| 41 | + auto distance_data = check_distance(state, s.trajectory()->getWayPoint(i)); |
| 42 | +@@ -327,7 +327,7 @@ double Clearance::operator()(const SubTrajectory& s, std::string& comment) const |
| 43 | + distance += distance_data.distance; |
| 44 | + } |
| 45 | + distance /= s.trajectory()->getWayPointCount(); |
| 46 | +- comment = fmt::format(PREFIX + "average{} distance: {}", (cumulative ? " cumulative" : ""), distance); |
| 47 | ++ comment = fmt::format(fmt::runtime(PREFIX + "average{} distance: {}"), (cumulative ? " cumulative" : ""), distance); |
| 48 | + } |
| 49 | + |
| 50 | + return distance_to_cost(distance); |
| 51 | +diff --git a/src/properties.cpp b/src/properties.cpp |
| 52 | +index 8c001de..6fd0217 100644 |
| 53 | +--- a/src/properties.cpp |
| 54 | ++++ b/src/properties.cpp |
| 55 | +@@ -38,6 +38,7 @@ |
| 56 | + |
| 57 | + #include <moveit/task_constructor/properties.h> |
| 58 | + #include <moveit/task_constructor/fmt_p.h> |
| 59 | ++#include <boost/core/demangle.hpp> |
| 60 | + #include <functional> |
| 61 | + #include <rclcpp/logging.hpp> |
| 62 | + #include <rclcpp/clock.hpp> |
| 63 | +diff --git a/src/stage.cpp b/src/stage.cpp |
| 64 | +index b64ce0a..a9eb8a0 100644 |
| 65 | +--- a/src/stage.cpp |
| 66 | ++++ b/src/stage.cpp |
| 67 | +@@ -909,8 +909,9 @@ bool Connecting::compatible(const InterfaceState& from_state, const InterfaceSta |
| 68 | + const planning_scene::PlanningSceneConstPtr& from = from_state.scene(); |
| 69 | + const planning_scene::PlanningSceneConstPtr& to = to_state.scene(); |
| 70 | + |
| 71 | +- auto false_with_debug = [](auto... args) { |
| 72 | +- RCLCPP_DEBUG_STREAM(rclcpp::get_logger("Connecting"), fmt::format(args...)); |
| 73 | ++ auto false_with_debug = [](fmt::string_view format_str, auto&&... args) { |
| 74 | ++ RCLCPP_DEBUG_STREAM(rclcpp::get_logger("Connecting"), |
| 75 | ++ fmt::vformat(format_str, fmt::make_format_args(args...))); |
| 76 | + return false; |
| 77 | + }; |
| 78 | + |
0 commit comments