Wiki
Clone wikicola2_core / comms
Acoustic communications
The acoustic communication with the vehicle is handled in two parts. At surface, the user communicates using the ultra-short baseline (USBL) system through the iquaview
user interface. On the vehicle side, the acoustic communications are handled by the cola2_comms
package and the specific modem driver that is installed in the vehicle (e.g., evologics_modem
). Figure 1 shows an overview of the acoustic communications system.
Figure 1. Diagram of acoustic communications.
The acoustic message sent between modems is a single serialized structure that is sent by iquaview
from surface (see first Table for the 37 byte structure), and answered in the ack by the vehicle (see second Table for the 37 byte structure). When this message is correctly transmitted, a USBL measurement is obtained at the top-side. The measurement is composed with the GPS signal that is also received in the control station and the final computed position is sent in the next message to the AUV.
Type | Description |
---|---|
char | Identifier of the message sender (U) |
double | Timestamp of the data represented in this message |
double | GPS + USBL measured AUV position latitude |
double | GPS + USBL measured AUV position longitude |
float | GPS + USBL measured AUV position depth |
float | Accuracy of the USBL measurement |
int32 | Command to execute in vehicle (RecoveryAction, StartMission...) |
Table 1. Acoustic message struct sent from the surface using USBL down to the AUV (total size 37 bytes). |
Type | Description |
---|---|
char | Identifier of the message sender (S) |
double | Timestamp of the data represented in this message |
double | AUV navigator position latitude |
double | AUV navigator position longitude |
float | AUV navigator position depth |
float | AUV navigator heading |
int32 | status_code from safety_supervisor node |
Table 2. Acoustic message struct sent together with the ack message from the AUV to the top-side(total size 37 bytes). |
Modem driver
The evologics_modem
node is a simple acoustic modem driver that receives the already serialized message that has to be sent through acoustic communications from the /sparus2/comms/to_modem
topic and publishes the received acoustic communications to the /sparus2/comms/from_modem
topic.
It also provides two topics to debug the exact instructions that are written to the modem (/sparus2/evologics_modem/raw/to_modem
) and the ones that are read from the modem (/sparus2/evologics_modem/raw/from_modem
).
cola2_comms
The cola2_comms
node abstracts all the acoustic communication and simplifies the work for different modem driver implementations. The node is also in charge of executing the commands that are sent from the surface (i.e. recovery_actions
). Moreover it offers the possibility to transfer extra custom data defined by the user (Tables 3 & 4).
Topic | Description |
---|---|
/sparus2/comms/to_modem |
Serialized message to be sent by the modem |
/sparus2/comms/custom_output |
Custom user message received by the modem |
Table 3. cola2_comms published topics of type std_msgs/String . |
Topic | Description |
---|---|
/sparus2/comms/from_modem |
Serialized message received by the modem |
/sparus2/comms/custom_input |
Custom user message to be sent by the modem |
Table 4. cola2_comms subscribed topics of type std_msgs/String . |
Receiving messages
When a message is received through /sparus2/comms/from_modem
, the message is first deserialized. Then, the identifier is checked to be U
(from the surface) and the timestamp, position and accuracy are used to publish a USBL update to /sparus2/navigator/usbl
topic for the navigator node.
After that, the received command is checked and immediately executed. If it refers to a recovery_action
, the corresponding action is called. If the command refers to a start_mission
, the mission is started, etc.
Finally, if the message is longer that the acoustic message struct, the extra bytes are published to the /sparus2/comms/custom_output
topic. It is up to the user to process this serialized custom message that arrived from surface correctly.
Sending messages
Messages are continuously sent to the modem driver and it is the modem driver who manages which ones are actually sent through the acoustic channel. To create an output message, cola2_comms
gathers navigation data from /sparus2/navigator/navigation
and the vehicle status code from /sparus2/safety_supervisor/status
to construct and serialize the message.
If a /sparus2/comms/custom_input
was received in the specified period, the custom data is appended at the end of the serialized message. All together is then sent to the modem driver through the /sparus2/comms/to_modem
topic.
Custom messages
Users can easily define custom messages to be passed between the vehicle and the top side by creating their own node that serializes/deserializes them and collects and publishes the necessary data. This custom node should publish to the /sparus2/comms/custom_input
topic in the vehicle and subscribe to the /sparus2/comms/custom_output
topic in the vehicle.
The cola2_comms
node ensures that when appending the custom message the limits of the maximum modem message size are respected and sends/receives transparently the custom data.
Updated