behaviortree / groot Goto Github PK
View Code? Open in Web Editor NEWGraphical Editor to create BehaviorTrees. Compliant with BehaviorTree.CPP
Graphical Editor to create BehaviorTrees. Compliant with BehaviorTree.CPP
I have two issues while using Groot:
FileLogger logger_file(tree, "bt_trace.fbl");
But, when I try to open it bt_trace.fbl with Groot, it crashes sending the following error:
Groot/depend/BehaviorTree.CPP/include/behaviortree_cpp/flatbuffers/flatbuffers.h:1988: flatbuffers::Verifier::Verifier(const uint8_t*, size_t, flatbuffers::uoffset_t, flatbuffers::uoffset_t, bool): Assertion `size_ < FLATBUFFERS_MAX_BUFFER_SIZE' failed.
Aborted (core dumped)
Usefull info:
Any help will be apreciated.
Is compilation using catkin (catkin-tools) still supported? I assumed that it was possible, since the readme states the following:
Some functionalities of the code related to ROS will work only if the project is compiled with with catkin.
After installed BehaviorTree.CPP through apt (ros-melodic-behaviortree-cpp-v3
), I get the following errors when I try catkin build
:
In file included from /opt/ros/melodic/include/behaviortree_cpp/flatbuffers/flatbuffers.h:20:0,
from /opt/ros/melodic/include/behaviortree_cpp/flatbuffers/BT_logger_generated.h:7,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/utils.h:10,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/models/BehaviorTreeNodeModel.hpp:17,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/models/BehaviorTreeNodeModel.cpp:1:
/opt/ros/melodic/include/behaviortree_cpp/flatbuffers/base.h:56:10: fatal error: flatbuffers/stl_emulation.h: No such file or directory
#include "flatbuffers/stl_emulation.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since BehaviorTree.CPPv3 supports the definition of our own control nodes. Would it be possible to use these with Groot ?
Related to this: BehaviorTree/BehaviorTree.CPP#140
Just wanted to try Groot out for a test drive, but immediately segfaults :(
I am opening editor and want to pull a node on the drawing area.
Also happening with monitoring, unusable on my system.
Can't be normal behavior. Maybe my system is somehow not supported?
Qt Creator 4.9.0 based on Qt 5.12.2
Kubuntu 18.04
4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64
This errors come from current master branch, just tested the 1.0 release and these errors are gone.
==4561== Invalid read of size 8
==4561== at 0x21A6F0: GraphicContainer::view() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x2128AE: MainWindow::saveCurrentState() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x212A9E: MainWindow::onPushUndo() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x23383D: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::*)()>::call(void (MainWindow::*)(), MainWindow*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x23052D: void QtPrivate::FunctionPointer<void (MainWindow::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::*)(), MainWindow*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x22B78C: QtPrivate::QSlotObject<void (MainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x692177E: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5)
==4561== by 0x287C5A: GraphicContainer::undoableChange() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x2555BE: GraphicContainer::onNodeCreated(QtNodes::Node&) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25EBC6: QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QtNodes::Node&>, void, void (GraphicContainer::*)(QtNodes::Node&)>::call(void (GraphicContainer::*)(QtNodes::Node&), GraphicContainer*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25DCE5: void QtPrivate::FunctionPointer<void (GraphicContainer::*)(QtNodes::Node&)>::call<QtPrivate::List<QtNodes::Node&>, void>(void (GraphicContainer::*)(QtNodes::Node&), GraphicContainer*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25C5FC: QtPrivate::QSlotObject<void (GraphicContainer::*)(QtNodes::Node&), QtPrivate::List<QtNodes::Node&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== Address 0x18 is not stack'd, malloc'd or (recently) free'd
==4561==
==4561==
==4561== Process terminating with default action of signal 11 (SIGSEGV)
==4561== Access not within mapped region at address 0x18
==4561== at 0x21A6F0: GraphicContainer::view() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x2128AE: MainWindow::saveCurrentState() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x212A9E: MainWindow::onPushUndo() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x23383D: QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::*)()>::call(void (MainWindow::*)(), MainWindow*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x23052D: void QtPrivate::FunctionPointer<void (MainWindow::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::*)(), MainWindow*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x22B78C: QtPrivate::QSlotObject<void (MainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x692177E: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5)
==4561== by 0x287C5A: GraphicContainer::undoableChange() (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x2555BE: GraphicContainer::onNodeCreated(QtNodes::Node&) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25EBC6: QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QtNodes::Node&>, void, void (GraphicContainer::*)(QtNodes::Node&)>::call(void (GraphicContainer::*)(QtNodes::Node&), GraphicContainer*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25DCE5: void QtPrivate::FunctionPointer<void (GraphicContainer::*)(QtNodes::Node&)>::call<QtPrivate::List<QtNodes::Node&>, void>(void (GraphicContainer::*)(QtNodes::Node&), GraphicContainer*, void**) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== by 0x25C5FC: QtPrivate::QSlotObject<void (GraphicContainer::*)(QtNodes::Node&), QtPrivate::List<QtNodes::Node&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (in /home/kin/ros_ws/src/Groot/build/Groot)
==4561== If you believe this happened as a result of a stack
==4561== overflow in your program's main thread (unlikely but
==4561== possible), you can try to increase the size of the
==4561== main thread stack using the --main-stacksize= flag.
==4561== The main thread stack size used in this run was 8388608.
==4561==
==4561== HEAP SUMMARY:
==4561== in use at exit: 5,901,606 bytes in 43,091 blocks
==4561== total heap usage: 203,038 allocs, 159,947 frees, 52,491,400 bytes allocated
==4561==
==4561== LEAK SUMMARY:
==4561== definitely lost: 256 bytes in 1 blocks
==4561== indirectly lost: 32 bytes in 1 blocks
==4561== possibly lost: 28,131 bytes in 437 blocks
==4561== still reachable: 5,873,187 bytes in 42,652 blocks
==4561== of which reachable via heuristic:
==4561== newarray : 856 bytes in 22 blocks
==4561== multipleinheritance: 65,104 bytes in 86 blocks
==4561== suppressed: 0 bytes in 0 blocks
==4561== Rerun with --leak-check=full to see details of leaked memory
==4561==
==4561== For counts of detected and suppressed errors, rerun with: -v
==4561== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
When a port is added or removed from a subtree using groot and the file is saved the subtree disappears.
It sends out a compilation error while doing the 'make'
Following error:
Groot/bt_editor/mainwindow.cpp:908:11: error: ‘QSignalBlocker’ does not name a type
const QSignalBlocker blocker( this );
My qmake version:
QMake version 3.1
Using Qt version 5.12.3 in /opt/Qt/5.12.3/gcc_64/lib
Am I doing anything wrong?
Thank you!
The *.desktop
file is lacking a Categories=
entry.
According to the menu spec,
By including one of the Main Categories in an application's desktop entry file, the application will be ensured that it will show up in a section of the application menu dedicated to this category. If multiple Main Categories are included in a single desktop entry file, the entry may appear more than once in the menu.
Hence, please add at least one of the following in the Categories=
key.
Main Category | Description | Notes |
---|---|---|
AudioVideo | Application for presenting, creating, or processing multimedia (audio/video) | |
Audio | An audio application | Desktop entry must include AudioVideo as well |
Video | A video application | Desktop entry must include AudioVideo as well |
Development | An application for development | |
Education | Educational software | |
Game | A game | |
Graphics | Application for viewing, creating, or processing graphics | |
Network | Network application such as a web browser | |
Office | An office type application | |
Science | Scientific software | |
Settings | Settings applications | Entries may appear in a separate menu or as part of a "Control Center" |
System | System application, "System Tools" such as say a log viewer or network monitor | |
Utility | Small utility application, "Accessories" |
In addition, you could specify one or more from the longer list of Additional Categories.
Please test the result with desktop-file-validate
and make sure it passes.
electron-builder offers native support for this since v19.22.1.. Please see the category
key at https://www.electron.build/configuration/linux-other.
References:
Open Groot and create this (admittedly nonsense) BT:
Save the tree. This results in the following valid XML:
<?xml version="1.0"?>
<root main_tree_to_execute="BehaviorTree">
<!-- ////////// -->
<BehaviorTree ID="BehaviorTree">
<Sequence>
<AlwaysSuccess/>
</Sequence>
</BehaviorTree>
<!-- ////////// -->
<TreeNodesModel/>
<!-- ////////// -->
</root>
Now add another node as a sibling to the Sequence node, like this:
Again, save the file and the produced XML will look like this:
<?xml version="1.0"?>
<root main_tree_to_execute="BehaviorTree">
<!-- ////////// -->
<BehaviorTree ID="BehaviorTree">
<Root>
<AlwaysFailure/>
<Sequence>
<AlwaysSuccess/>
</Sequence>
</Root>
</BehaviorTree>
<!-- ////////// -->
<TreeNodesModel/>
<!-- ////////// -->
</root>
If you shut Groot down and try to load the second file it will complain about the Root node and ask you to remove it. Regardless if you remove it or not, the app will only show you a part of the original BT.
Hello!
Trying to compile groot with catkin_make along with behavior_tree_cpp[devel] tag 2da2731.
I had the following error:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "behavior_tree_cpp"
with any of the following names:
behavior_tree_cppConfig.cmake
behavior_tree_cpp-config.cmake
To solve the problem I changed in groot CMake and package behavior_tree_cpp --> behavior_tree_core
Hi, is it an error in v3 to have a TreeNodeModel like :
<Action ID="faceTo">
<Parameter label="target_key" default="target"/>
</Action>
It seems to work fine but Groot is not recognizing it and therefore not displaying the port.
If that's an error to write such a TreeNodeModel, how should I be supposed to convert it properly to ensure the perfect same behavior ?
Hi,
Recently I installed Groot and I am trying to do a realtime monitor and log replay using groot and the BehaviorTree.cpp/Examples/t05_crossdoor.cpp. I have lib zeromq installed. However, I am having several issues.
First, for the master branch, the monitor does not show the graph, but only telling that some msgs are received. the log replay, on the otherhand, will not change color of nodes and edges. I am also having issues with the xml format. Seems that it does not recognize subtree type, and errors out. I have to modify the crossdoor example so the subtree is insert in place. Also, the first xml format in this link does not work for groot.
Second, it seems that the dev branch's subtree monitor and log replay works. However, I need to open the tree first with the editor, then switch to monitor/log mode. I am not sure this is a bug or feature.
I maybe using it wrong. Any suggestions?
Best Regards,
I think it would be a nice addition if there was a view of currently present Blackboard variables & their values. Or maybe that is implemented and I haven't seen that?
I guess it's just a simple case of getting tree.blackboard_stack
and printing its contents.
Hello, I'm trying to build Groot with Behaviour Tree from ros Dashing
and I get the following errors:
[ 83%] Linking CXX executable behaviortree_cpp_v3_test
/usr/bin/ld: cannot find -lcrossdoor_nodes
/usr/bin/ld: cannot find -ldummy_nodes
collect2: error: ld returned 1 exit status
depend/BehaviorTree.CPP/tests/CMakeFiles/behaviortree_cpp_v3_test.dir/build.make:409: recipe for target 'depend/BehaviorTree.CPP/tests/behaviortree_cpp_v3_test' failed
make[2]: *** [depend/BehaviorTree.CPP/tests/behaviortree_cpp_v3_test] Error 1
CMakeFiles/Makefile2:447: recipe for target 'depend/BehaviorTree.CPP/tests/CMakeFiles/behaviortree_cpp_v3_test.dir/all' failed
make[1]: *** [depend/BehaviorTree.CPP/tests/CMakeFiles/behaviortree_cpp_v3_test.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
EDIT: Strangely enough I can build the project via Clion just fine 🤔
After switching BehaviourTrees.CPP
in depend
to ros2devel
I get :
--- stderr: groot
/usr/bin/ld: cannot find -lbt_sample_nodes
collect2: error: ld returned 1 exit status
make[2]: *** [depend/BehaviorTree.CPP/tests/behaviortree_cpp_v3_test] Error 1
make[1]: *** [depend/BehaviorTree.CPP/tests/CMakeFiles/behaviortree_cpp_v3_test.dir/all] Error 2
Hi,
thanks for sharing your great work here, first of all.
I got error message during compiling the source with $ make.
[ 1%] Automatic MOC, UIC and RCC for target tinyxml2_v7
[ 1%] Built target tinyxml2_v7_autogen
[ 3%] Built target tinyxml2_v7
[ 4%] Automatic MOC, UIC and RCC for target behaviortree_cpp_v3
[ 4%] Built target behaviortree_cpp_v3_autogen
[ 4%] Linking CXX shared library ../../lib/libbehaviortree_cpp_v3.so
/usr/bin/ld: cannot find -ldw
collect2: error: ld returned 1 exit status
depend/BehaviorTree.CPP/CMakeFiles/behaviortree_cpp_v3.dir/build.make:823: recipe for target 'lib/libbehaviortree_cpp_v3.so' failed
make[2]: *** [lib/libbehaviortree_cpp_v3.so] Error 1
CMakeFiles/Makefile2:327: recipe for target 'depend/BehaviorTree.CPP/CMakeFiles/behaviortree_cpp_v3.dir/all' failed
make[1]: *** [depend/BehaviorTree.CPP/CMakeFiles/behaviortree_cpp_v3.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
what can I do for solving.
The variable main_tree is never initialized correctly if a tree and its subtrees are created from scratch.
It should also be possible to change the main_tree before saving it.
Hi,
I started working with Groot recently, but I don't really understand how the workflow with BehaviorTree.CPP works. Let's say I deploy a BehaviorTree.CPP compliant package. This package generates a plugin on compilation that offers some functionality by means of several leaves nodes (for example to control and monitor a given system). I would like other users (they may not be too tech-savy) to compile this package, get access to the nodes that are defined in this plugin and build a behavior tree using just the GUI.
As far as I know the only way to do this right now is to somehow generate a XML tree file that contains the definition of the nodes using this plugin (on runtime?). This same XML file can be later loaded in Groot, and the custom made nodes would be available to select and use from the nodes model list.
Is this correct?
I have been playing around a bit and I managed to import plugins and load whatever nodes it may define into the model list. The load function would look more or less like this (in mainwindow.cpp
):
void MainWindow::loadFromPlugin(const QString& plugin_path)
{
BT::BehaviorTreeFactory factory;
factory.registerFromPlugin(plugin_path.toStdString());
const auto& manifests = factory.manifests();
for(const auto& manifest : manifests)
{
auto registration_id = QString::fromStdString(manifest.registration_ID);
auto node_type = getNodeTypeFromString(QString::fromStdString(BT::toStr(manifest.type)));
using ModelParam = TreeNodeModel::Param;
using NodeParameter = BT::NodeParameters::value_type;
std::vector<ModelParam> node_parameters;
std::transform(manifest.required_parameters.cbegin(), manifest.required_parameters.cend(), std::back_inserter(node_parameters),
[] (const NodeParameter& parameter) { return ModelParam{ QString::fromStdString(parameter.first), QString::fromStdString(parameter.second) }; });
onAddToModelRegistry(TreeNodeModel(registration_id, node_type, node_parameters));
}
}
Would a functionality like this be acceptable? For this to work Groot should be linked against the BehaviorTree.CPP library of course.
How to reproduce:
In case of ROS, All the dependencies should be installed with rosdep. This includes also the following:
sudo apt install qtbase5-dev libqt5svg5-dev libzmq3-dev libdw-dev
-> Thus, we should include those in package.xml
.
e.g. rosdep dependencies get installed with
rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -r
Avoids that every user have to install them manually.
Minor issue.
If I load a BT A and after it I load a BT B, then nodes from A (e.g. SubTree
and Action
) are still listed in the node browser (on the left).
Hey, so I've just updated to the latest and now, whenever I try to save (even from a fresh new xml created from Groot), it says malformed behavior tree.
Hi,
this is not really an issue, but I think it would be a nice feature, which would get rid of some redundant work. I would like to be able to create an condition node in Groot were I could just specify a boolean in the blackboard to check if it is true or false. Right now I always write a very simple function and use the registerSimpleCondition call with the port list.
Note, clicking the expand button after saving and loading the tree works fine.
Backtrace:
Value can't be converted to integer.
0x000055555566852a in GraphicContainer::scene() ()
gdb $ bt
#0 0x000055555566852a in GraphicContainer::scene() ()
#1 0x0000555555661d51 in MainWindow::subTreeExpand(GraphicContainer&, QtNodes::Node&, MainWindow::SubtreeExpandOption) ()
#2 0x0000555555660ea9 in MainWindow::onRequestSubTreeExpand(GraphicContainer&, QtNodes::Node&) ()
#3 0x00005555556826b3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<GraphicContainer&, QtNodes::Node&>, void, void (MainWindow::*)(GraphicContainer&, QtNodes::Node&)>::call(void (MainWindow::*)(GraphicContainer&, QtNodes::Node&), MainWindow*, void**) ()
#4 0x000055555567eff4 in void QtPrivate::FunctionPointer<void (MainWindow::*)(GraphicContainer&, QtNodes::Node&)>::call<QtPrivate::List<GraphicContainer&, QtNodes::Node&>, void>(void (MainWindow::*)(GraphicContainer&, QtNodes::Node&), MainWindow*, void**) ()
#5 0x000055555567abb5 in QtPrivate::QSlotObject<void (MainWindow::*)(GraphicContainer&, QtNodes::Node&), QtPrivate::List<GraphicContainer&, QtNodes::Node&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
#6 0x00007ffff612a75f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00005555556d64c6 in GraphicContainer::requestSubTreeExpand(GraphicContainer&, QtNodes::Node&) ()
#8 0x00005555556a39da in GraphicContainer::onNodeCreated(QtNodes::Node&)::{lambda()#1}::operator()() const ()
#9 0x00005555556a7d47 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, GraphicContainer::onNodeCreated(QtNodes::Node&)::{lambda()#1}>::call({lambda()#1}&, void**) ()
#10 0x00005555556a7b16 in void QtPrivate::Functor<GraphicContainer::onNodeCreated(QtNodes::Node&)::{lambda()#1}, 0>::call<QtPrivate::List<>, void>({lambda()#1}&, void*, {lambda()#1}&*) ()
#11 0x00005555556a7681 in QtPrivate::QFunctorSlotObject<GraphicContainer::onNodeCreated(QtNodes::Node&)::{lambda()#1}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
#12 0x00007ffff612a75f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00005555556d8f07 in SubtreeNodeModel::expandButtonPushed() ()
How to model interactions with the blackboard?
The syntax used in this tutorial seems to suggest that GRoot needs to be extended with an additional custom node:
<SetBlackboard key="OtherGoal" value="-1;3;0.5" />
<MoveBase goal="${OtherGoal}" />
As an alternative, I can model this as a custom Action
node with the two parameters Key
and Value
, but this does not seem to be currently supported by GRoot.
Fail to order correctly the children. Can be reproduced with this XML
<root >
<BehaviorTree>
<Sequence>
<Action ID="very_very_long_name_incredibly_long"/>
<Action ID="short"/>
</Sequence>
</BehaviorTree>
</root>
Hi, I'd like to try out your Groot editor, but I'm having a bit of trouble compiling.
Following steps in the README I do the following:
bdb@tp51:~/projects/Groot$ git submodule init --update --recursive
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
which I use instead like so (I do not have git submodule experience):
git submodule update --init --recursive
running cmake throws an error for the QtNodeEditor:
bdb@tp51:~/projects/Groot$ cmake .
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:63 (file):
file attempted to create a directory:
/home/bdb/projects/Groot/QtNodeEditor/resources into a source directory.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:210 (qt5_make_output_file)
/usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:281 (_QT5_PARSE_QRC_FILE)
QtNodeEditor/CMakeLists.txt:18 (qt5_add_resources)
Looking at I think this relates to #27 I've modified the 2 cmake settings in QtNodeEditor/CmakeLists.txt to OFF.
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
This result in:
bdb@tp51:~/projects/Groot$ cmake .
CMake Error at CMakeLists.txt:56 (add_subdirectory):
The source directory
/home/bdb/projects/Groot/depend/BehaviorTree.CPP
does not contain a CMakeLists.txt file.
So this looks like the subtree did not get updated.
Am i doing something obviously wrong?
I'm working on debian buster btw.
Best,
Bas
Don't know yet how to reproduce it
Hi @facontidavide ,
in the XML output of the current version of Groot there are comments of the form
<!--------------------------------------->
Unfortunately this does not appear to be valid XML. It is flagged as invalid by Emacs, it is rejected by the XML parsing library we are using in Carve and also by an online validator. In fact it seems that XML comments cannot contain the string "--" unless it marks the end comment tag.
Could you please change these comments to make them XML-compliant?
Some things we discussed last day and other ideas:
I can make one issue per idea, I didn't want to spam without warning.
Hi,
I'm having an issue working with the Tool and BehaviorTree.CPP.
I made a Tree from scratch and somehow, groot adds "Root" nodes that are not readdable from BehaviorTree.CPP :
<root main_tree_to_execute="BehaviorTree">
<!--------------------------------------->
<BehaviorTree ID="BehaviorTree">
<Root>
<Fallback name="job_fallback">
<SubTree ID="Walk"/>
</Fallback>
</Root>
</BehaviorTree>
<!--------------------------------------->
<BehaviorTree ID="Walk">
<Root>
<Sequence name="walk">
<Condition ID="isJob" job="walking"/>
<Action ID="faceTarget"/>
<Action ID="walkToTarget"/>
</Sequence>
</Root>
</BehaviorTree>
<!--------------------------------------->
<TreeNodesModel>
<SubTree ID="Walk"/>
<Action ID="faceTarget"/>
<Condition ID="isJob">
<Parameter label="job" default="walking"/>
</Condition>
<Action ID="walkToTarget"/>
</TreeNodesModel>
<!--------------------------------------->
</root>
I would have expected :
<root main_tree_to_execute="BehaviorTree">
<!--------------------------------------->
<BehaviorTree ID="BehaviorTree">
<Fallback name="job_fallback">
<SubTree ID="Walk"/>
</Fallback>
</BehaviorTree>
<!--------------------------------------->
<BehaviorTree ID="Walk">
<Sequence name="walk">
<Condition ID="isJob" job="walking"/>
<Action ID="faceTarget"/>
<Action ID="walkToTarget"/>
</Sequence>
</BehaviorTree>
<!--------------------------------------->
<TreeNodesModel>
<SubTree ID="Walk"/>
<Action ID="faceTarget"/>
<Condition ID="isJob">
<Parameter label="job" default="walking"/>
</Condition>
<Action ID="walkToTarget"/>
</TreeNodesModel>
<!--------------------------------------->
</root>
Hi Davide,
I find a new issue of the groot. If I have more than one sub-tree for a sequence, the groot seems to put the subtree in the wrong order.
I had to run sudo apt install libdw-dev
on a fresh ubuntu install on top of other commands listed in the readme otherwise make would fail to compile.
I could not compile unless I set the following two lines to OFF in QtNodeEditor/CMakeLists.txt
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
I don't know what was the purpose of disabling it but it makes the line qt5_add_resources to crash for me.
Groot currently doesn't support trees referencing subtree through the include tag, even the simplest form when the second xml is in the same folder or specified with the full absolute path. A tab is open for the subtree referenced but it is empty.
Just curious if it is possible to make Groot run in a browser. That might be a nice option for interacting with it when it is running in a container.
When loading crossdoor_trace.fbl the subtree DoorClosed is displayed but the button collapse/expand is not visible. If clicking on the subtree-tab, i see an empty tree with only one root node. If switching back to main tab (*BehaviorTree) the subtree content is gone. Again switching between main- and subtree-tab leads to following exception:
terminate called after throwing an instance of 'std::logic_error' what(): subTreeExpand with SUBTREE_REFRESH, but not an expanded SubTree
I tried with latest master branch Versions (groot and bt) and with 1.0.0 (groot) --> bt branch here from submodule.
I tried to find a way through the code, which was not really successful. Is subtree functionality for replay function implemented yet? For me it sounds strange that the tab for the subtree is called "SubTree" and not "DoorClosed" after loading the flatbuffer file. Perhaps that helps to find the bug if there is one.
Issue moved from here: BehaviorTree/BehaviorTree.CPP#7
@StefanoSoffiaUTRC
Hi @facontidavide ,
i found this bug of Groot. When the application is minimized and i try to reopen it, it crashes.
Tracking the execution from terminal i got this error:
terminate called after throwing an instance of 'std::runtime_error' what(): There is already a Tab named BehaviorTree
Hello,
I am trying to get the real-time monitor to work. i saw a similar issue that suggests a zmq publisher.
PublisherZMQ publisher_zmq(tree);
do you have a complete example of this. i have tried adding into my init code, but i get the same issue.
edit:
Ideally an example of how to use the publisher, if you have multiple instances of BT running. Would it be possible to switch between the trees.
thank you
Thank you for your efforts and generosity, @facontidavide, and congrats!!!
Are you going to release binaries on the main OS (Linux distributions, MacOsX, Windows* ...) for Groot?
Compiling from the source code seems... cumbersome, at least (dependencies and so). :-}
DJuego
(*) Yes. I'm guilty. I usually work in Windows 10 x64. :-)
This is a recurrent problem I keep getting.
I load a workflow , add subtrees to it.
Next I try to load a new workflow without saving the earlier one.
I get a message box asking " Do you want to remove previously loaded custom nodes?"
I say Yes.
Groot crashes after that.
It does not crash if I say No.
Maybe some issue with the CleanPreviousModels function from utils.cpp which is called in LoadFromXML function in mainwindow.cpp?
In the file bt_editor/bt_editor_base.cpp in the line 195 it calls de class "DecoratorSubtreeNode" when in the last version of BehaviorTrees this corresponds to "SubtreeNode" if I am not wrong.
Seems that some memory of the previous subtrees is kept in the list of available models
I have not been able to run a single log view. Everytime I get an assertion exception: .../src/Groot/depend/BehaviorTree.CPP/include/behaviortree_cpp_v3/flatbuffers/flatbuffers.h:1988: flatbuffers::Verifier::Verifier(const uint8_t*, size_t, flatbuffers::uoffset_t, flatbuffers::uoffset_t, bool): Assertion
size_ < FLATBUFFERS_MAX_BUFFER_SIZE' failed.`
I have tried with the standard examples and some of my own. I have checked also the latest commit ccec93b.
Using compilers: g++-7 (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
and g++-4.9.
Since no one else seems to have this issue, I wonder whether I am missing some obvious thing. Any help is greatly appreciated.
ps.: Thanks for this awesome BT library with batteries included!
Colors not updated when message number == 0.
We are trying to visualize a very simple behavior tree generated with https://github.com/BehaviorTree/BehaviorTree.CPP. When connecting with Groot to localhost, Groot crashes and we get the following error message:
setNativeLocks failed: resource not available
terminate called after throwing an instance of 'std::runtime_error'
what(): Fatal error in [FlowScene::createConnection]: the nodeModel doesn't provide this portIndexOut
aborted
Both are compiled from their current master branch. We run on ubuntu 16.04.
Here is our code for the behavior tree:
#include <behaviortree_cpp/behaviortree_cpp/behavior_tree.h>
#include <behaviortree_cpp/loggers/bt_zmq_publisher.h>
using namespace BT;
NodeStatus SayHello()
{
std::cout << "Robot says Hello" << std::endl;
return NodeStatus::SUCCESS;
}
int main()
{
SequenceNode sequence_root("sequence");
SimpleActionNode say_hello("action_hello", std::bind(SayHello) );
sequence_root.addChild(&say_hello);
NodeStatus status = NodeStatus::IDLE;
PublisherZMQ publisher_zmq(&sequence_root);
while(true)
{
status = sequence_root.executeTick();
std::this_thread::sleep_for( std::chrono::milliseconds(1));
}
return 0;
}
Are we missing something or is this a problem in the upstream project?
Hi, I'm trying to build (with catkin build) groot but I get this error:
/usr/bin/ld: cannot find -lbehaviortree_cpp_v3
collect2: error: ld returned 1 exit status
I'm using ROS Kinetic in ubuntu 16.04 LTS
Any thoughts?
Thank you very much in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.