Some services in MyRobotLab are composites of other services. This allows for more structure, complexity and higher functionality. Tracking, InMoov, Plantoid are a few examples of services which contain other services.
The Tracking service is used to track faces or points in a video stream.
It contains OpenCV, 2 X Servo, and 2 X PID Services. The OpenCV service provides a video stream. The PID services provide quick calculations from a targeted point in the video stream to move 2 (pan & tilt) servos. Here are some examples of it in action.
Now, what if we wanted to run 2 tracking systems simultaneously, and these two systems share the same Arduino? We don't have access directly to the internals of the Tracking service, but we do have ability to change Service names. And this is all we need.
First, lets look at what the internals of a Tracking service named tracker1 would look like.
This single line of Python will dump all the details of the contents of a Tracking service.
print(Runtime.buildDNA("tracker1", "Tracking"))
Runtime.reserveRootAs("tracker1.arduino","sharedArduino")
Runtime.reserveRootAs("tracker2.arduino","sharedArduino")
print(Runtime.getDNA())
Hello ! Thx for this ! Now
Hello !
Thx for this ! Now i've only one arduino's tab for : "arduino", "tracking1.arduino" and "tracking2.arduino"
Theres is a lot of things hidden in MRL lol !