Tutorial/Example for SMACC

asked 2021-05-05 10:17:06 -0500

AlexandrosNic gravatar image

I have an autonomous base with some complex strategies, and thus I would like to apply state machines or behavior trees. I went through most of the available libraries (SMACH, FlexBE, SMACC, behavior trees, BehaviorTrees.CPP, py_trees etc), but since I wanted to implement it in C++ for performance (perhaps this is not really needed?!), I had to limit myself between SMACC and BehaviorTrees.CPP.

I decided to give SMACC a try. Well documented and it seems that the guys did very good job. I went through the entire website (as well as repo and some sources), and it seems that there is no example/tutorial of how to integrate this in a custom workspace (the examples of the library are not very suitable in that case), nor I found any other custom workspace using SMACC available through github.

In particular, I didn't really understand how to connect the states with particular custom executables (in the form of .cpp) that I already builded. For example my state machine would be: 1. detect the corner (detect_the_corner.cpp), 2. navigate to the corner (navigate_to_the_corner.cpp), 3. rotate (rotate.cpp) 4. wall following (wall_following.cpp) (ofcourse the structure is more complex, and they are integrated into packages etc, but I wrote it that way for the sake of simplicity). Then my question is how could I call each of these executables through SMACC, if the latter mostly relies on header files (as per the examples)? Any examples, or workspaces using SMACC would be highly appreciated.

PS: Maybe my question is due to me not being advanced C++ programmer (but perhaps the library is not only for advanced users)

edit retag flag offensive close merge delete