Page History
...
Your function head may differ, but you must use varargin as your last parameter to pass vehicle IDs to your script. This allows you to define, for your script, which vehicle(s) it should be responsible for. Any previous parameters you define are your own 'custom' parameters and need to be specified as additional parameters in the Lab Control Centers' UI before starting your script (if you wish to start it using the UI).
function main(middleware_domain_id, varargin)
...
vehicle_ids = varargin;
Info |
---|
The parameter middleware_domain_id only exists in the eprosima branch and will not be added to the RTI Branch anymore! Don't use this parameter if you use RTI DDS. Furthermore, the examples below use the RTI DDS syntax. eProsima syntax can be found here. |
In other words: If your function head looks like this
function main(some, params, varargin)
then you need to pass some, params
as additional parameters in the LCC's UI (ignore the script path in the screenshot):
...
middleware_domain_id, varargin)
then you need to pass some, params
as additional parameters in the LCC's UI (ignore the script path in the screenshot):
Varargin covers the vehicle IDs that your script should be responsible for. The DDS Domain ID to communicate with the Middleware only via shared memory is middleware_domain_id, its default value is 1. To be compatible with the LCC, which expects these two parameters to be available on calling your script, you should always put them as the last two parameters in your function head as specified above.
What your HLC scripts need to include
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
...