Algorithms are defined in a single array named algorithm in JSON format.
Specifying algorithms is optional. You may leave out specifying this in your configuration file. However, if you are specifying algorithms, here is an example:
... "algorithm": [ { "id": "ADAS_ALGO_MOTION_DETECTION", "input": [ { "id": "forward_camera" } ], "output": [ { "type": "viewer", "instance": 4 } ] }, { "id": "ADAS_ALGO_LIDAR_GROUPING", "input": [ { "id": "side_lidar" } ], "output": [ { "type": "viewer", "instance": 3 } ] }, { "id": "ADAS_ALGO_RADAR_GROUPING", "input": [ { "id": "front_radar" } ], "output": [ { "type": "viewer", "instance": 2 } ] } ], ...
There are the attributes that you can use to configure an algorithm.
... "algorithm": [ { "id": "ADAS_ALGO_CUSTOM", "path": "/usr/share/algorithms/myAlgorithm.so "input": [ { "id": "forward_camera" } ], "output": [ { "type": "viewer", "instance": 4 } ] }, ...For more information, see Using Custom Algorithms.
... "input": [ { "source": "sensor", "instance": "SENSOR_UNIT_1", "id": "forward_camera" }, ... ] ...then you can specify forward_camera as the id attribute in an entry of your input array for your algorithm. For example:
... "algorithm": [ { ... "input": [ { "id": "forward_camera" } ], ...
"parameters" = "horizon=33".
... "viewer": [ { "type": "ADAS_VIEWER_CAMERA", ... }, { "type": "ADAS_VIEWER_POINT_CLOUD", ... }, { "type": "ADAS_VIEWER_OVERLAY", ... }, { "type": "ADAS_VIEWER_NATIVE_CAMERA", ... } ], ...then you can specify 3 (the viewer whose type is ADAS_VIEWER_OVERLAY) as the instance attribute in an entry of your output array for your algorithm. For example:
... "algorithm": [ ... "output": [ { "type": "viewer", "instance": 3 } ] ...