prototwin


Nameprototwin JSON
Version 0.1.15 PyPI version JSON
download
home_pagehttps://prototwin.com
SummaryThe official python client interface for ProtoTwin Connect.
upload_time2024-07-18 21:41:10
maintainerNone
docs_urlNone
authorProtoTwin
requires_pythonNone
licenseMIT
keywords industrial simulation physics machine learning robotics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ProtoTwin Connect Client

This package provides a simple client that can be used to interface with ProtoTwin Connect.

## Basic Example

```
# STEP 1: Import the ProtoTwin client
import prototwin
import asyncio
import math

# STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)
simulation_time_address = 0
motor_target_velocity_address = 3

async def main():
    # STEP 3: Start ProtoTwin Connect
    client = await prototwin.start()

    # STEP 4: Create the simulation loop
    while True:
        t = client.get(simulation_time_address) # Read signal values
        client.set(motor_target_velocity_address, math.sin(t)) # Write signal values
        await client.step() # Step the simulation forward in time

asyncio.run(main()) # Run the simulation loop
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://prototwin.com",
    "name": "prototwin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Industrial Simulation, Physics, Machine Learning, Robotics",
    "author": "ProtoTwin",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/df/06/89904af7f96792df300ef06db37eaba8e26c596415cd1f4467eb7e76cf7f/prototwin-0.1.15.tar.gz",
    "platform": null,
    "description": "# ProtoTwin Connect Client\n\nThis package provides a simple client that can be used to interface with ProtoTwin Connect.\n\n## Basic Example\n\n```\n# STEP 1: Import the ProtoTwin client\nimport prototwin\nimport asyncio\nimport math\n\n# STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)\nsimulation_time_address = 0\nmotor_target_velocity_address = 3\n\nasync def main():\n    # STEP 3: Start ProtoTwin Connect\n    client = await prototwin.start()\n\n    # STEP 4: Create the simulation loop\n    while True:\n        t = client.get(simulation_time_address) # Read signal values\n        client.set(motor_target_velocity_address, math.sin(t)) # Write signal values\n        await client.step() # Step the simulation forward in time\n\nasyncio.run(main()) # Run the simulation loop\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The official python client interface for ProtoTwin Connect.",
    "version": "0.1.15",
    "project_urls": {
        "Homepage": "https://prototwin.com"
    },
    "split_keywords": [
        "industrial simulation",
        " physics",
        " machine learning",
        " robotics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df0689904af7f96792df300ef06db37eaba8e26c596415cd1f4467eb7e76cf7f",
                "md5": "d2d3cb9de06c82b2a1be4a7e831349c2",
                "sha256": "cd10e29b853bba1aab0b8e1f1ab4a20fa97b8b207862485421f218020819cb89"
            },
            "downloads": -1,
            "filename": "prototwin-0.1.15.tar.gz",
            "has_sig": false,
            "md5_digest": "d2d3cb9de06c82b2a1be4a7e831349c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4919,
            "upload_time": "2024-07-18T21:41:10",
            "upload_time_iso_8601": "2024-07-18T21:41:10.837494Z",
            "url": "https://files.pythonhosted.org/packages/df/06/89904af7f96792df300ef06db37eaba8e26c596415cd1f4467eb7e76cf7f/prototwin-0.1.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-18 21:41:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "prototwin"
}
        
Elapsed time: 0.29699s