Flexbe Tutorial
FlexBe Tutorial
- Installation
- Behaviors Repository
- Using the Statemachine Editor
- Execution
# References
[download](http://philserver.bplaced.net/fbe/download.php)
[flexbe/Tutorials](http://wiki.ros.org/action/fullsearch/flexbe/Tutorials?action=fullsearch&context=180&value=linkto%3A"flexbe%2FTutorials")
# Environment configure
## Installation
```sh
# install as binary (recommended for users)
sudo apt install ros-$ROS_DISTRO-flexbe-behavior-engine
# or build from source
cd ~/catkin_ws/src # or an alternative workspace source path
git clone https://github.com/team-vigir/flexbe_behavior_engine.git
```
## Get Examples
```sh
cd ~/catkin_ws/src
git clone https://github.com/FlexBE/flexbe_app.git
git clone https://github.com/FlexBE/generic_flexbe_states.git
```
## Build examples
```sh
cd ~/catkin_ws
catkin build
source devel/setup.bash
```
## Create hortcut for the FlexBE App,
```sh
rosrun flexbe_app shortcut create # or "remove" to remove it again
```
# Quick Start
## Behaviors Repository
```sh
rosrun flexbe_widget create_repo tutorial # replace "tutorial" by your favorite name if you want
```
You will see:
```sh
➜ src rosrun flexbe_widget create_repo tutorial
Will initialize new behaviors repo tutorial_behaviors ...
(1/4) Checking package dependencies...
Done
(2/4) Fetching project structure...
Cloning into 'tutorial_behaviors'...
remote: Enumerating objects: 86, done.
remote: Total 86 (delta 0), reused 0 (delta 0), pack-reused 86
Unpacking objects: 100% (86/86), done.
Branch 'feature/flexbe_app' set up to track remote branch 'feature/flexbe_app' from 'origin'.
Switched to a new branch 'feature/flexbe_app'
(3/4) Configuring project template...
Done
(4/4) Initializing new repository...
Initialized empty Git repository in /home/yubao/data/catkin_ws/src/tutorial_behaviors/.git/
[master (root-commit) b8f210c] Initial commit
16 files changed, 432 insertions(+)
create mode 100644 .gitignore
...
Congratulations, your new repository tutorial_behaviors is ready to be pushed!
Please run the following commands to push it:
git remote add origin [your_repo_url]
git push origin master
Your new repository already contains an example behavior and examples for writing own states:
rosed tutorial_flexbe_states example_state.py
rosed tutorial_flexbe_states example_action_state.py
Clone the following repository for a user interface (editor + runtime control) for FlexBE:
git clone https://github.com/FlexBE/flexbe_app.git
Make sure to build your workspace.
```
## Creating a New Behavior
http://wiki.ros.org/action/fullsearch/flexbe/Tutorials/Creating%20a%20New%20Behavior
```sh
roslaunch flexbe_app flexbe_ocs.launch
```
## Using the Statemachine Editor
[Using the Statemachine Editor](http://wiki.ros.org/action/fullsearch/flexbe/Tutorials/Using%20the%20Statemachine%20Editor)
![](http://philserver.bplaced.net/fbe/img/tutorials/fbetut26.png)
## Execution of a Behavior
[Execution of a Behavior](http://wiki.ros.org/action/fullsearch/flexbe/Tutorials/Execution%20of%20a%20Behavior)
```sh
roslaunch flexbe_app flexbe_full.launch
```
load the previously created behavior
![](http://philserver.bplaced.net/fbe/img/tutorials/fbetut31.png)
## Start execution
Now, switch to the *Runtime Control* view of the user interface.
![](http://philserver.bplaced.net/fbe/img/tutorials/fbetut34.png)
No comments