Creating ros coordinators with bride - abubeck/bride GitHub Wiki

In this small tutorial you will learn how to create ROS coordinators with BRIDE. It assumes you have already done the tutorial on capability creation.

Create new project and coordinator model

You can create a new Eclipse project by "New -> Project" and then "General -> Project". Give the project a name, e.g. "behaviour" and finish the creation wizard. Afterwards you can create a new folder named "model" as when creating capability models.

Now you can create a new coordinator model by right clicking on the model folder and selecting "New -> Other" and then "ROS Coordinator Diagram" (note the difference to "ROS Package Diagram") from the BRIDE section. Now name the new model diagramm "behaviour.ros_coordinator_diagram" and then after clicking next name the model "behaviour.ros_coordinator". You should now see an empty ros_coordinator_diagram editor.

Creating the coordinator for the tutorial

With the palette on the right create a StateMachine with an initial state, a final state and an action state as you can see below:

coordinator diagram in BRIDE

The properties of the coordinator package (selectable by clicking the free space around the state machine) should be as shown below:

CoordinatorPackageProperties

The properties of the ActionState should be as shown below:

CoordinatorActionProperties

Generate Coordinator Code

You can now generate the code for the coordinator by selecting BRIDE -> ROS -> "Generate Coordinator for ROS system". By refreshing the Package in the workspace view on the left you should see the generated files. As the coordinator is implemented in python compiling the coordinator is not necessary.

To see the coordinator in use you should continue with the system creation tutorial.