Skip to content

Commit 8d2d944

Browse files
Merge branch 'humble' into action_payload
2 parents bc5297e + 3da7c29 commit 8d2d944

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ wrap your Nodes into plugins that can be loaded at run-time.
3333

3434
## Acknowledgements
3535

36-
A lot of code is either inspired or copied from [Nav2](https://navigation.ros.org/).
36+
A lot of code is either inspired or copied from [Nav2](https://docs.nav2.org/).
3737

3838
For this reason, we retain the same license and copyright.

behaviortree_ros2/include/behaviortree_ros2/plugins.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ namespace BT
2525
constexpr const char* ROS_PLUGIN_SYMBOL = "BT_RegisterRosNodeFromPlugin";
2626
}
2727

28+
/* Use this macro to automatically register one or more custom Nodes
29+
* into a factory that require access to the BT::RosNodeParams.
30+
* For instance:
31+
*
32+
* BT_REGISTER_ROS_NODES(factory, params)
33+
* {
34+
* factory.registerNodeType<SpecialNode>("SpecialNode", params);
35+
* }
36+
*
37+
* IMPORTANT: this function MUST be declared in a cpp file, NOT a header file.
38+
* You must add the definition [BT_PLUGIN_EXPORT] in CMakeLists.txt using:
39+
*
40+
* target_compile_definitions(my_plugin_target PRIVATE BT_PLUGIN_EXPORT )
41+
*/
42+
43+
#define BT_REGISTER_ROS_NODES(factory, params) \
44+
BTCPP_EXPORT void BT_RegisterRosNodeFromPlugin(BT::BehaviorTreeFactory& factory, \
45+
const BT::RosNodeParams& params)
46+
2847
// Use this macro to generate a plugin for:
2948
//
3049
// - BT::RosActionNode

behaviortree_ros2/src/tree_execution_server.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ TreeExecutionServer::handle_goal(const rclcpp_action::GoalUUID& /* uuid */,
126126
{
127127
return rclcpp_action::GoalResponse::REJECT;
128128
}
129-
130129
return rclcpp_action::GoalResponse::ACCEPT_AND_EXECUTE;
131130
}
132131

0 commit comments

Comments
 (0)