Metadata-Version: 2.1
Name: helyos_agent_sdk
Version: 0.8.1
Summary: Package encloses methods and data definitions that facilitate the connection of agents in the helyOS framework.
Home-page: https://helyosframework.org
Keywords: autonomous driving,helyos,agent,robot
Author: Carlos Viol Barbosa , Julius Kolb
Requires-Python: >=3.7,<4.0
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: cryptography (>=41.0.3,<42.0.0)
Requires-Dist: dataclasses-json (>=0.5.7,<0.6.0)
Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
Requires-Dist: pika (>=1.3.1,<2.0.0)
Requires-Dist: pycryptodome (>=3.15.0,<4.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0) ; sys_platform == "win32" or sys_platform == "linux"
Project-URL: Documentation, https://helyosframework.github.io/helyos_agent_sdk/
Project-URL: Repository, https://github.com/helyOSFramework/helyos_agent_sdk
Description-Content-Type: text/markdown

<div id="top"></div>

<!-- PROJECT LOGO -->
<br />
<div align="center">
  <a href="https://helyosframework.org/">
    <img src="helyos_logo.png" alt="Logo"  height="80">
    <img src="truck.png" alt="Logo"  height="80">
  </a>

  <h3 align="center">helyOS Agent SDK</h3>

  <p align="center">
    Methods and data strrctures to connect autonomous vehicles to helyOS.
    <br />
    <a href="https://helyosframework.github.io/helyos_agent_sdk/"><strong>Explore the docs »</strong></a>
    <br />
    <br />
    <a href="https://github.com/helyOSFramework/helyos_agent_slim_simulator">Demo</a>
    ·
    <a href="https://github.com/helyOSFramework/helyos_agent_sdk/issues">Report Bug</a>
    ·
    <a href="https://github.com/helyOSFramework/helyos_agent_sdk/issues">Request Feature</a>
  </p>
</div>

## About The Project

The helyos-agent-sdk python package encloses methods and data structures definitions that facilitate the connection to helyOS core via RabbitMQ.

### List of features

* RabbitMQ client for communication with helyOS core.
* Support for both AMQP and MQTT protocols.
* Definition of agent and assignment status.
* Easy access to helyOS assignments and instant actions through callbacks.
* SSL support and application-level security with RSA signature. 
* Automatic reconnection to handle connection disruptions.

### Install

```
pip install helyos_agent_sdk

```
### Usage

```python

from helyos_agent_sdk import HelyOSClient, AgentConnector

# Connect via AMQP
helyOS_client = HelyOSClient(rabbitmq_host, rabbitmq_port, uuid=AGENT_UID)

# Or connect via MQTT
# helyOS_client = HelyOSMQTTClient(rabbitmq_host, rabbitmq_port, uuid=AGENT_UID)

helyOS_client.connnect(username, password)

# Check in yard
initial_agent_data = {'name': "vehicle name", 'pose': {'x':-30167, 'y':-5415, 'orientations':[0, 0]}, 'geometry':{"my_custom_format": {}}}
helyOS_client.perform_checkin(yard_uid='1', agent_data=initial_agent_data, status="free")
helyOS_client.get_checkin_result() # yard data

# Communication
agent_connector = AgentConnector(helyOS_client)
agent_connector.publish_sensors(x=-30167, y=3000, z=0, orientations=[1500, 0], sensor= {"my_custom_format": {}})

# ... #

agent_connector.publish_state(status, resources, assignment_status)

# ... #

agent_connector.consume_instant_action_messages(my_reserve_callback, my_release_callback, my_cancel_assignm_callback, any_other_callback)
agent_connector.consume_assignment_messages(my_assignment_callback)
agent_connector.start_listening()


```


### Contributing

Keep it simple. Keep it minimal.


### License

This project is licensed under the MIT License

