-
Notifications
You must be signed in to change notification settings - Fork 17
Creating ros systems with bride
In this small tutorial you will learn how to create ROS system deployment with BRIDE. It assumes you have already done the tutorial on capability creation and coordinator creation.
You can create a new Eclipse project by "New -> Project" and then "General -> Project". Give the project a name, e.g. "deployment" 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 deployment model by right clicking on the model folder and selecting "New -> Other" and then "ROS System diagram" (note the difference to "ROS Package Diagram". Now name the new model diagramm "deployment.ros_system_diagram" and then after clicking next name the model "deployment.ros_system". You should now see an empty ros_diagram editor.
To add capability models to your system you select the Package tool on the right and click on the white area of the ros system. You can now select the Capability and Coordinator models from the dialog (one only). Repeat the step until you have added the talker, listener and the behaviour model. Note that the behaviour model now appears as normal ros node. The screenshot below shows BRIDE while adding the behaviour model.
Note that you have zoom tools on the top of the palette.
In the system diagram you can now use the topic tool in the pallet to connect the Publishers with the corresponding Subscribers and name the topic. Similar you can connect the services and actions in the system. In this example we connect the "pub" Publisher port of the talker with the "listenPort" subscriber port of the listener node. We name the topic "/communication". Afterwards we connect the actions to each other and name the action TriggerAction.
The system should now look as in the screenshot:
After finishing the system configuration you can generate the manifest and launch file for the system package. You can do that in the BRIDE menu in ROS->"Generate Launch file for ros system". After refreshing your project explorer by right clicking the deployment package and pressing "Refresh" you should now see a "manifest.xml" that includes all dependencies and an "system.launch" file that configures and connects all nodes in the system.
When you open a new terminal you should be able to run
roslaunch deployment system.launch
With the standard ros tools (e.g. rostopic, rxgraph, etc.) you should now be able to investigate your system.