jderobot / bt-studio Goto Github PK
View Code? Open in Web Editor NEWA ROS-based visual IDE for creating Behavior Trees
Home Page: https://jderobot.github.io/bt-studio/
License: GNU General Public License v3.0
A ROS-based visual IDE for creating Behavior Trees
Home Page: https://jderobot.github.io/bt-studio/
License: GNU General Public License v3.0
The order of the actions is not updated properly and this causes the behavior tree to misbehave when executed.
Here is the video of how to recreate this behavior:
And here is the incorrect bt:
<Root name="Tree Root">
<BehaviorTree>
<ReactiveSequence name="ReactiveSequence">
<ReactiveFallback name="ReactiveFallback">
<Inverter name="Inverter">
<CheckObstacle name="CheckObstacle" amplitude="20" obs_dist="1.0" />
</Inverter>
<!-- The order should be the opposite -->
<Turn name="Turn" />
<Forward name="Forward" />
<!-- -->
</ReactiveFallback>
<Forward name="Forward" speed="0.5" />
</ReactiveSequence>
</BehaviorTree>
<Code>
Although not part of the project, a complete and straightforward guide to setup a simulated environment may help the users.
The user should be able to save and load different projects, that is BT diagrams.
The node is removed although it is not selected.
The diagram editor works fine until the user interacts with other elements of the page, such as the file browser or the draggable separators.
Currently, there is no port representation and no mechanism to input a value in them.
When trying to execute the demos the following line:
import tree_gardener
gives an error about package not found.
This is a list of all of changes that will be done to BT Studio before the merge is done.
There are two different types of dependencies in BehaviorTrees:
The GUI needs a design revision. There are placeholder buttons yet and the button hovers are badly placed.
It is time! The project needs a proper usage section!
Altough proper terminate() methods are written in the actions, in the Gazebo Simulator (doesn't happen in Webots), when the user finishes the execution, the terminate methods aren't called and the last command keeps executing. This could be dangerous in a real robot.
Once the user created a diagram, the library provides function to serialize its structure into a json file. This should be converted to a xml tree file
In order to illustrate the capabilities of the offline execution, a detailed guide of how to use the package must be created. It must comprise exact instructions in a md file. A video should also be recorded.
Start the front end with the following code:
cd ..
cd frontend
yarn install
yarn start
produced the following error:
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'start'
Also, I think the installation process is still not very streamlined. I would recommend using a container for development. I asked bard how to add the installation process to a Docker container. Maybe this will help you:
Dockerfile:
FROM ros:humble
RUN source /opt/ros/humble/setup.bash
WORKDIR /opt/bt-studio
RUN git clone https://github.com/JdeRobot/bt-studio
RUN sudo apt update && sudo apt install python3-vcstool python3-pip python3-rosdep python3-colcon-common-extensions -y
WORKDIR /opt/bt-studio/backend
RUN pip install virtualenv
RUN virtualenv backend_env
RUN source backend_env/bin/activate
RUN pip install django djangorestframework
https://github.com/Guelakais
CMD python3 manage.py runserver
WORKDIR /opt/bt-studio/frontend
RUN yarn install
RUN yarn start
EXPOSE 3000
And now how to start it:
docker build -t bt-studio .
docker run -it -p 3000:3000 bt-studio
You should find the frontend at http://localhost:3000
Currently this is a placeholder. The file list API should be called and properly displayed.
This would require two main changes in the frontend:
The generation of a self contained tree is a key function of the system, and as such, it should be properly separated: the package should allow an ros-agnostic step of generation based on the tree xml and the actions, which can later be used to generate an executable tree.
Currently, the execution of BT Studio uses two separate testing servers: the django for the backend and yarn for the frontend.
It would be a better approach to serve the frontend as another django webapp using webpack to bundle it.
This was changed during the templates PR
Really nice project!
However I think there may be a few improvements:
1.- The zoom is really anti-intuitive.
2.- The selected node should be highlighted.
3.- A node should not have two parents.
4.- Baobab could be a great name for this project!!
Currently, It also shows the xml tree.
There have been a lot of changes from version 0.1, the readme should explain the usage and the installation properly
When using the dockerized environment, the state of the execution is known. This could be used to change the run icon to a pause button, as in RA, leveraging the new RADI capabilities.
Concretely:
Currently, the code is structured as a ROS 2 package. As the aim of the project is to provide a web based solution, the code needs a more agnostic structure.
tree_gardener is the python module that provides the tree creation functionality to client programs like the generator and the executor.
It needs an API documentation, with proper formatting.
Ideally, the translator should have two steps:
Currently, there are two remaining BT.cpp decorators unsupported:
Currently, the template only includes a few dependecies. Check how to implement a system so multiple libraries can be included.
tree_gardener creates executable trees and handles port access in the actions. Currently, It is a python package that the user has to install to run the generated package. It should be a ROS 2 package and included in the generated app.
To do:
Currently, the app is generated by writing the XML structure and executing the different generation scripts. The goal of the next version is to develop a web frontend for writing action and tree creation. This opens the door to future integrations with a dockerized ROS 2 environment.
The web frontend lacks some key interface buttons:
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.