{"id":23112014,"url":"https://github.com/lightaxis/bt_lite","last_synced_at":"2025-06-15T20:34:01.802Z","repository":{"id":154353832,"uuid":"535245428","full_name":"lightAxis/BT_Lite","owner":"lightAxis","description":"Light weight, embedded friendly Behavior Tree","archived":false,"fork":false,"pushed_at":"2022-10-09T07:37:58.000Z","size":656,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T11:41:30.692Z","etag":null,"topics":["behavior-tree","cpp","embedded"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightAxis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-11T09:13:29.000Z","updated_at":"2023-06-07T15:40:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"174ea0fd-39c4-4146-9998-bff5490ff0c0","html_url":"https://github.com/lightAxis/BT_Lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightAxis%2FBT_Lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightAxis%2FBT_Lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightAxis%2FBT_Lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightAxis%2FBT_Lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightAxis","download_url":"https://codeload.github.com/lightAxis/BT_Lite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097972,"owners_count":20883127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behavior-tree","cpp","embedded"],"created_at":"2024-12-17T02:15:39.271Z","updated_at":"2025-04-03T23:44:30.626Z","avatar_url":"https://github.com/lightAxis.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"BT_Lite\n===\nBT_Lite is made to use light-weight Behavior Tree with embedded systems. Visualize, Edit, Generate XML flie with Groot[(github)](https://github.com/BehaviorTree/Groot). Using generated XML BT structure file, generator/BT_Generator.py will generate **Custom Header-Only Library** optimized for BT structure. Therefore we cannot support dynamical changes of Behavior Tree structure on runtime. As wee want to use Behavior Tree in Embedded environment, there's no 'new' or 'delete' for memory allocation. All memories needed for custom generated header-only library is specifically calulated at complile time. We use Delegate.h[(github)](https://github.com/rosbacke/delegate) to use pass the custom tick actions of custom behavior tree nodes. \n\nHow To Use\n---\n1. Make Behavior Tree XML \nUsing Groot.   \nParameter means   \n3__uint8_t : const param 3, typename uint8_t   \n{name1__float} parameter name : name1, typename : float, blackboard param\n\n2. Make Custom Header-Only BT Library\nUsing generate/BT_Gen.py\n    - arg -b : Behavior tree namespace name WIP   \n    - arg -o : output directory WIP\n    - arg -x : input XML behavior tree structure file path WIP\n\n3. Integrate to CMake   \nWIP\n\n4. Use Example   \nUse at main.cpp\n```cpp\n#include \u003cstdio.h\u003e\n\n#include \u003cBT_TEST/BT_TEST.h\u003e\n\nnamespace MY\n{\n    using namespace BT_TEST;\n\n    class testTick\n    {\n    public:\n        NodeStatus TickDelegate(const float \u0026f, int *i, NODE::NodeBase *node)\n        {\n            printf(\"this is node : %s , customActionTick\\n\", node-\u003egetName());\n            printf(\"now state : %s\\n\", Cvt::getNodeStatusName(node-\u003egetStatus()));\n            printf(\"%f, %d\\n\", f, *i);\n            *i = f * 10;\n            printf(\"%f, %d\\n\", f, *i);\n            return NodeStatus::SUCCESS;\n        }\n\n        NodeStatus TickDelegate2(const float \u0026f, float *i, NODE::NodeBase *node)\n        {\n            printf(\"this is node : %s , customActionTick\\n\", node-\u003egetName());\n            printf(\"now state : %s\\n\", Cvt::getNodeStatusName(node-\u003egetStatus()));\n            printf(\"%f, %f\\n\", f, *i);\n            *i = f * 10;\n            printf(\"%f, %f\\n\", f, *i);\n            return NodeStatus::SUCCESS;\n        }\n\n        delegate\u003cNodeStatus(const float \u0026, int *, NODE::NodeBase *)\u003e makeTickDel()\n        {\n            delegate\u003cNodeStatus(const float \u0026, int *, NODE::NodeBase *)\u003e del;\n            del.set\u003ctestTick, \u0026testTick::TickDelegate\u003e(*this);\n            return del;\n        }\n\n        delegate\u003cNodeStatus(const float \u0026, float *, NODE::NodeBase *)\u003e makeTickDel2()\n        {\n            delegate\u003cNodeStatus(const float \u0026, float *, NODE::NodeBase *)\u003e del;\n            del.set\u003ctestTick, \u0026testTick::TickDelegate2\u003e(*this);\n            return del;\n        }\n\n    private:\n    };\n}\n\nint main(int argc, char **argv)\n{\n    MY::testTick tickk;\n\n    BT_TEST::RootTree.set_CustomAction1_tickDel(tickk.makeTickDel());\n    BT_TEST::RootTree.set_CustomAction2_tickDel(tickk.makeTickDel2());\n\n    BT_TEST::RootTree.build();\n\n    BT_TEST::StatusChangeLog_t *logs;\n    int logCount = 0;\n    for (int i = 0; i \u003c 3; i++)\n    {\n        BT_TEST::logger.clearLogs();\n        BT_TEST::RootTree.Tick();\n        BT_TEST::logger.getLogs();\n        logCount = BT_TEST::logger.getLogSize();\n    }\n    return 0;\n}\n```\n\n\nUML Diagram\n---\nInspired from BehaviorTree.CPP[(github)](https://github.com/BehaviorTree/BehaviorTree.CPP)   \n![UML](./out/UML/test.png)\n\nHeader Include Diagram\n---\nNo Circular Dependancies\n![Header](./out/Header/BT_Lite_Headers.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightaxis%2Fbt_lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightaxis%2Fbt_lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightaxis%2Fbt_lite/lists"}