Skip to main content

A package for working with the COLAV protobuf format

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

colav_protobuf

PyPI - Version PyPI - Python Version

This package contains python protobuf compilations for easy import as well as mock examples of each of these messages you can import via examples.

Message types include:

  • missionRequest
  • missionResponse
  • agentUpdate
  • obstaclesUpdate
  • controllerFeedback

Table of Contents

Installation

pip install colav-protobuf

Structure

The src code in colav_protobuf shows that the project is organised into main directories:

  • Tests: The tests directory contains a variety of unit tests ensuring that the pkg is working as expected and are called as apart of the CI/CD pipeline defined by the github_action
  • src: The src contains three pkgs
    • colav_protothe original proto files which were compiled by protobuf compiler protos these are un-importable but will give you a good idea of the proto structure.
    • colav_protobuf: This is the importable python pkg you can import the different messages types as follows:
    • examples: This pkg contains mock of each of the protobufs for example and testing purposes.

Usage

Using this pkg is simpl importing the proto messages is simple:

    from colav_protobuf import MissionRequest
    from colav_protobuf import MissionResponse
    from colav_protobuf import AgentUpdate
    from colav_protobuf import ObstaclesUpdate
    from colav_protobuf import ControllerFeedback

Examples of these object initiations are shown in the examples which contains a number of importable message exmaples. how to publish it via a python socket:

Here is a sample of proto creation of a agent configuration message: and

    from colav_protobuf import AgentUpdate
    import socket 

    agent_update = AgentUpdate
    agent_update.mission_tag = "COLAV_MISSION_NORTH_BELFAST_TO_SOUTH_FRANCE"
    agent_update.agent_tag = "EF12_WORKBOAT"
    agent_update.state.pose.position.x =   float(3_675_830.74)
    agent_update.state.pose.position.y = float(-272_412.13)
    agent_update.state.pose.position.z =  float(4_181_577.70)
    agent_update.state.pose.orientation.x = 0
    agent_update.state.pose.orientation.y = 0
    agent_update.state.pose.orientation.z = 0
    agent_update.state.pose.orientation.w = 1

    agent_update.state.velocity = 20
    agent_update.state.yaw_rate = 0.2
    agent_update.state.acceleration = 1

    agent_update.timestamp = "1708853235"
    agent_update.timestep = "000000000012331"

    aserialised_agent_update = agent_update.SerializeToString()

    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.sendto(serialized_agent_update, ("192.168.1.100", 7200))

License

colav-protobuf is distributed under the terms of the MIT license.

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

colav_protobuf-0.0.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

colav_protobuf-0.0.2-py2.py3-none-any.whl (18.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file colav_protobuf-0.0.2.tar.gz.

File metadata

  • Download URL: colav_protobuf-0.0.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for colav_protobuf-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b1b1288e79246fa6f201d61058f652e0eecd497204c76681b50ed396d9f60ad2
MD5 31ac9fad6bb609aa2d9534b6db8b7adb
BLAKE2b-256 6d31cd25ba61c7438ff225eda9ca5324d51b0b53b09aba5b4ad25eb5e32ad3ea

See more details on using hashes here.

File details

Details for the file colav_protobuf-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for colav_protobuf-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1edf581cf9367dc6f04247b0456d83c948532227f31d5f667e9172182600b996
MD5 d6222eb9b7e6e6fdeb1930bcd933107b
BLAKE2b-256 5f4e451dce9684ab00b1e9338c806b4ae1dcc5d5caa173534e3d7c79ceabae25

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