Metadata-Version: 2.1
Name: elite-ec-sdk
Version: 0.0.2
Summary: SDK for Elite EC Series Cobots
Author-email: Tushar Gaurav <tushar.gaurav416@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Tushar Gaurav
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/tushgaurav/EliteECSeriesSDK
Keywords: elite-sdk,elite-ec,elite-robots
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.1
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tomli ; python_version < "3.11"
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: bumpver ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: pip-tools ; extra == 'dev'

# Elite EC Series Python SDK

## Introduction
There was no Python SDK for the Elite EC Series of Cobots, so I decided to make one. This SDK is based on the ELITE ROBOTS EC Series Programming Manual, provided by Elite Robots. The official manual provides functions that establish socket communication for controlling the robot. This SDK is the more pythonic version of the official manual.

## Usage
> Please insure that the robot is in remote mode when using this SDK.

You can instantiate a robot class for each robot, the robot class requires IP address at the time of object creation.

```python
warehouse_bot = Robot("192.168.0.1")
```

You need to follow these steps to send commands to the robot.
1. Instantiate a new robot object with IP and Port (by default Robot class uses Port 8055).
2. Make connection to the robot.
3. Send commands to the robot using the execute function or set variables using setVariable function.
4. After usage is over, You should ideally disconnect the robot using disconnect function.

### Example Program

```python
import robot

warehouse_bot = Robot("192.168.0.1")

# Connect to the robot
connection, message = warehouse_bot.connect()
print(message)

if connection:
    # Accessing the value of System Variable B at address 1
    _, result = warehouse_bot.getVariable("SysVarB", 1)
    print("Value of SysVarB at addr 1: ", result)

    # Executing pause_trajectory command mentioned in the Programming Manual
    _, result = warehouse_bot.execute("pause_trajectory")
    print(result)

    # Disconnection the robot
    result, message = warehouse_bot.disconnect()
    print(message)
```

## Further Development
This SDK was made for the sole purpose of making my projects using this robot, easy to read and understand, the official "SDK", requires many lines of code to be written each time and it is difficult to understand.
