Ping360 Minimum Range Question: Can I physically read 0.25m with ROS 2 LaserScan?

Hello,

I am testing the Ping360 sonar using ROS 2 in a small test setup where the walls are approximately 0.25m away from the sensor.

I have written a Python node that subscribes to the /scan topic. I implemented a simple logic to filter out noise but keep short-range data (greater than 0.1m).

Here is the code I am using:

import rclpy
from rclpy.node import Node
from sensor_msgs.msg import LaserScan
import math

class SonarAciOkuyucu(Node):
    def __init__(self):
        super().__init__('sonar_aci_okuyucu')
        
        # Subscribe to /scan topic
        self.subscription = self.create_subscription(
            LaserScan,
            '/scan',
            self.listener_callback,
            10)
        self.subscription

        self.get_logger().info('ANGLE BASED READING STARTED')

    def listener_callback(self, msg):
        # BLIND SPOT FILTER (10 cm)
        KOR_NOKTA = 0.1 

        simdiki_aci_rad = msg.angle_min
        
        # Scan all points in the packet
        for i, mesafe in enumerate(msg.ranges):
            
            # Convert Radian to Degree
            derece = math.degrees(simdiki_aci_rad)
            
            # Normalize angle 0-360
            if derece < 0:
                derece += 360
            elif derece >= 360:
                derece -= 360

            # --- FILTERING ---
            # 1. Is distance valid?
            # 2. Is distance > 0.1m?
            # 3. Is distance < max range?
            if (mesafe > KOR_NOKTA) and (mesafe < msg.range_max):
                
                # PRINT TO SCREEN
                # Expecting around 0.25m for the test
                print(f"[ {int(derece):03d} Deg ] --> Distance: {mesafe:.3f} meters")

            # Increment angle for next point
            simdiki_aci_rad += msg.angle_increment

def main(args=None):
    rclpy.init(args=args)
    node = SonarAciOkuyucu()
    try:
        rclpy.spin(node)
    except KeyboardInterrupt:
        pass
    finally:
        node.destroy_node()
        rclpy.shutdown()

if __name__ == '__main__':
    main()

The datasheet states that the Minimum Range is 0.75m.

My Question: With the default driver settings, is it physically possible for the Ping360 to return a valid measurement at 0.25m that my code can read? Or will the hardware dead zone (transducer ringing) mask everything below 0.75m, making it impossible for this code to detect the walls at 0.25m unless I tune parameters like transmit_duration?

Thanks!

Hi @beyza -
I’d suspect that using the Ping360 in a small tank like that isn’t going to produce usable results.

Using the sensor with PingViewer is a fast and easy way to visualize the response, before developing your own code to react to what is sensed, as it will visualize the data from the sensor. The Ping360 is a sonar, and can’t be treated like a scanning lidar!

1 Like

Hi @beyza,

You haven’t specified or provided the driver / initialisation code you’re using, so we can’t estimate how it would handle short-distance scans - only guess (which isn’t helpful to you).

The transducer ringing is a radially-diminishing effect, and depends on the transmit amplitude and duration, as well as the receiver sensitivity.

The Ping360 does not determine its own transmission parameters, so they always need to be specified somehow by the user. In the case of Ping Viewer, our recommended application for using the device, there is a built-in relationship that sets the transmit duration automatically, based on the specified scanning range, according to limits recommended by the firmware developer to protect the sonar’s hardware.

As I understand it, the specified minimum range is intended in the context of performing longer range scans (i.e. if you are trying to scan as far as 50m away, then you will not detect things that are very close). It is very rare for someone’s desired scan range to be <1m, but if you know that your tank is smaller than that, and the things you’re expecting to detect will strongly reflect the pulses back to the sonar, then there are some “tricks” that can be applied to reduce the perceived ringing, by reducing the transmit duration, setting the minimum receiver gain, and de-tuning the transmit frequency from the transducer’s resonant peak:

1 Like