-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial System Integration
In this tutorial we will learn how to add a third party dependency to an ESROCOS component.
Prerequisites: Please make sure a camera device with id 0 (video0) is available in your machine. In a Virtual Box system, this is possible by installing the Virtual Box Extension Pack and selecting a camera from Devices/Webcams in the main window of the running virtual machine. In a Docker image, it can be achieved by editing the docker run call.
System project creation works the same way as component creation.
- Go to ESROCOS workspace and use the
esrocos_create_projectscript to create a project namedtutorials/system_integration. Choose theuniversepackage set. - When asked for dependencies, enter
types/base. - Checkout and install dependencies using the
esrocos_fetch_dependenciesscript.
Open the TASTE GUI using the esrocos_edit_project script.
- On the top menu click on
Fileand select the optionImport Interface View. - Go to
~/esrocos_workspace/install/share/taste_components/driverand select theinterfaceview.aadlfile. - Repeat to import also the
interfaceview.aadlfile located in~/esrocos_workspace/install/share/taste_components/cam_capture. - Add a driver component and a
cameracomponent to the canvas and connect thetrigger_outRI to thecapturePI.

Switch to the Deployment View. Right-click inside the x86_partition and use the Bind All function to add both functions to the deployment system.

Delete the model/work folder to force TASTE to generate it again and call the esrocos_generate_skeletons script.
TASTE uses a tool called Kazoo to generate code and build scripts from AADL models. In order to link libraries, include directories, and add compilation flags, you need to manually edit the Kazoo Makefile located in the model folder. For this tutorial we only need to link the opencv libraries. Add the following line to the Makefile:
export X86_PARTITION_USER_LDFLAGS = -L$(AUTOPROJ_CURRENT_ROOT)/install/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio
To build the project run the esrocos_build_project script.
cd ~/esrocos_workspace/tutorials/system_integration
source env.sh
esrocos_build_project
An executable is generated in model/work/binaries/x86_partition. You should be able to run it and see the image from the camera connected to video0. Congratulations, you successfully integrated two components into an ESROCOS system project.
