prototwin


Nameprototwin JSON
Version 0.1.11 PyPI version JSON
download
home_pagehttps://prototwin.com
SummaryThe official python client interface for ProtoTwin Connect.
upload_time2024-06-15 19:17:22
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/43/de/50ec2e10e9ab737f4a369f9dfbeb634fa55e7c4e860899c549f47ae61e08/prototwin-0.1.11.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.11",
    "project_urls": {
        "Homepage": "https://prototwin.com"
    },
    "split_keywords": [
        "industrial simulation",
        " physics",
        " machine learning",
        " robotics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43de50ec2e10e9ab737f4a369f9dfbeb634fa55e7c4e860899c549f47ae61e08",
                "md5": "799ce87132a623688ff21c8490a3943b",
                "sha256": "35db124a33348a84624fd62b78d05e84516cbefcf57af7879077504fc67d257f"
            },
            "downloads": -1,
            "filename": "prototwin-0.1.11.tar.gz",
            "has_sig": false,
            "md5_digest": "799ce87132a623688ff21c8490a3943b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4313,
            "upload_time": "2024-06-15T19:17:22",
            "upload_time_iso_8601": "2024-06-15T19:17:22.691161Z",
            "url": "https://files.pythonhosted.org/packages/43/de/50ec2e10e9ab737f4a369f9dfbeb634fa55e7c4e860899c549f47ae61e08/prototwin-0.1.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-15 19:17:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "prototwin"
}
        
Elapsed time: 0.32575s