Week 10 - Refining the library and creating a demo
This week was focused on refining the user experience and to create a new demo.
Bug fixes and improvements
Last week I discused the possible solutions to the naming problem in the user subtree library. This week I have reached a decission on the path to follow with that and the standard library:
- The final naming scheme will be my_name for the main tree, my_name-subtreeName if there are any subtrees and my_name-actions for all of the actions.
- The standard library will be the same as the user one but forcing all of the subtrees in the same order. This will allow the use of subtrees.
With this 2 changes we finally have a final design for the libraries that can be easily understand by the user, because now we do not arbitrarily overwrite actions or subtrees.
Also this closes a really old issue from the last GSoC, because now all of the trees, subtrees and actions imported are based exclusively on the contents of the one selected.
After finishig this there has also been some bugs fixed:
- Changing only the content of a tag inside a Behavior Tree and then saving the file did not update its value. Issue 316
- Config not being saved on exit. Issue 317
- Changing the execution order of a Behavior Tree outside of the setting menu did not save it to the config. Issue 318
Follow Line Demo
To test the new BT Studio and all of the changes done during this GSoC I ventured into solving the classic Robotics Academy exercise, Follow Line, using a Behavior Tree.
During the development of this demo I found various bugs that were explained in the section above.
The exercise consist of following the red line in the circuit with an holonomic car.
For this demo I choosed the Simple Circuit because it is the shortest and the easiest one to test in.
After deciding on the circuit I focused on the design of the Behavior Tree. For that I decided that a simple reactive sequence would be enough to solve it, and for the actions I used 3:
- DetectLine: gets the image from the car (using the topic: /cam_f1_left/image_raw), filters the red line and calculates the center of it in the image.
- CalculateSpeed: uses the center of the red line and a PID to calculate the desired linear and angular speed.
- SetSpeed: reads the linear and angular speed from the previous action and sends it to the car using the topic passed to the action (/cmd_vel).
Updates Video
In this video you can see the new updated fromtend and the new library design that has been done during this GSoC. Added to this, there has also been an important upgrade in the backend of BT Studio that cannot be shown in a video, but that will be noticed during normal use of the application.