Skip to content

Latest commit

 

History

History
50 lines (41 loc) · 2.53 KB

README.md

File metadata and controls

50 lines (41 loc) · 2.53 KB

Build Status npm version

BehaviorTreeFlatBuffer

A wrapper for BehaviorTree.CPP for the purpose of writing FlatBuffers. Pass a javascript callback and a valid Groot xml file. A log in FlatBuffer format will be written via the callback in Int8Array Buffers.

Dependencies

Publish notes to myself

  • Publish with:
nvm use 14
source emsdk/emsdk_env.sh
make wasm build
npm publish

Quirks about WASM

  • Not sure if I know how to shutdown the wasm properly. It may be better to only have one instance
    • This stems from how I am including the .js file output by emscripten. Not sure how to fix this.
  • My test has the wasm file in the path of /out where it is built, but publish requires a different path
    • Thus I patch the .js file

Quirks about wrapper

  • BehaviorTree.CPP is well written and throws many errors during the operations I need. Thus I patched out some error checking. I generated the patch with:
cd lib/BehaviorTree.CPP/src
diff xml_parsing.cpp xml_parsing2.cpp > ../../../patch/xml_parsing.patch

or

cd lib/BehaviorTree.CPP/src
cp tree_node.cpp tree_node2.cpp
git checkout tree_node.cpp
diff tree_node.cpp tree_node2.cpp > ../../../patch/tree_node.patch

See Also Emscripten

See Also Make/patch