ros2 添加自定义行为树

1、编写注册行为树节点

# 添加工作空间生成行为树节点.so文件路径
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/q/software/cleaner/install/tasks/lib

# cmakelists.txt
add_library(nav2_movebase_action_bt_node SHARED src/movebase.cpp)
ament_target_dependencies(nav2_movebase_action_bt_node behaviortree_cpp_v3 rclcpp)
install(TARGETS nav2_movebase_action_bt_node
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION lib/${PROJECT_NAME}
)
ament_export_libraries(nav2_movebase_action_bt_node)

你可能感兴趣的:(linux,运维,服务器)