|
|
# **RTIS Dev Documentation - Table of Content**
|
|
|
# **RTIS Common Documentation - Table of Content**
|
|
|
|
|
|
- [General Example](#general-example)
|
|
|
- [General Usage](#general-usage)
|
|
|
- [Classes](#classes)
|
|
|
- [RTISMeasurement](#rtismeasurement)
|
|
|
- [RTISSettings](#rtissettings)
|
|
|
- [MeasureExternalTriggerQueueThread](#measureexternaltriggerqueuethread)
|
|
|
- [MeasureExternalTriggerCallbackThread](#measureexternaltriggercallbackthread)
|
|
|
- [RTISClientObj](#rtisclientobj)
|
|
|
- [Pose](#pose)
|
|
|
- [dspSettings](#dspsettings)
|
|
|
- [Methods](#methods)
|
|
|
- [open_connection](#open_connection)
|
|
|
- [close_connection](#close_connection)
|
|
|
- [set_recording_settings](#set_recording_settings)
|
|
|
- [set_processing_settings](#set_processing_settings)
|
|
|
- [get_current_settings](#get_current_settings)
|
|
|
- [clear_current_settings](#clear_current_settings)
|
|
|
- [get_settings](#get_settings)
|
|
|
- [set_settings_from_class](#set_settings_from_class)
|
|
|
- [get_premade_processing_settings_list](#get_premade_processing_settings_list)
|
|
|
- [get_premade_recording_settings_list](#get_premade_recording_settings_list)
|
|
|
- [prepare_processing](#prepare_processing)
|
|
|
- [unload_processing](#unload_processing)
|
|
|
- [get_raw_measurement](#get_raw_measurement)
|
|
|
- [get_signal_measurement](#get_signal_measurement)
|
|
|
- [get_processed_measurement](#get_processed_measurement)
|
|
|
- [process_measurement](#process_measurement)
|
|
|
- [set_counter](#set_counter)
|
|
|
- [set_behaviour](#set_behaviour)
|
|
|
- [get_firmware_version](#get_firmware_version)
|
|
|
- [create_measure_external_trigger_queue](#create_measure_external_trigger_queue)
|
|
|
- [create_measure_external_trigger_callback](#create_measure_external_trigger_callback)
|
|
|
- [toggle_amplifier](#toggle_amplifier)
|
|
|
- [toggle_external_triggers](#toggle_external_triggers)
|
|
|
- [reset_device](#reset_device)
|
|
|
- [set_log_mode](#set_log_mode)
|
|
|
- [set_custom_logger](#set_custom_logger)
|
|
|
|
|
|
# **General Example**
|
|
|
|
|
|
Here is a small example that goes over most basic steps:
|
|
|
- [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)
|
|
|
|
|
|
```python
|
|
|
import rtisdev
|
|
|
import matplotlib.pyplot as plt
|
|
|
import numpy as np
|
|
|
|
|
|
# Open a connection to the RTIS Device over the default serial port.
|
|
|
success_connect = rtisdev.open_connection(allowDebugMode=True)
|
|
|
|
|
|
# Set the default recording settings with 163840 samples and a call sweep between 25 and 50 KHz.
|
|
|
success_settings_record = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
|
|
|
# Enable all processing steps and preload them with RTIS CUDA. This will produce a 2D energyscape with 181 directions
|
|
|
# with a maximum distance of 5m.
|
|
|
success_settings_processing = rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
|
|
|
# Get the used settings as a RTISSettings object.
|
|
|
settings = rtisdev.get_current_settings()
|
|
|
|
|
|
# Get an ACTIVE measurement (protect your ears!) in raw data.
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
|
|
|
# Store the raw data of that measurement as a binary file. This can be opened in another application for further work.
|
|
|
raw_data_sonar = measurement.rawData.tobytes()
|
|
|
file_handle_data = open("test_measurement_ " + str(measurement.index) + ".bin", "wb")
|
|
|
file_handle_data.write(raw_data_sonar)
|
|
|
file_handle_data.close()
|
|
|
|
|
|
# Process that raw measurement to an energyscape using the configuration chosen earlier.
|
|
|
processed_measurement = rtisdev.process_measurement(measurement)
|
|
|
|
|
|
# Get a new ACTIVE measurement (protect your ears!) in both raw and processed data formats directly.
|
|
|
new_processed_measurement = rtisdev.get_processed_measurement(True)
|
|
|
plt.imshow(np.transpose(new_processed_measurement.processedData), cmap="hot", interpolation='nearest')
|
|
|
|
|
|
# Plot the 2D energyscape of this processed measurement.
|
|
|
plt.xlabel("Directions (degrees)")
|
|
|
plt.ylabel("Range (meters)")
|
|
|
indexes_x = np.arange(0, new_processed_measurement.processedData.shape[0], 20)
|
|
|
labels_x = np.round(np.rad2deg(settings.directions[indexes_x, 0])).astype(int)
|
|
|
indexes_y = np.arange(0, new_processed_measurement.processedData.shape[1], 100)
|
|
|
labels_y = settings.ranges[indexes_y]
|
|
|
fmt_x = lambda x: "{:.0f}°".format(x)
|
|
|
fmt_y = lambda x: "{:.2f}m".format(x)
|
|
|
plt.xticks(indexes_x, [fmt_x(i) for i in labels_x])
|
|
|
plt.yticks(indexes_y, [fmt_y(i) for i in labels_y])
|
|
|
plt.title("RTIS Dev - 2D Energyscape Example")
|
|
|
ax = plt.gca()
|
|
|
ax.invert_yaxis()
|
|
|
ax.set_aspect("auto")
|
|
|
plt.show()
|
|
|
```
|
|
|
|
|
|
# **Classes**
|
|
|
|
|
|
## **RTISMeasurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISMeasurement</b>(<i>id: str='', timestamp: float=0, behaviour: bool=False, index: int=0, rawData: np.ndarray=None, processedData: np.ndarray=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L283">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class storing all data and information on an RTIS device measurement.
|
|
|
|
|
|
<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>timestamp : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The epoch timestamp of the measurement.
|
|
|
</p>
|
|
|
<b>behaviour : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
The sonar behaviour (active or passive).
|
|
|
</p>
|
|
|
<b>index : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
The internal measurement index.
|
|
|
</p>
|
|
|
<b>rawData : <i>Numpy ndarray</i></b>
|
|
|
<p class="attr">
|
|
|
This stores the raw data returned by the RTIS Device. This is stored as a list of uint32 values.
|
|
|
</p>
|
|
|
<b>processedData : <i>Numpy ndarray</i></b>
|
|
|
<p class="attr">
|
|
|
This stores the (partially) processed data that has gone through the processing pipeline as configured by the user.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
#### Methods
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>update_processed_data</b>(<i>self, processedData: np.ndarray</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L339">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
If only the processData needs to be updated, use this function.
|
|
|
|
|
|
<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>processedData : <i>Numpy ndarray (None by default)</i></b>
|
|
|
<p class="attr">
|
|
|
This stores the (partially) processed data that has gone through the processing pipeline as configured by the user.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **RTISSettings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISSettings</b>(<i>firmwareVersion, configName=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L352">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing all the processing and recording 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>
|
|
|
|
|
|
## **MeasureExternalTriggerQueueThread**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>MeasureExternalTriggerQueueThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L505">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Thread to start RTIS sonar measurements triggered by an external trigger.
|
|
|
To set the data queue correctly use `set_queue(dataQueue)` function.
|
|
|
the [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) objects will then be put on this queue.
|
|
|
To start the thread use the `start()` function. To stop use the `stop_thread()` function.
|
|
|
By default using a `signal.SIGINT` exit (ex. using <kbd>CTRL</kbd>+<kbd>C</kbd>) will gracefully end the script.
|
|
|
|
|
|
Use [`create_measure_external_trigger_queue(dataQueue)`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#create_measure_external_trigger_queue) to make an easy to use the class.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a queue to save the measurement to and assign it to the thread.
|
|
|
|
|
|
```python
|
|
|
from multiprocessing import Process, Manager
|
|
|
|
|
|
manager = Manager()
|
|
|
dataQueue = manager.Queue()
|
|
|
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_queue(dataQueue)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
|
|
|
|
|
#### Methods
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>set_queue</b>(<i>self, dataQueue</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L536">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the dataQueue to be used by the Thread to store the incoming [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) objects on.
|
|
|
|
|
|
<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>dataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
This is the data queue that will be used to store the RTISMeasurement objects on.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>stop_thread</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L547">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Stop the measurement thread gracefully.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>stopped</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L554">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get status of the thread if it should be stopped or not.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>run</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L560">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Main thread function to run continuously. Should not be used. Use `start()` instead.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **MeasureExternalTriggerCallbackThread**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>MeasureExternalTriggerCallbackThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L608">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Thread to start RTIS sonar measurements triggered by an external trigger.
|
|
|
To set the callback function correctly use `set_callback(callback)` function.
|
|
|
Your callback function should only have one argument, the [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) data package.
|
|
|
To start the thread use the `start()` function. To stop use the `stop_thread()` function.
|
|
|
By default using a `signal.SIGINT` exit (ex. using <kbd>CTRL</kbd>+<kbd>C</kbd>) will gracefully end the script.
|
|
|
|
|
|
Use [`create_measure_external_trigger_callback(save_callback)`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#create_measure_external_trigger_callback) to make an easy to use the class.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a callback to save the measurement to disk.
|
|
|
|
|
|
```python
|
|
|
index = 0
|
|
|
|
|
|
def save_callback(measurement=None):
|
|
|
if measurement != None:
|
|
|
if measurement.rawData is not None:
|
|
|
data_sonar = measurement.rawData.tobytes()
|
|
|
file_handle_data = open(str(index) + ".bin","wb")
|
|
|
file_handle_data.write(data_sonar)
|
|
|
file_handle_data.close()
|
|
|
index = index + 1
|
|
|
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_callback(save_callback)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
|
|
|
|
|
#### Methods
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>set_callback</b>(<i>self, callback</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L645">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<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>callback : <i>method with one argument (RTISMeasurement)</i></b>
|
|
|
<p class="attr">
|
|
|
This is the method that will be used as a callback when a new measurement is triggered by the external trigger. This function should only require one argument, the <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> object containing the measurement data.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>stop_thread</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L656">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Stop the measurement thread gracefully.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>stopped</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L663">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get status of the thread if it should be stopped or not.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i></i> <b>run</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L669">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Main thread function to run continuously. Should not be used. Use `start()` instead.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
# **Methods**
|
|
|
|
|
|
## **open_connection**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>open_connection</b>(<i>port: string='/dev/ttyACM0', allowDebugMode: bool=False </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L1921">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to connect to the port of the RTIS Hardware.
|
|
|
|
|
|
<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>port : <i>string (default = '/dev/ttyACM0')</i></b>
|
|
|
<p class="attr">
|
|
|
Name of the port.
|
|
|
</p>
|
|
|
<b>allowDebugMode : <i>bool (default = False)</i></b>
|
|
|
<p class="attr">
|
|
|
When enabled, if a connection can not be made to a real RTIS Deviceto the chosen port, it will instead automatically go into a debug mode where a virtual RTIS device is used instead of throwing a exception. This is mostly for debugging and testing of the library.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **close_connection**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>close_connection</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L1982">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The public function to manually close the connection to the RTIS device.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **set_recording_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_recording_settings</b>(<i>premade: str=None, jsonPath: str=None, callCustom: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2009">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set the recording settings. All parameters are optional and most have default values.
|
|
|
Please read their decription carefully.
|
|
|
|
|
|
<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>premade : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
When using get_premade_recording_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
|
|
|
</p>
|
|
|
<b>jsonPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can also store the recording settings in a json file. To load the recording settings from a json file, please use the absolute path to this json file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>callCustom : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can use a custom call pulse to emmit from the RTIS Device in active mode. To load the custom pulse, use the absolute path to the csv file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>microphoneSamples : <i>int (default = 163840)</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of microphone samples. Must be dividable by 32768.
|
|
|
</p>
|
|
|
<b>microphoneSampleFrequency : <i>int (default = 4500000)</i></b>
|
|
|
<p class="attr">
|
|
|
The microphone sample frequency (without subsampling of PDM). The frequency must be 4.5 MHz(ultrasound) or 1.125 MHz(audible) depending on the wanted mode.
|
|
|
</p>
|
|
|
<b>callSampleFrequency : <i>int (default = 450000)</i></b>
|
|
|
<p class="attr">
|
|
|
The chosen sample frequency of the call. Must by larger then 160 KHz and smaller then 2 MHz.
|
|
|
</p>
|
|
|
<b>callDuration : <i>float (default = 2.5)</i></b>
|
|
|
<p class="attr">
|
|
|
The duration in miliseconds of the call.
|
|
|
</p>
|
|
|
<b>callMinimumFrequency : <i>int (default = 25000)</i></b>
|
|
|
<p class="attr">
|
|
|
The minimum frequency in Hz of the call sweep used for generating the pulse.
|
|
|
</p>
|
|
|
<b>callMaximumFrequency : <i>int (default = 50000)</i></b>
|
|
|
<p class="attr">
|
|
|
The maximum frequency in Hz of the call sweep used for generating the pulse.
|
|
|
</p>
|
|
|
<b>callEmissions : <i>int (default = 1)</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of times the pulse should be emitted during one measurement.
|
|
|
</p>
|
|
|
<b>configName : <i>String (default = "")</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with. If set to empty (as it is by default), it will become the name set for premade. If no premade settings are used it will default to <em>RTISSettings</em>.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create settings from a premade setup.
|
|
|
You can get the available premade settings with [`get_premade_recording_settings_list()`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_premade_processing_settings_list).
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(premade="short_20_80")
|
|
|
```
|
|
|
|
|
|
Create settings from a json file.
|
|
|
This expects a json to be available with a format such as seen below.
|
|
|
Here we use auto-generated pulse call to emit.
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"microphoneSamples" : 294912,
|
|
|
"microphoneSampleFrequency" : 4500000,
|
|
|
"callSampleFrequency" : 450000,
|
|
|
"callDuration" : 2.5,
|
|
|
"callMinimumFrequency" : 25000,
|
|
|
"callMaximumFrequency" : 50000,
|
|
|
"callEmissions": 1
|
|
|
}
|
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create settings from a json file.
|
|
|
This expects a json to be available with a format such as seen below.
|
|
|
Here we use manually generated call.
|
|
|
It has to be available on the given path and have the right format.
|
|
|
An example of such a custom call can be found [here](config/premadeSettings/recording/flutter.csv).
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"microphoneSamples" : 16777216,
|
|
|
"microphoneSampleFrequency" : 4500000,
|
|
|
"callSampleFrequency" : 450000,
|
|
|
"callCustom": "mycall.csv",
|
|
|
"callEmissions": 1
|
|
|
}
|
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create full custom settings with the arguments. All arguments that aren't filled in will use default values.
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(microphoneSamples=294912, callDuration=3, callMinimumFrequency=25000,
|
|
|
callMaximumFrequency=80000)
|
|
|
```
|
|
|
|
|
|
Load in manually generated call. This requires the file to exist on the path and have the right format.
|
|
|
An example of such a custom call can be found [here](config/premadeSettings/recording/flutter.csv).
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(callCustom="mycall.csv")
|
|
|
```
|
|
|
|
|
|
## **set_processing_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_processing_settings</b>(<i>premade: str=None, jsonPath: str=None, customPath: str=None, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float=5, microphoneSampleFrequency: int=4500000, pdmEnable: bool=True, matchedFilterEnable: bool=True, beamformingEnable: bool=True, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2191">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set the processing settings. All parameters are optional and most have default values.
|
|
|
Please read their decription carefully.
|
|
|
|
|
|
<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>premade : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
When using get_premade_processing_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
|
|
|
</p>
|
|
|
<b>jsonPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can also store the processing settings in a json file. To load the processing settings from a json file, please use the absolute path to this json file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>customPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can use a custom set of processing files (delaymatrix.csv, directions.csv and ranges.csv). To load the custom files use the absolute path to the folder where these csvs are located. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>microphoneLayout : <i>String (default = eRTIS_v3D1)</i></b>
|
|
|
<p class="attr">
|
|
|
Identifier of the microphone layout used for this configuration.
|
|
|
</p>
|
|
|
<b>mode : <i>int (default = 1)</i></b>
|
|
|
<p class="attr">
|
|
|
Defines if using 3D or 2D processing. If set to 1 a 2D horizontal planedirection layout will be generated. When set to 0 a 3D equal distance direction layout will be generated.
|
|
|
</p>
|
|
|
<b>directions : <i>int (default = 181)</i></b>
|
|
|
<p class="attr">
|
|
|
Defines how many directions the layout should generate.
|
|
|
</p>
|
|
|
<b>minRange : <i>float (default = 0.5)</i></b>
|
|
|
<p class="attr">
|
|
|
The minimum distance in meters of the energyscape to generate.
|
|
|
</p>
|
|
|
<b>maxRange : <i>float (default = 5)</i></b>
|
|
|
<p class="attr">
|
|
|
The maximum distance in meters of the energyscape to generate.
|
|
|
</p>
|
|
|
<b>microphoneSampleFrequency : <i>int (default = 4500000)</i></b>
|
|
|
<p class="attr">
|
|
|
The microphone sample frequency (without subsampling of PDM). The frequency must be 4.5 MHz(ultrasound) or 1.125 MHz(audible) depending on the wanted mode.
|
|
|
</p>
|
|
|
<b>pdmEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for PDM filtering part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>matchedFilterEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>beamformingEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for beamforming part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>enveloppeEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for enveloppe part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>cleanEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for cleaning part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>preloadToggle : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for using RTIS CUDA preloading
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create settings from a premade setup with all processing steps on.
|
|
|
You can get the available premade settings with [`get_premade_recording_settings_list()`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_premade_processing_settings_list).
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000", pdmEnable=True, matchedFilterEnable=True,
|
|
|
beamformingEnable=True, enveloppeEnable=True, cleanEnable=True, preloadToggle=True)
|
|
|
```
|
|
|
# **General Usage**
|
|
|
|
|
|
You don't have to define all the processing steps, as they are all on by default.
|
|
|
This is a library used by most parts of the RTIS Network including the CLients, Server and applications.
|
|
|
This documentation is mostly meant to explain how to use it to create your own applications.
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000")
|
|
|
```
|
|
|
Making a new application for the RTIS Network is rather straight forward.
|
|
|
Several functions are available to be used to gain information on the connected
|
|
|
RTIS Clients and Server and prepare your application for their data.
|
|
|
|
|
|
Create settings from a premade setup with only part of the processing steps enabled and no preloading.
|
|
|
You can get the available premade settings with [`get_premade_recording_settings_list()`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_premade_processing_settings_list).
|
|
|
All the available commands are explained below.
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", pdmEnable=True, matchedFilterEnable=True,
|
|
|
beamformingEnable=False, enveloppeEnable=False, cleanEnable=False)
|
|
|
```
|
|
|
For receiving the measurement data one should set up a TCP socket server with the
|
|
|
IP defined in the [serversettings.json](Config/serversettings.json) as _applicationIP_ with port `65444`.
|
|
|
|
|
|
Create settings from a json file with full processing settings on.
|
|
|
This expects a json to be available with a format such as seen below.
|
|
|
Here we use auto-generated processing files.
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"microphoneLayout" : "eRTIS_v3D1",
|
|
|
"microphoneSampleFrequency" : 4500000,
|
|
|
"minRange" : 0.5,
|
|
|
"maxRange" : 5,
|
|
|
"directions": 181,
|
|
|
"2D": 1
|
|
|
}
|
|
|
```
|
|
|
For example:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create settings from a json file with full processing settings on.
|
|
|
This expects a json to be available with a format such as seen below.
|
|
|
Here we use manually generated processing files.
|
|
|
They have to be available on these paths and have the right format.
|
|
|
An example of such custom processing files can be found [here](config/premadeSettings/processing/).
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"microphoneLayout" : "eRTIS_v3D1",
|
|
|
"microphoneSampleFrequency" : 4500000,
|
|
|
"directionsCustom": "./directions.csv",
|
|
|
"delayMatrixCustom": ".premade/delaymatrix.csv",
|
|
|
"rangesCustom": ".premade/ranges.csv"
|
|
|
}
|
|
|
import socket
|
|
|
import pickle
|
|
|
|
|
|
serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
|
serverSocket.bind(('applicationIP', 65444))
|
|
|
serverSocket.listen(10)
|
|
|
print("Started data listener.")
|
|
|
while True:
|
|
|
try:
|
|
|
conn, address = serverSocket.accept()
|
|
|
data = []
|
|
|
while True:
|
|
|
packet = conn.recv(2048)
|
|
|
if not packet: break
|
|
|
data.append(packet)
|
|
|
dataPackage = pickle.loads(b"".join(data))
|
|
|
print("measurement #" + dataPackage[4] + " received!")
|
|
|
except socket.error as ex:
|
|
|
print("the RTIS Server aborted the data connection: " + str(ex))
|
|
|
except pickle.UnpicklingError as ex:
|
|
|
print("the RTIS Server aborted the data connection: " + str(ex))
|
|
|
except EOFError as ex:
|
|
|
print("The RTIS Server aborted the data connection: " + str(ex))
|
|
|
except KeyboardInterrupt:
|
|
|
print("Closing data listener...")
|
|
|
serverSocket.close()
|
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create full custom settings with the arguments. All arguments that aren't filled in will use default values.
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(mode = 0, directions = 1337, minRange = 0.5, maxRange = 10)
|
|
|
```
|
|
|
|
|
|
Load in manually generated processing files. This requires 3 files to exist in the given path:
|
|
|
delaymatrix.csv, directions.csv and ranges.csv.
|
|
|
An example of such custom processing files can be found [here](config/premadeSettings/processing/).
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(customPath="mysettingsfolder")
|
|
|
```
|
|
|
|
|
|
## **get_current_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_current_settings</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2398">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function returns the [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object of the current settings for processing and recording.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>settings : <i>RTISSettings</i></b>
|
|
|
<p class="attr">
|
|
|
The complete class containing all RTIS settings for recording and processing. Returns 'None' or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **clear_current_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>clear_current_settings</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2415">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to clear the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) configuration.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
|
|
<col class="field-body" />
|
|
|
<tbody valign="top">
|
|
|
|
|
|
</table>
|
|
|
|
|
|
The `dataPackage` that the RTIS Network Server sends contains a tuple with the following elements in this order:
|
|
|
- `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.
|
|
|
|
|
|
# **Classes**
|
|
|
|
|
|
## **get_settings**
|
|
|
## **RTISClientObj**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_settings</b>(<i>recordingPremade: str=None, recordingJsonPath: str=None, recordingCallCustom: str=None, processingPremade: str=None, processingJsonPath: str=None, processingCustomPath: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float=5, pdmEnable: bool=True, matchedFilterEnable: bool=True, beamformingEnable: bool=True, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2424">[source]</a>
|
|
|
<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#L83">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function returns a [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object with all chosen recording and processing settings based on the
|
|
|
given arguments. It will not set these settings to the RTIS Device or activate processing. It only creates
|
|
|
the settings object.
|
|
|
|
|
|
<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>recordingPremade : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
When using get_premade_recording_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
|
|
|
</p>
|
|
|
<b>recordingJsonPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can also store the recording settings in a json file. To load the recording settings from a json file, please use the absolute path to this json file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>recordingCallCustom : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can use a custom call pulse to emmit from the RTIS Device in active mode. To load the custom pulse, use the absolute path to the csv file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>processingPremade : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
When using get_premade_processing_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
|
|
|
</p>
|
|
|
<b>processingJsonPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can also store the processing settings in a json file. To load the processing settings from a json file, please use the absolute path to this json file with this argument. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>processingCustomPath : <i>String (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
One can use a custom set of processing files (delaymatrix.csv, directions.csv and ranges.csv). To load the custom files use the absolute path to the folder where these csvs are located. See the README.md for more information.
|
|
|
</p>
|
|
|
<b>microphoneSamples : <i>int (default = 163840)</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of microphone samples. Must be dividable by 32768.
|
|
|
</p>
|
|
|
<b>microphoneSampleFrequency : <i>int (default = 4500000)</i></b>
|
|
|
<p class="attr">
|
|
|
The microphone sample frequency (without subsampling of PDM). The frequency must be 4.5 MHz(ultrasound) or 1.125 MHz(audible) depending on the wanted mode.
|
|
|
</p>
|
|
|
<b>callSampleFrequency : <i>int (default = 450000)</i></b>
|
|
|
<p class="attr">
|
|
|
The chosen sample frequency of the call. Must by larger then 160 KHz and smaller then 2 MHz.
|
|
|
</p>
|
|
|
<b>callDuration : <i>float (default = 2.5)</i></b>
|
|
|
<p class="attr">
|
|
|
The duration in miliseconds of the call.
|
|
|
</p>
|
|
|
<b>callMinimumFrequency : <i>int (default = 25000)</i></b>
|
|
|
<p class="attr">
|
|
|
The minimum frequency in Hz of the call sweep used for generating the pulse.
|
|
|
</p>
|
|
|
<b>callMaximumFrequency : <i>int (default = 50000)</i></b>
|
|
|
<p class="attr">
|
|
|
The maximum frequency in Hz of the call sweep used for generating the pulse.
|
|
|
</p>
|
|
|
<b>callEmissions : <i>int (default = 1)</i></b>
|
|
|
<p class="attr">
|
|
|
The amount of times the pulse should be emitted during one measurement.
|
|
|
</p>
|
|
|
<b>microphoneLayout : <i>String (default = eRTIS_v3D1)</i></b>
|
|
|
<p class="attr">
|
|
|
Identifier of the microphone layout used for this configuration.
|
|
|
</p>
|
|
|
<b>mode : <i>int (default = 1)</i></b>
|
|
|
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">
|
|
|
Defines if using 3D or 2D processing. If set to 1 a 2D horizontal planedirection layout will be generated. When set to 0 a 3D equal distance direction layout will be generated.
|
|
|
The unique identifier to identify this RTIS Client by.
|
|
|
</p>
|
|
|
<b>directions : <i>int (default = 181)</i></b>
|
|
|
<b>ip : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
Defines how many directions the layout should generate.
|
|
|
The current IP used by the active RTIS Client.
|
|
|
</p>
|
|
|
<b>minRange : <i>float (default = 0.5)</i></b>
|
|
|
<b>online : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
The minimum distance in meters of the energyscape to generate.
|
|
|
If the RTIS Client has timed out it will be set to False, otherwise it will always be True.
|
|
|
</p>
|
|
|
<b>maxRange : <i>float (default = 5)</i></b>
|
|
|
<b>lastHeartBeatTimestamp : <i>datetime datetime</i></b>
|
|
|
<p class="attr">
|
|
|
The maximum distance in meters of the energyscape to generate.
|
|
|
The datetime object telling the last time a heartbeat was received from an RTIS Client.
|
|
|
</p>
|
|
|
<b>pdmEnable : <i>bool (default = True)</i></b>
|
|
|
<b>configured : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for PDM filtering part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
The state of the configuration of an RTIS Client. 0 = Booting | 1 = Started | 2 = Configuring | 3 = Ready | 4 = Preparing workers | 5 = Online
|
|
|
</p>
|
|
|
<b>matchedFilterEnable : <i>bool (default = True)</i></b>
|
|
|
<b>behaviour : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
The state of the sonar behaviour of an RTIS Client. 0 = passive | 1 = active
|
|
|
</p>
|
|
|
<b>beamformingEnable : <i>bool (default = True)</i></b>
|
|
|
<b>inputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for beamforming part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
The amount of data packages currently in the incoming data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>enveloppeEnable : <i>bool (default = True)</i></b>
|
|
|
<b>outputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for enveloppe part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
The amount of data packages currently in the outgoing data queue of the RTIS Client.
|
|
|
</p>
|
|
|
<b>cleanEnable : <i>bool (default = True)</i></b>
|
|
|
<b>internalCounter : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for cleaning part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
The current index of the internal measurement counter of the connected RTIS hardware.
|
|
|
</p>
|
|
|
<b>preloadToggle : <i>bool (default = True)</i></b>
|
|
|
<b>networkVersion : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for using RTIS CUDA preloading
|
|
|
The RTIS Network software version that is used by this RTIS Client.
|
|
|
</p>
|
|
|
<b>configName : <i>String (default = "")</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with. If set to empty (as it is by default), it will become the name set for recordingPremade. If no premade recording settings are used it will default to <em>RTISSettings</em>.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>settings : <i>RTISSettings</i></b>
|
|
|
<b>firmwareVersion : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The complete class containing all RTIS settings for recording and processing. Returns 'None' or will raise an exception on failure.
|
|
|
The RTIS Device hardware firmware version that is used by this RTIS Client.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -938,14 +132,15 @@ the settings object. |
|
|
|
|
|
|
|
|
|
|
|
## **set_settings_from_class**
|
|
|
#### Methods
|
|
|
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_settings_from_class</b>(<i>settings: RTISSettings</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2624">[source]</a>
|
|
|
<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#L167">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The high level function to set the wanted settings from an [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object. These can be created
|
|
|
with the get_custom_settings() or get_settings() functions.
|
|
|
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" />
|
... | ... | @@ -953,113 +148,29 @@ with the get_custom_settings() or get_settings() functions. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>settings : <i>RTISSettings</i></b>
|
|
|
<td class="field-body" width="100%"><b>client_ip : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
The current IP used by the active RTIS Client.
|
|
|
</p>
|
|
|
<b>client_configured : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_premade_processing_settings_list**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_premade_processing_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2653">[source]</a>
|
|
|
The state of the configuration of an RTIS Client. 0 = Booting | 1 = Started | 2 = Configuring | 3 = Ready | 4 = Preparing workers | 5 = Online
|
|
|
</p>
|
|
|
|
|
|
The function to get a list of names of all the available premade settings for processing.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>recordingSettings : <i>list[str]</i></b>
|
|
|
<b>client_behaviour : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
A list holding all the names of available settings that can be loaded.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_premade_recording_settings_list**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_premade_recording_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2668">[source]</a>
|
|
|
The state of the sonar behaviour of an RTIS Client. 0 = passive | 1 = active
|
|
|
</p>
|
|
|
|
|
|
The function to get a list of names of all the available premade settings for recording.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>recordingSettings : <i>list[str]</i></b>
|
|
|
<b>client_inputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
A list holding all the names of available settings that can be loaded.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **prepare_processing**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>prepare_processing</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2682">[source]</a>
|
|
|
The amount of data packages currently in the incoming data queue of the RTIS Client.
|
|
|
</p>
|
|
|
|
|
|
The high level function to start the CUDA workers for looped measurements. Not required for processing.
|
|
|
But speeds up the workflow significantly if doing many measurements.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<b>client_outputDataQueueSize : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **unload_processing**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>unload_processing</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2707">[source]</a>
|
|
|
The amount of data packages currently in the outgoing data queue of the RTIS Client.
|
|
|
</p>
|
|
|
|
|
|
The high level function to stop the CUDA workers. Only required if actually using preloading of workers.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<b>client_internalCounter : <i>int</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
The current index of the internal measurement counter of the connected RTIS hardware.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -1067,13 +178,13 @@ The high level function to stop the CUDA workers. Only required if actually usin |
|
|
|
|
|
|
|
|
|
|
|
## **get_raw_measurement**
|
|
|
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_raw_measurement</b>(<i>behaviour: bool=False</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2720">[source]</a>
|
|
|
<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#L205">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The high level function to start an RTIS sonar measurement and return the raw data in an [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object.
|
|
|
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" />
|
... | ... | @@ -1081,197 +192,115 @@ The high level function to start an RTIS sonar measurement and return the raw da |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>behaviour : <i>bool</i></b>
|
|
|
<td class="field-body" width="100%"><b>maximum_delta : <i>float (default = 15)</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to read the required sonar behaviour (active or passive).
|
|
|
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>measurement : <i>RTISMeasurement</i></b>
|
|
|
<td class="field-body" width="100%"><b>state : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the raw measurement of the RTIS device with the raw binary data under <code>measurement.rawData</code>.
|
|
|
returns <code>True</code> if not timed out, returns <code>False</code> if the RTIS Client is timed out.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a connection, set recording settings and make a raw measurement with passive behaviour.
|
|
|
|
|
|
```python
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
```
|
|
|
|
|
|
## **get_signal_measurement**
|
|
|
## **Pose**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_signal_measurement</b>(<i>behaviour: bool=False</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2752">[source]</a>
|
|
|
<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#L229">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The high level function to start an RTIS sonar measurement and process it with only PDM filtering
|
|
|
and subsampling to get the (microphone) signals return them in an [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object.
|
|
|
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>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>behaviour : <i>bool</i></b>
|
|
|
<th class="field-name"><b>Attributes:</b></td>
|
|
|
<td class="field-body" width="100%"><b>x : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to read the required sonar behaviour (active or passive).
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>measurement : <i>RTISMeasurement</i></b>
|
|
|
The forward facing axis position value in meters.
|
|
|
</p>
|
|
|
<b>y : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the signal measurement of the RTIS device under <code>measurement.processedData</code> and the raw binary data under <code>measurement.rawData</code>.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a connection, set recording and processing settings and make a signal measurement with active behaviour.
|
|
|
|
|
|
```python
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
signal_measurement = rtisdev.get_signal_measurement(True)
|
|
|
```
|
|
|
|
|
|
## **get_processed_measurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_processed_measurement</b>(<i>behaviour: bool=False</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2790">[source]</a>
|
|
|
The left facing axis position value in meters.
|
|
|
</p>
|
|
|
|
|
|
The high level function to start an RTIS sonar measurement and process it and return the raw and processed data
|
|
|
in an [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object.
|
|
|
|
|
|
<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>behaviour : <i>bool</i></b>
|
|
|
<b>z : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to read the required sonar behaviour (active or passive).
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>measurement : <i>RTISMeasurement</i></b>
|
|
|
The upwards facing axis position value in meters.
|
|
|
</p>
|
|
|
<b>pitch : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the processed measurement of the RTIS device under <code>measurement.processedData</code> and the raw binary data under <code>measurement.rawData</code>.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a connection, set recording and processing settings and make a processed measurement with active behaviour.
|
|
|
|
|
|
```python
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
processed_measurement = rtisdev.get_processed_measurement(True)
|
|
|
```
|
|
|
|
|
|
## **process_measurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>process_measurement</b>(<i>measurement: RTISMeasurement</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2828">[source]</a>
|
|
|
The rotation value around the Y-axis in degrees.
|
|
|
</p>
|
|
|
|
|
|
The high level function to process a raw RTIS sonar measurement from a [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object
|
|
|
and return the raw and processed data in a new [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object.
|
|
|
|
|
|
<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>measurement : <i>RTISMeasurement</i></b>
|
|
|
<b>yaw : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the raw measurement of the RTIS device.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>packageOut : <i>RTISMeasurement object</i></b>
|
|
|
The rotation value around the Z-axis in degrees.
|
|
|
</p>
|
|
|
<b>roll : <i>float</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the processed measurement of the RTIS device under <code>measurement.processedData</code> and the raw binary data under <code>measurement.rawData</code>.
|
|
|
The rotation value around the X-axis in degrees.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a connection, set recording and processing settings and make a raw measurement with active behaviour.
|
|
|
Then afterwards process it.
|
|
|
|
|
|
```python
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
processed_measurement = rtisdev.process_measurement(measurement)
|
|
|
```
|
|
|
|
|
|
## **set_counter**
|
|
|
|
|
|
## **dspSettings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_counter</b>(<i>newCount: int=0</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2867">[source]</a>
|
|
|
<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#L299">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
High level function to set the internal measurement counter of the sonar hardware.
|
|
|
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">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>newCount : <i>int (default = 0)</i></b>
|
|
|
<p class="attr">
|
|
|
The new count index to set.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **set_behaviour**
|
|
|
|
|
|
|
|
|
# **Methods**
|
|
|
|
|
|
## **dsp_worker_process**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_behaviour</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2890">[source]</a>
|
|
|
<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#L458">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the behaviour of the sonar hardware to passive or active. This is only necessary if using external
|
|
|
measurement triggers. As using the normal RTIS Dev functions of [`get_raw_measurement(behaviour)`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_raw_measurement),
|
|
|
[`get_signal_measurement(behaviour)`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_signal_measurement) and [`get_processed_measurement(behaviour)`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_processed_measurement) will use the given function
|
|
|
argument to define the sonar behaviour.
|
|
|
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.
|
|
|
This method should only be used the the RTIS Server and not by applications.
|
|
|
|
|
|
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" />
|
... | ... | @@ -1279,40 +308,21 @@ argument to define the sonar behaviour. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>mode : <i>bool</i></b>
|
|
|
<td class="field-body" width="100%"><b>dspSettings : <i>dspSettings</i></b>
|
|
|
<p class="attr">
|
|
|
the behaviour mode chosen. False = passive True = active
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
The complete class containing all RTIS settings for measuring and processing.
|
|
|
</p>
|
|
|
<b>inputDataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_firmware_version**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_firmware_version</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2915">[source]</a>
|
|
|
The queue to get the measurement data packages from.
|
|
|
</p>
|
|
|
|
|
|
Get the firmware version of the internal RTIS firmware used on the device.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>firmwareVersion : <i>string</i></b>
|
|
|
<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">
|
|
|
returns the firmware version as a string in 'vMajor.Minor.Bugfix' format. Returns 'undefined' or will raise an exception on failure.
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -1320,14 +330,14 @@ Get the firmware version of the internal RTIS firmware used on the device. |
|
|
|
|
|
|
|
|
|
|
|
## **create_measure_external_trigger_queue**
|
|
|
## **get_server_config**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>create_measure_external_trigger_queue</b>(<i>dataQueue </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2930">[source]</a>
|
|
|
<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#L526">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Thread that will be waiting for an external trigger to measure from
|
|
|
the RTIS Device and afterwards put this measurement on a data queue.
|
|
|
A method to connect to the RTIS Server and 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" />
|
... | ... | @@ -1335,44 +345,36 @@ the RTIS Device and afterwards put this measurement on a data queue. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>dataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<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">
|
|
|
On this queue the <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> objects will be put after an external trigger starts a new measurement.
|
|
|
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>th : <i>MeasureExternalTriggerQueueThread</i></b>
|
|
|
<td class="field-body" width="100%"><b>serverDspSettings : <i>dspSettings</i></b>
|
|
|
<p class="attr">
|
|
|
Class instance of the Thread super class that can then be started with '.start()' and waited for with <code>.join()</code> for example. It can be closed gracefully with the '.stop_thread()' function. This will also be done automatically when <code>signal.SIGINT</code> (ex. <kbd>CTRL</kbd>+<kbd>C</kbd>) is triggered.
|
|
|
The complete class containing all RTIS settings for measuring and processing. Returns None on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a queue to save the measurement to and assign it to the thread.
|
|
|
|
|
|
```python
|
|
|
from multiprocessing import Process, Manager
|
|
|
|
|
|
manager = Manager()
|
|
|
dataQueue = manager.Queue()
|
|
|
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_queue(dataQueue)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
|
|
|
|
|
## **create_measure_external_trigger_callback**
|
|
|
## **get_clients_and_configs**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>create_measure_external_trigger_callback</b>(<i>callback: Callable[[ RTISMeasurement], any]</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2968">[source]</a>
|
|
|
<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#L602">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Thread that will be waiting for an external trigger to measure from
|
|
|
the RTIS Device and afterwards put this measurement on a data queue.
|
|
|
A method to connect to the RTIS Server and 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" />
|
... | ... | @@ -1380,50 +382,35 @@ the RTIS Device and afterwards put this measurement on a data queue. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>callback : <i>method with one argument of type RTISMeasurement</i></b>
|
|
|
<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">
|
|
|
This is the method that will be used as a callback when a new measurement is triggered by the external trigger. This function should only require one argument, the <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> object containing the measurement data.
|
|
|
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>th : <i>MeasureExternalTriggerCallbackThread</i></b>
|
|
|
<td class="field-body" width="100%"><b>clients : <i>dictionary<string,dspSettings></i></b>
|
|
|
<p class="attr">
|
|
|
Class instance of the Thread super class that can then be started with <code>.start()</code> and waited for with <code>.join()</code> for example. It can be closed gracefully with the <code>.stop_thread()</code> function. This will also be done automatically when <em>signal.SIGINT</em> (ex. <kbd>CTRL</kbd>+<kbd>C</kbd>) is triggered.
|
|
|
A dictionary with the RTIS Client IDs as the keys and the DSP settings as the values.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create a callback to save the measurement to disk.
|
|
|
|
|
|
```python
|
|
|
index = 0
|
|
|
|
|
|
def save_callback(measurement=None):
|
|
|
if measurement != None:
|
|
|
if measurement.rawData is not None:
|
|
|
data_sonar = measurement.rawData.tobytes()
|
|
|
file_handle_data = open(str(index) + ".bin","wb")
|
|
|
file_handle_data.write(data_sonar)
|
|
|
file_handle_data.close()
|
|
|
index = index + 1
|
|
|
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_callback(save_callback)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
|
|
|
|
|
## **toggle_amplifier**
|
|
|
## **get_client_pose**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>toggle_amplifier</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3015">[source]</a>
|
|
|
<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#L698">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Enable/disable the high voltage amplifier's step up controller.
|
|
|
It is enabled by default so has to be manually disabled if wanted. This will save on power usage and heat production.
|
|
|
A method to connect to the RTIS Server and 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" />
|
... | ... | @@ -1431,48 +418,24 @@ It is enabled by default so has to be manually disabled if wanted. This will sav |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>mode : <i>bool</i></b>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
the behaviour mode chosen. <code>False</code> = disable <code>True</code> = enable
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>client_id : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **toggle_external_triggers**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>toggle_external_triggers</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3038">[source]</a>
|
|
|
The identifier of the RTIS Client.
|
|
|
</p>
|
|
|
|
|
|
Enable/disable external triggers being able to start a measurement on the RTIS device.
|
|
|
They are enabled by default so have to be manually disabled.
|
|
|
|
|
|
<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>mode : <i>bool</i></b>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
the behaviour mode chosen. <code>False</code> = disable <code>True</code> = enable
|
|
|
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>success : <i>bool</i></b>
|
|
|
<td class="field-body" width="100%"><b>pose : <i>Pose</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
The Pose object containing the position and (euler) rotation values of that RTIS Client. Returns None on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -1480,13 +443,14 @@ They are enabled by default so have to be manually disabled. |
|
|
|
|
|
|
|
|
|
|
|
## **reset_device**
|
|
|
## **set_behaviour_active**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>reset_device</b>(<i>stm32pin: int=7</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3061">[source]</a>
|
|
|
<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#L747">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to reset the RTIS device hardware.
|
|
|
A method to connect to the RTIS Server tell all connected RTIS Clients to set their sonar behaviour to active.
|
|
|
Usefull for connected applications.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
... | ... | @@ -1494,16 +458,13 @@ The function to reset the RTIS device hardware. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>stm32pin : <i>Integer (default = 7)</i></b>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
Change the GPIO pin used for the STM32 connection. Please ask a CoSys-Lab member for the correct pin number if not working as intended with the default value.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
<b>logger : <i>logging.logger (default = None)</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
The logging library object to stream the messages to. If None then normal Print statement is used.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -1511,13 +472,14 @@ The function to reset the RTIS device hardware. |
|
|
|
|
|
|
|
|
|
|
|
## **set_log_mode**
|
|
|
## **set_behaviour_passive**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_log_mode</b>(<i>mode: int</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3109">[source]</a>
|
|
|
<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#L774">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set the logging level of the RTIS Dev module.
|
|
|
A method to connect to the RTIS Server tell all connected RTIS Clients to set their sonar behaviour to passive.
|
|
|
Usefull for connected applications.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
... | ... | @@ -1525,33 +487,13 @@ The function to set the logging level of the RTIS Dev module. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>mode : <i>int</i></b>
|
|
|
<td class="field-body" width="100%"><b>serverIp : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
Disable or configure log the level. 0 = off 1 = only warnings and errors 2(default) = includes info 3 = includes debug
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **set_custom_logger**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>set_custom_logger</b>(<i>customLogger: logging.Logger</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3139">[source]</a>
|
|
|
The IP on which the RTIS Server can be found.
|
|
|
</p>
|
|
|
|
|
|
The function to set a custom logger to be used by RTIS Dev.
|
|
|
|
|
|
<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>customLogger : <i>logging.Logger</i></b>
|
|
|
<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>
|
... | ... | |