Skip to main content

Python client and Range Image Protocol utilities for Water Linked Sonar 3D-15.

Project description

wlsonar

Package wlsonar is a Python client library for the Water Linked Sonar 3D-15.

The key features of this package are:

  • wlsonar.Sonar3D for configuration and inspection of system state.
  • wlsonar.range_image_protocol for Range Image Protocol packets.

Installation

The wlsonar package is hosted on pypi and can be installed with pip:

pip install wlsonar

Quickstart

Following is a snippet showing how to connect to the sonar and receive images.

import wlsonar
import wlsonar.range_image_protocol as rip

# (set to your sonar's IP address
ip = "10.1.2.139"

# connect, enable acoustics, configure to send images over UDP multicast
sonar = wlsonar.Sonar3D(ip)
sonar.set_acoustics_enabled(True)
sonar.set_udp_multicast()

print("Sonar configured, listening for UDP packets...")

# receive UDP packets, parse them into protobuf, and extract voxels
sock = wlsonar.open_sonar_udp_multicast_socket()
try:
    while True:
        packet, addr = sock.recvfrom(wlsonar.UDP_MAX_DATAGRAM_SIZE)
        try:
            msg = rip.unpackb(packet)
        except rip.UnknownProtobufTypeError:
            # silently skip unknown packet types
            continue
        if isinstance(msg, rip.RangeImage):
            xyz = wlsonar.range_image_to_xyz(msg)
            id = msg.header.sequence_id
            print(f"Got range image {id} with {len(xyz)} voxels")
finally:
    sock.close()

More elaborate examples can be found in the examples folder.

Documentation and resources

Documentation for this package is provided in the form of:

For general documentation about the Sonar 3D-15 see: https://docs.waterlinked.com/sonar-3d/sonar-3d-15/. The integration API that this package interfaces with is documented here: https://docs.waterlinked.com/sonar-3d/sonar-3d-15-api/. See also the replayer: https://sonar.replay.waterlinked.com/.

Development and testing

README_dev.md documents development and testing of this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wlsonar-0.3.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wlsonar-0.3.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file wlsonar-0.3.1.tar.gz.

File metadata

  • Download URL: wlsonar-0.3.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wlsonar-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c26e23a5a6276dc475237e322f11ef8888c515a8c23c6e8b4a364ea02d789ffb
MD5 13fdf15ec8e2ac391e5cb63db03a57be
BLAKE2b-256 54f6e11f4d9ab8a3e0e678da137dc3ab1adfbbd1f28b49363e1e3e9ea8fa5390

See more details on using hashes here.

File details

Details for the file wlsonar-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: wlsonar-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wlsonar-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c784e4d6e6de8d3dcab9b8344553387185e58b2eabb4a2365af6ce99d0b15b61
MD5 3af13cfe5d35baa0680ca1515e96801d
BLAKE2b-256 6e79fdad085be6f7656decc501be7ef52205ade4815844e70e96a7efd6046b31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page