|
|
# **RTIS Common Documentation - Table of Content**
|
|
|
|
|
|
- [Classes](#classes)
|
|
|
- [RTISClientObj](#rtisclientobj)
|
|
|
- [Pose](#pose)
|
|
|
- [dspSettings](#dspsettings)
|
|
|
- [Methods](#methods)
|
|
|
- [dsp_worker_process](#dsp_worker_process)
|
|
|
- [get_server_config](#get_server_config)
|
|
|
- [get_clients_and_configs](#get_clients_and_configs)
|
|
|
- [get_client_pose](#get_client_pose)
|
|
|
- [set_behaviour_active](#set_behaviour_active)
|
|
|
- [set_behaviour_passive](#set_behaviour_passive)
|
|
|
|
|
|
# **Classes**
|
|
|
|
|
|
## **RTISClientObj**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISClientObj</b>(<i>client_id, client_ip, network_version, firmware_version, client_online=True</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L29">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing a connected RTIS Client.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Attributes:</b></td>
|
|
|
<td class="field-body" width="100%"><b>id : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The unique identifier to identify this RTIS Client by.
|
|
|
</p>
|
|
|
<b>ip : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The current IP used by the active RTIS Client.
|
|
|
</p>
|
|
|
<b>online : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
If the RTIS Client has timed out it will be set to False, otherwise it will always be True.
|
|
|
</p>
|
|
|
<b>lastHeartBeatTimestamp : <i>datetime datetime</i></b>
|
|
|
<p class="attr">
|
|
|
The datetime object telling the last time a heartbeat was received from an RTIS Client.
|
|
|
</p>
|
|
|
<b>configured : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The state of the configuration of an RTIS Client. 0 = Booting | 1 = Started | 2 = Configuring | 3 = Ready | 4 = Preparing workers | 5 = Online
|
|
|
</p>
|
|
|
<b>behaviour : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The state of the sonar behaviour of an RTIS Client. 0 = passive | 1 = active
|
|
|
</p>
|
|
|
<b>inputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of data packages currently in the incoming data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>outputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of data packages currently in the outgoing data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>internalCounter : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The current index of the internal measurement counter of the connected RTIS hardware.
|
|
|
</p>
|
|
|
<b>networkVersion : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The RTIS Network software version that is used by this RTIS Client.
|
|
|
</p>
|
|
|
<b>firmwareVersion : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The RTIS Device hardware firmware version that is used by this RTIS Client.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
#### Methods
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>update_heartbeat</b>(<i>self, client_ip, client_configured, client_behaviour, client_inputDataQueueSize, client_outputDataQueueSize, client_internalCounter</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L113">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Method that is used by RTIS Server to update the status of a RTIS Client when a new heartbeat is received.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>client_ip : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The current IP used by the active RTIS Client.
|
|
|
</p>
|
|
|
<b>client_configured : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The state of the configuration of an RTIS Client. 0 = Booting | 1 = Started | 2 = Configuring | 3 = Ready | 4 = Preparing workers | 5 = Online
|
|
|
</p>
|
|
|
<b>client_behaviour : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The state of the sonar behaviour of an RTIS Client. 0 = passive | 1 = active
|
|
|
</p>
|
|
|
<b>client_inputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of data packages currently in the incoming data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>client_outputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of data packages currently in the outgoing data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>client_internalCounter : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The current index of the internal measurement counter of the connected RTIS hardware.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>check_heartbeat</b>(<i>self, maximum_delta=15</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L151">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Method to check if a RTIS Client has timed out based on a check of it's previous received heartbeat.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>maximum_delta : <i>float (default = 15)</i></b>
|
|
|
<p class="attr">
|
|
|
The maximum difference in time between now and the last received heartbeat before being listed as a timed out client.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>state : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> if not timed out, returns <code>False</code> if the RTIS Client is timed out.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **Pose**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>Pose</b>(<i>x, y, z, pitch, yaw, roll</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L175">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing a 3D pose using the right-handed coordinate system where x points forward, Y points to the left
|
|
|
and Z point upwards. Rotations are around these axis also by the right-hand rule with roll being
|
|
|
around the X-axis, pitch being around the Y-axis and yaw around the Z-axis.
|
|
|
x, y and z are in meters. Pitch, yaw and roll in degrees.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Attributes:</b></td>
|
|
|
<td class="field-body" width="100%"><b>x : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The forward facing axis position value in meters.
|
|
|
</p>
|
|
|
<b>y : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The left facing axis position value in meters.
|
|
|
</p>
|
|
|
<b>z : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The upwards facing axis position value in meters.
|
|
|
</p>
|
|
|
<b>pitch : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The rotation value around the Y-axis in degrees.
|
|
|
</p>
|
|
|
<b>yaw : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The rotation value around the Z-axis in degrees.
|
|
|
</p>
|
|
|
<b>roll : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The rotation value around the X-axis in degrees.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## **dspSettings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>dspSettings</b>(<i>configName, dspFiles, workers, pdmEnable, matchedFilterEnable, beamformingEnable, enveloppeEnable, cleanEnable, version</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L245">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing all the recording and processing settings related to RTIS devices.
|
|
|
Too many variables to describe here. Check the source-code for more information on which variables are available.
|
|
|
|
|
|
Can be converted to a dictionary.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# **Methods**
|
|
|
|
|
|
## **dsp_worker_process**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>dsp_worker_process</b>(<i>dspSettings, inputDataQueue, outputDataQueue, logger =None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L404">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The method to use als a `multiprocessing.Process` to perform a DSP pipeline on sonar measurements
|
|
|
using the RTIS CUDA library. This will run continiously until closed.
|
|
|
It will first prepare the DSP pipeline with the given settings. Afterwards it will process each measurement
|
|
|
placed on the input data queue and place the result on the output data queue.
|
|
|
|
|
|
The resulting data on the output data queue will be a tuple with the following content:
|
|
|
- `ID`: string: The RTIS Client ID.
|
|
|
- `processedData`: numpy ndarray: The data matrix holding the optionally processed data.
|
|
|
- `rawData`: numpy ndarray: The data matrix holding the raw recording data samples as uint32.
|
|
|
- `timestamp`: float: Epoch timestamp of when the measurement was taken on the RTIS Client.
|
|
|
- `index`: int: The measurement index of this measurement for this RTIS Client.
|
|
|
- `behaviour`: int (0 or 1): The behaviour of the RTIS Client sonar mode. 0 means passive, 1 means active.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>dspSettings : <i>dspSettings</i></b>
|
|
|
<p class="attr">
|
|
|
The complete class containing all RTIS settings for measuring and processing.
|
|
|
</p>
|
|
|
<b>inputDataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
The queue to get the measurement data packages from.
|
|
|
</p>
|
|
|
<b>outputDataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
The queue to put the measurement data packages on after processing.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.Logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_server_config**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_server_config</b>(<i>serverIp, logger=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L471">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
A function to get the [`dspSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtiscommon/-/wikis/home#dspsettings) currently used by the RTIS Server.
|
|
|
Usefull for connected applications.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverDspSettings : <i>dspSettings</i></b>
|
|
|
<p class="attr">
|
|
|
The complete class containing all RTIS settings for measuring and processing. Returns None on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_clients_and_configs**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_clients_and_configs</b>(<i>serverIp, logger=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L547">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
A method to get all the active connected RTIS Clients with and their respective [`dspSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtiscommon/-/wikis/home#dspsettings).
|
|
|
Usefull for connected applications.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>clients : <i>dictionary<string,dspSettings></i></b>
|
|
|
<p class="attr">
|
|
|
A dictionary with the RTIS Client IDs as the keys and the DSP settings as the values.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_client_pose**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_client_pose</b>(<i>serverIp, client_id, logger=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L642">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
A function to get the [`Pose`](https://cosysgit.uantwerpen.be/rtis-software/rtiscommon/-/wikis/home#pose) of a particular RTIS Client with.
|
|
|
Usefull for connected applications.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>client_id : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identifier of the RTIS Client.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>pose : <i>Pose</i></b>
|
|
|
<p class="attr">
|
|
|
The Pose object containing the position and (euler) rotation values of that RTIS Client. Returns None on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **set_behaviour_active**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_behaviour_active</b>(<i>serverIp, logger=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L691">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Tell all connected RTIS Clients to set their sonar behaviour to active.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **set_behaviour_passive**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_behaviour_passive</b>(<i>serverIp, logger=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtiscommon/RTISCommon2.py#L717">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Tell all connected RTIS Clients to set their sonar behaviour to passive.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|