Skip to main content

No project description provided

Project description

rpc

Installation

pip install rpc

Usage

from embrpc.rpcscp import SCPServer, SCPClient


    class HandControl(BaseModel):
        x: float
        y: float
        z: float
        roll: float
        pitch: float
        yaw: float

    """Feed an LLM output to the robot running a server."""
    client = SCPClient(
        host="10.4.20.28",
        # host="1.2.3.4",
        user="user",
        password="pass",  # noqa: S106
        inbound_model=HandControl,
        outbound_model=HandControl,
        inbound_path="~/data_in.json",
        outbound_path="~/data_out.json",
    )

    client.send_data(HandControl(x=0.1, y=0.2, z=0.3, roll=0.4, pitch=0.5, yaw=0.6))
    data = client.receive_data()
    logging.info(data)

    locobot_server = SCPServer(
        inbound_path="~/data_in.json",
        outbound_path="~/data_out.json",
        inbound_model=HandControl,
        outbound_model=HandControl,
    )
    execute = lambda x: print(f"Executing {x}")
    locobot_server.poll(execute)

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

embrpc-0.0.3.tar.gz (13.2 MB view details)

Uploaded Source

Built Distribution

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

embrpc-0.0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file embrpc-0.0.3.tar.gz.

File metadata

  • Download URL: embrpc-0.0.3.tar.gz
  • Upload date:
  • Size: 13.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for embrpc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bb942a9a160d31e4a9773d52261bb6fc33996e362898efc4c25929c183b899ed
MD5 32d447bdcfdda742e560abc5d828fe1a
BLAKE2b-256 6bd4081c7a282448cf730070491743820f24383099203e0961309ebb77642980

See more details on using hashes here.

File details

Details for the file embrpc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: embrpc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for embrpc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba0b5f2f04872366673f91d67c036b0f46aed2422e5beb2b9412a8ad49a51271
MD5 83fe2041186461e6044681a8cba7cbf1
BLAKE2b-256 cc0bda050018aa0379af7aa61c3effe8dd5c7ec7507bfa602099391055ae2791

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