Comments (10)
fixed
from groot.
I had a look in MainWindow::saveToXML() and found this:
auto abs_root = abs_tree.rootNode();
if( abs_root->children_index.size() == 1 &&
abs_root->model.registration_ID == "Root" )
{
// mofe to the child of ROOT
abs_root = abs_tree.node( abs_root->children_index.front() );
}
After that it proceeds to serialize abs_root. So this tells me that if we have a node with registration ID "Root" and exactly one child, we skip the node (thus leaving it out of the data) and move to its first node. This poses a problem when the root node has multiple children, as the "Root" node which apparently is supposed to be left out gets included in the data.
Why was the saving code set up like this? Why not just start serializing the root node and all of its children recursively? This effectively prevents Groot from ever having trees where the root node has more than one child.
from groot.
Hi @unvestigate ,
I am working with Groot also.
I didn't understand the issue. BT's root must have one and only one child. You are not supposed to create a BT like the second image.
Do you think Groot should not allow the connection?
from groot.
I will admit I haven't had much practical experience working with BTs (that's why I am here now) so excuse my ignorance. Why would a tree where the root has multiple children not be possible?
I am not talking about the exact tree in my example, but some other two nodes as children of root.
Finally, if such a tree truly is not allowed, we should probably not allow creating such a tree in Groot.
from groot.
Why would a tree where the root has multiple children not be possible?
Because then the root would not be the root, but a Control Node instead. You will have to create a logic on how it "ticks" its children, and that logic is for Control Nodes. You can have a look here Theory
Finally, if such a tree truly is not allowed, we should probably not allow creating such a tree in Groot.
Yes. I think that is an issue.
from groot.
I looked around the net a bit for examples of BTs and it seems they all have a sequence or selector node as the sole child of the root. This makes sense when you consider how the tree will be traversed. Is this what you were referring to @renan028 ?
So maybe we should just prevent Groot from trying to save such a tree? There is already the validation with the green/red icon...
from groot.
Ah, I see you just answered :) Thanks!
from groot.
it is indeed a bug. Something like this is not supposed to happen (the graphical editor must not allow you to attach multiple children to Root!
I will need to address this.
from groot.
FYI, in the XML there is no "Root".
That is something that is needed only in Groot for technical reasons.
from groot.
FYI, in the XML there is no "Root".
Except when there is :)
from groot.
Related Issues (20)
- Add publisher/server port numbers as launch arguments HOT 1
- this error when building Groot
- Error when building Groot HOT 5
- Qt6 and M1 Mac Support HOT 1
- Segmentation fault when running Groot HOT 1
- error: ‘zmq::send_flags’ has not been declared HOT 4
- Only node below root is getting colored during log replay / live monitor HOT 1
- compling error zmq when installing HOT 15
- Segfault after upgrading ros-noetic-behaviortree-cpp-v3 from 3.6.1 to 3.8.0 HOT 7
- Error when open editor
- BehaviorTree.CPP 4.0 compability HOT 1
- How are nav2 bts different from groot bts? HOT 2
- Shortcuts for zoom in and out
- An error will be reported when running the example
- Appimage or installer for arm? HOT 3
- Release new tag
- error compiling groot ROS Melodic
- Compilation error on Manjaro / Arch Linux
- compiler error on mingw-64
- Error when running Groot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groot.