Skip to content

Commit 10c9bc8

Browse files
committed
Build error and test failure fix
1 parent 02d4b63 commit 10c9bc8

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

roadmap_explorer/src/ExplorationServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ nav2_util::CallbackReturn ExplorationServer::on_activate(const rclcpp_lifecycle:
7575
#ifdef ROS_DISTRO_HUMBLE
7676
rmw_qos_profile_services_default,
7777
#elif ROS_DISTRO_JAZZY || ROS_DISTRO_KILTED
78-
rclcpp::QoS(rclcpp::ServicesQoSProfile()),
78+
rclcpp::ServicesQoS(),
7979
#else
8080
#error "Unsupported ROS distro"
8181
#endif

roadmap_explorer/tests/bt_plugins/test_log_iteration_plugin.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ TEST_F(LogIterationPluginTest, BasicThreadSafety)
322322
context_ = createContext();
323323
plugin_->registerNodes(*factory_, context_);
324324

325-
// Create a simple behavior tree XML with multiple LogIterationBT nodes
325+
#ifdef ROS_DISTRO_HUMBLE
326+
// For Humble (BT.CPP 3.x): Use Parallel node
326327
std::string bt_xml = R"(
327328
<root BTCPP_format="4">
328329
<BehaviorTree ID="ThreadSafetyTest">
@@ -333,6 +334,22 @@ TEST_F(LogIterationPluginTest, BasicThreadSafety)
333334
</BehaviorTree>
334335
</root>
335336
)";
337+
#elif ROS_DISTRO_JAZZY || ROS_DISTRO_KILTED
338+
// For Jazzy/Kilted (BT.CPP 4.x): Use Sequence instead
339+
// Parallel nodes behave differently with tickOnce() in BT.CPP 4.x
340+
std::string bt_xml = R"(
341+
<root BTCPP_format="4">
342+
<BehaviorTree ID="ThreadSafetyTest">
343+
<Sequence>
344+
<LogIterationBT name="thread_test_1" />
345+
<LogIterationBT name="thread_test_2" />
346+
</Sequence>
347+
</BehaviorTree>
348+
</root>
349+
)";
350+
#else
351+
#error "Unsupported ROS distro"
352+
#endif
336353

337354
// Create blackboard
338355
auto blackboard = BT::Blackboard::create();

0 commit comments

Comments
 (0)