semvec/pypi-packages huggingface dataset:
ros2tcp 0.1.2
A bridge between TCP socket and DDS of ROS 2
Requires Python: >=3.8
Keywords: ROS2,Humble,socket,TCP

# ros2TCP
Creating a bridge between ROS 2 and TCP Socket

## USAGE
Given example for using the library is given below.

### Creating TCP Socket
----

```python
# Import TCP Socket
from ros2tcp.TCPsocket import TCPSocketServer

# Create socket instance.
server = TCPSocketServer()

# Set 'HOST' name and 'PORT'
server.HOST = 'localhost'
server.PORT = 2040
```

### Creating ROS service client
----

```python
# Import required service type
from ros2tcp.plugins import register_callback, register_service, register_plugin
from std_srvs.srv import SetBool

# Create service request
request = SetBool.Request()
request.data = True

# Register service client
srv_1 = register_service(
    n_name='test_node_1',
    s_type=SetBool,
    s_name='test_service',
    req=request
)

srv_2 = register_service(
    n_name='test_node_2',
    s_type=SetBool,
    s_name='test_service',
    req=request
)

# Register callback when response received from the server
@register_callback
def my_callback_1(data):
    # 'data' argument is the response received from the ros service.
    # The data returned here will be send back to the socket client who requested this service.
    return data.message

@register_callback
def my_callback_2(_):
    # The data returned here will be send back to the socket client who requested this service.
    return 'done'

# Now map these service client to the plc request.
server.operations = register_plugin(
    srv=srv_1,
    cb=my_callback_1,
    key=1 # Whenever socket client sends '1', the 'srv_1' get called.
)

server.operations = register_plugin(
    srv=srv_2,
    cb=my_callback_1,
    key=1 # Whenever socket client sends '3', the 'srv_2' get called.
)

# NOTE: Currently key should be an integer.
```

### Running the Socket
----

```python
# import server runner
from ros2tcp.plugins import run_server

# Pass the created socket
run_server(socket=server)
```
publishing-test 0.1.1
Python Boilerplate contains all the boilerplate you need to create a Python package.
Requires Python: >=3.10,<4.0
Keywords: publishing_test

===============
Publishing Test
===============




.. image:: https://gitlab.com/paul_armstrong/publishing-test/badges/main/pipeline.svg
        :target: https://gitlab.com/paul_armstrong/publishing-test/-/commits/main
        :alt: Pipeline Status

.. image:: https://gitlab.com/paul_armstrong/publishing-test/badges/main/coverage.svg
        :target: https://gitlab.com/paul_armstrong/publishing-test/-/commits/main
        :alt: Coverage report

.. image:: https://gitlab.com/paul_armstrong/publishing-test/-/badges/release.svg
        :target: https://gitlab.com/paul_armstrong/publishing-test/-/releases
        :alt: Latest Release

.. image:: https://gitlab.com/paul_armstrong/publishing-test/-/badges/main/pipeline.svg
        :target: https://paul_armstrong.gitlab.io/publishing-test
        :alt: Documentation



Python Boilerplate contains all the boilerplate you need to create a Python package.


* Free software: MIT license


Features
--------

* TODO

Credits
-------

This package was created with Cookiecutter_ and the `paul_armstrong/cookiecutter-pypackage`_, which was forked from the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://gitlab.com/audreyr/cookiecutter
.. _paul_armstrong/cookiecutter-pypackage: https://gitlab.com/paul_armstrong/cookiecutter-pypackage
.. _`audreyr/cookiecutter-pypackage`: https://gitlab.com/audreyr/cookiecutter-pypackage



=======
History
=======

0.1.0 (2023-11-26)
------------------

* First release on PyPI.