Git Product home page Git Product logo

groot's People

Contributors

affonso-gui avatar ebbe avatar ekouters avatar esromneb avatar fabianschurig avatar facontidavide avatar fmros avatar fultoncjb avatar glpuga avatar gramss avatar griswaldbrooks avatar hacker1024 avatar homalozoa avatar imgbot[bot] avatar isactornberg avatar kogut avatar lingxd avatar lyrakisk avatar moritzwillmann avatar mozgovoyoleg avatar nkalupahana avatar patrykcieslak avatar renan028 avatar ryanf55 avatar sarath18 avatar sea-bass avatar tarunbelagodu avatar timple avatar v-lopez avatar victorpaleologue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

groot's Issues

cannot make realtime monitor, log replay work

I have two issues while using Groot:

  1. I have generated a bt_trace.fbl file bt_trace.zip, like the tutorials:
    FileLogger logger_file(tree, "bt_trace.fbl");
    And I'm using a custom bt.

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)
  1. I've been trying to real time monitor with Groot (last master version), however it doesn't work neither in my own pc (localhost) or the robot with the correct ip .

image

image

Usefull info:

  • I have lib zeromq installed
  • I have compiled Groot like linux compilation intructions.
  • I am using ros melodic with ubuntu 18.04

Any help will be apreciated.

Compilation using catkin results error due to missing flatbuffers header

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"                                                                                                                                
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Define own Control nodes

Since BehaviorTree.CPPv3 supports the definition of our own control nodes. Would it be possible to use these with Groot ?

SegFault when pulling a node on drawing area

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)

error: ‘QSignalBlocker’ does not name a type

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!

desktop file is lacking a Categories= entry

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:

Very easy to create invalid XML.

Open Groot and create this (admittedly nonsense) BT:

image

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:

image

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.

groot didn't compile wrong dependency

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

Syntax not recognized by Groot

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 ?

realtime monitor and log replay issue

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,

Blackboard lookup

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.

Problems with building

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

Error on compiling

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.

  • My settings is Ubuntu 18.04 i9

Fix error related to "main_tree_to_execute"

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.

Support for BehaviorTree.CPP plugins

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.

Install dependencies with rosdep (in case of catkin ws)

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.

Malformed behaviorTree

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.

Simple Condition

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.

Segfault when expanding subtree after adding to the graph

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() ()

Support blackboard

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.

Problem with very long Names

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>

CMake Error; attempting to create directory Groot/QtNodeEditor

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

Groot output contains incorrect XML comments

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?

Various improvements

Some things we discussed last day and other ideas:

  • View node names in Groot
  • (Ver 3) view output ports
  • View port descriptions
  • (minor nice to have) highlight connected ports. I could give this a look once they are visible.
  • User defined categories for Nodes (once we have 50+ nodes, it would be nice to group them into Grasping/Navigation/...)
  • [] Add Custom Decorators

I can make one issue per idea, I didn't want to spam without warning.

Invalid Root node

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>

subtree sequence

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.

Missing libdw

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.

Compilation issue with Qt

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.

Support subtree include

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.

Can Groot be run in a browser?

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.

Subtree Support for Replay Function

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.

Crash open Groot after minimizing

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

realtime monitor - deque::_M_range_check:

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

Binaries for Groot 1.0

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. :-)

Groot crashes when trying to load a new models and removing previously loaded nodes

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?

Renaming of DecoratorSubtreeNode

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.

Problem when loading bfl logs

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!

Crash when connecting

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?

Problems building Groot

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.