-
Notifications
You must be signed in to change notification settings - Fork 17
Creating ros coordinators with bride
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.
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.
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:
The properties of the coordinator package (selectable by clicking the free space around the state machine) should be as shown below:
The properties of the ActionState should be as shown below:
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.