From 5dc0c05e89c90b6b4f5513d7c90c9daa40482be3 Mon Sep 17 00:00:00 2001 From: Kristopher Krasnosky Date: Wed, 1 Mar 2023 15:30:54 -0500 Subject: [PATCH 1/2] added geometry stuff to pingInfo --- acoustic_msgs/msg/PingInfo.msg | 41 +++++++++++++++++++++++++++++ acoustic_msgs/msg/RawSonarImage.msg | 2 -- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/acoustic_msgs/msg/PingInfo.msg b/acoustic_msgs/msg/PingInfo.msg index f2f8d7b..717d7d0 100644 --- a/acoustic_msgs/msg/PingInfo.msg +++ b/acoustic_msgs/msg/PingInfo.msg @@ -1,3 +1,39 @@ +# the frame id of the acoustic center of the receiver +# the transmitter frame is assumed to be that specified +# in the message header +string rx_frame_id + +# the ping number reported by the sonar. +# useful for matching multiple message types for a given ping +uint64 ping_no + +# Acoustic array geometry + +# linear arrays are found in most MBES for both TX and RX +# implications for processing: +# - Beam widths grow with obliquity +# - Beam pattern is represented as a cone defined by the tx/rx angle +uint8 ARRAY_GEOMETRY_LINEAR=0 + +# Circular/Barrel arrays are found in some MBES and FLS as both tx and +# rx arrays. They are defined by an array of elements equally spaced +# on the rim of a circle +# implications for processing: +# - Beam widths are constant with obliquity +# - Beam pattern is represented as a plane defined by the tx/rx angle +uint8 ARRAY_GEOMETRY_CIRCULAR=1 + +uint8 tx_geometry +uint8 rx_geometry + +# The steering angles represent how far off an effective linear array +# the beam was steered. This angle will define how conical the tx/rx +# beam is. +# For the linear portion of an array tx/rx_steering_angle = tx/rx_angle +# For the circular portion of an array tx/rx_sterring_angle = 0 +uint8[] tx_steering_angles +uint8[] rx_steering_angles + # Center frequency of sonar in Hz # Set to 0 if unavailable float32 frequency @@ -6,6 +42,11 @@ float32 frequency # Set to 0 if unavailable float32 sound_speed +float32 sample_rate # hz +float32 tx_pulse_width + + + # Sonar reported -3db beamwidths # May be empty if not reported # reported in radians diff --git a/acoustic_msgs/msg/RawSonarImage.msg b/acoustic_msgs/msg/RawSonarImage.msg index ef7c5a2..9aac349 100644 --- a/acoustic_msgs/msg/RawSonarImage.msg +++ b/acoustic_msgs/msg/RawSonarImage.msg @@ -7,8 +7,6 @@ std_msgs/Header header PingInfo ping_info -float32 sample_rate # hz - uint32 samples_per_beam # the number of samples in each beam # Many sonars have some kind of upper gate for water column data From d855514c15a1bb46c7a9d295a787985ba0c0aad2 Mon Sep 17 00:00:00 2001 From: Kristopher Krasnosky Date: Fri, 10 Mar 2023 16:35:20 -0500 Subject: [PATCH 2/2] added sample_rate --- acoustic_msgs/msg/PingInfo.msg | 36 ++++------------------------ acoustic_msgs/msg/RawSonarImage.msg | 22 ++++++++++------- acoustic_msgs/msg/SonarImageData.msg | 2 ++ 3 files changed, 21 insertions(+), 39 deletions(-) diff --git a/acoustic_msgs/msg/PingInfo.msg b/acoustic_msgs/msg/PingInfo.msg index 717d7d0..2eaeab5 100644 --- a/acoustic_msgs/msg/PingInfo.msg +++ b/acoustic_msgs/msg/PingInfo.msg @@ -7,45 +7,19 @@ string rx_frame_id # useful for matching multiple message types for a given ping uint64 ping_no -# Acoustic array geometry - -# linear arrays are found in most MBES for both TX and RX -# implications for processing: -# - Beam widths grow with obliquity -# - Beam pattern is represented as a cone defined by the tx/rx angle -uint8 ARRAY_GEOMETRY_LINEAR=0 - -# Circular/Barrel arrays are found in some MBES and FLS as both tx and -# rx arrays. They are defined by an array of elements equally spaced -# on the rim of a circle -# implications for processing: -# - Beam widths are constant with obliquity -# - Beam pattern is represented as a plane defined by the tx/rx angle -uint8 ARRAY_GEOMETRY_CIRCULAR=1 - -uint8 tx_geometry -uint8 rx_geometry - -# The steering angles represent how far off an effective linear array -# the beam was steered. This angle will define how conical the tx/rx -# beam is. -# For the linear portion of an array tx/rx_steering_angle = tx/rx_angle -# For the circular portion of an array tx/rx_sterring_angle = 0 -uint8[] tx_steering_angles -uint8[] rx_steering_angles - # Center frequency of sonar in Hz # Set to 0 if unavailable float32 frequency +# the width of the transmittd pulse in seconds +float32 tx_pulse_width + # Speed of sound (m/s) used to calculate ranges; # Set to 0 if unavailable float32 sound_speed -float32 sample_rate # hz -float32 tx_pulse_width - - +# The number of samples per second that the reciever collects +float32 sample_rate # Sonar reported -3db beamwidths # May be empty if not reported diff --git a/acoustic_msgs/msg/RawSonarImage.msg b/acoustic_msgs/msg/RawSonarImage.msg index 9aac349..8432edf 100644 --- a/acoustic_msgs/msg/RawSonarImage.msg +++ b/acoustic_msgs/msg/RawSonarImage.msg @@ -1,8 +1,7 @@ - -# The header time should be the time the ping was transmitted, not -# the time the message was received. -# Note that these two could potentially be several seconds apart, -# especially in deep water. +# All values in the header are associated the transmitter: +# - stamp references the transmit time or the start of the +# transmit cycle. +# - frame_id references the transmitter's acoustic center std_msgs/Header header PingInfo ping_info @@ -14,8 +13,14 @@ uint32 samples_per_beam # the number of samples in each beam # for beam n uint32 sample0 +# if the image is not reported at the full resolution +# ping_info.sample_rate != image_sample_rate +# for a given sample: +# 2-way travel time = image_sample_rate*(sample_no+sample0) + +float32 image_sample_rate + # Multi-sector multibeams can transmit different sectors at different times -# The Reson doesn't but we include a TX delay for each beam anyway. # # Overall, therefore, our overall time is: # @@ -23,11 +28,12 @@ uint32 sample0 # Each beam's TX time: header.stamp + transmit_delay[i] # Each beam's RX time: header.stamp + transmit_delay[i] + sample_rate*image_row float32[] tx_delays -# Steering angle applied to tx beam + +# The angle reported for the transmitted pulse # reported in radians float32[] tx_angles -# Steering angle applied to rx beam +# The angle reported for the received pulse # reported in radians float32[] rx_angles diff --git a/acoustic_msgs/msg/SonarImageData.msg b/acoustic_msgs/msg/SonarImageData.msg index abb88c2..f1b724f 100644 --- a/acoustic_msgs/msg/SonarImageData.msg +++ b/acoustic_msgs/msg/SonarImageData.msg @@ -17,4 +17,6 @@ uint32 dtype uint32 beam_count # The actually pixel data in row-major (beam_index major) format +# this can be interpreted as a 2d array with indicies beam_index and +# sample_number uint8[] data