Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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 and their proto formatting include:


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

When pkg is installed, Using it is simple imports are as follows.

    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.stamp.sec = int(170)
    agent_update.stamp.nanosec = int(423)

    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.

Metadata

Release files for colav-protobuf 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colav-protobuf 0.2.4
File Size Uploaded
colav_protobuf-0.2.4.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colav-protobuf 0.2.4
File Interpreter ABI Platform
colav_protobuf-0.2.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 43.0 kB

Release files / colav_protobuf-0.2.4.tar.gz

Download URL colav_protobuf-0.2.4.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e93e78f65cb77d1b0d2edfd624418f8f43f23b4481b8ed9c04e091fe6957bb19
BLAKE2b-256 checksum
How to use checksums
5ec8d103d092f7c4a53941762b3e3671b3695c659e34f22dee52362bfc9d1e9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release files / colav_protobuf-0.2.4-py2.py3-none-any.whl

Download URL colav_protobuf-0.2.4-py2.py3-none-any.whl
Size 27.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
37992b39f8ef0ed008dbbb3ea194952826d03bdef37054e8617943aef6afc7a3
BLAKE2b-256 checksum
How to use checksums
8e8de21dfb12816b7dd6f3e6f789ef1c9807e539a0152dd27d3749365e1ff0be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page