fanucpy


Namefanucpy JSON
Version 0.1.13 PyPI version JSON
download
home_pagehttps://github.com/torayeff/fanucpy
SummaryPython package for FANUC industrial robots
upload_time2023-05-25 07:17:47
maintainer
docs_urlNone
authorAgajan Torayev
requires_python>=3.6,<3.11
licenseApache-2.0
keywords fanuc industrial robot robotic apps
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fanucpy: Python package for FANUC industrial robots

## Software contents
The package consists of two parts: 
1. Robot interface code written in Python programming language
2. FANUC robot controller driver (tested with R-30iB Mate Plus Controller) written in KAREL and FANUC teach pendant languages

The communication protocol between the Python package and the FANUC robot controller is depicted below:
![Communication Protocol](https://github.com/torayeff/fanucpy/raw/main/media/CommProtocol.png)

## Python package installation
```bash
pip install fanucpy
```

## Driver installation
Follow these [steps](https://github.com/torayeff/fanucpy/blob/main/fanuc.md) to install FANUC driver.

## Usage
### Connect to a robot:
```python
from fanucpy import Robot

robot = Robot(
    robot_model="Fanuc",
    host="192.168.1.100",
    port=18735,
    ee_DO_type="RDO",
    ee_DO_num=7,
)

robot.connect()
```

### Moving
```python
# move in joint space
robot.move(
    "joint",
    vals=[19.0, 66.0, -33.0, 18.0, -30.0, -33.0],
    velocity=100,
    acceleration=100,
    cnt_val=0,
    linear=False
)

# move in cartesian space
robot.move(
    "pose",
    vals=[0.0, -28.0, -35.0, 0.0, -55.0, 0.0],
    velocity=50,
    acceleration=50,
    cnt_val=0,
    linear=False
)
```

### Opening/closing gripper
```Python
# open gripper
robot.gripper(True)

# close gripper
robot.gripper(False)
```

### Querying robot state
```python
# get robot state
print(f"Current pose: {robot.get_curpos()}")
print(f"Current joints: {robot.get_curjpos()}")
print(f"Instantaneous power: {robot.get_ins_power()}")
print(f"Get gripper state: {robot.get_rdo(7)}")
```

### Calling external program
```python
robot.call_prog(prog_name)
```

### Get/Set RDO
```python
robot.get_rdo(rdo_num=7)
robot.set_rdo(rdo_num=7, value=True)
```

### Get/Set DOUT
```python
robot.get_rdo(dout_num=1)
robot.set_rdo(dout_num=1, value=True)
```

## Contributions
External contributions are welcome!

- Agajan Torayev: Key developer
- Karol
- Fan Mo: Support with documentation
- Michael Yiu: External contributor


## RobotApp
We introduce an experimental feature: Robot Apps. This class facilitates modularity and plug-and-produce functionality. Check the following example apps:

1. [Pick and Place App](examples/PickAndPlaceApp.py)
1. [Aruco Tracking App](examples/ArucoTrackingApp.py)
1. [FANUC ChatGPT](examples/fanucpy-gpt/README.MD)

## Citation
Please use the following to cite if you are using this library in academic publications [Towards Modular and Plug-and-Produce Manufacturing Apps](https://www.sciencedirect.com/science/article/pii/S2212827122004255)
```
@article{torayev2022towards,
  title={Towards Modular and Plug-and-Produce Manufacturing Apps},
  author={Torayev, Agajan and Mart{\'\i}nez-Arellano, Giovanna and Chaplin, Jack C and Sanderson, David and Ratchev, Svetan},
  journal={Procedia CIRP},
  volume={107},
  pages={1257--1262},
  year={2022},
  publisher={Elsevier}
}
```

## Acknowledgements
This work was developed at the [Institute for Advanced Manufacturing at the University of Nottingham](https://www.nottingham.ac.uk/ifam/index.aspx) as a part of the [Digital Manufacturing and Design Training Network](https://dimanditn.eu/).

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 814078.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/torayeff/fanucpy",
    "name": "fanucpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<3.11",
    "maintainer_email": "",
    "keywords": "fanuc,industrial robot,robotic apps",
    "author": "Agajan Torayev",
    "author_email": "torayeff@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/42/c6/5930c95b86ebf3c88648a0bcadf0bab1212456837c224d810b92c4bcf4a2/fanucpy-0.1.13.tar.gz",
    "platform": null,
    "description": "# fanucpy: Python package for FANUC industrial robots\n\n## Software contents\nThe package consists of two parts: \n1. Robot interface code written in Python programming language\n2. FANUC robot controller driver (tested with R-30iB Mate Plus Controller) written in KAREL and FANUC teach pendant languages\n\nThe communication protocol between the Python package and the FANUC robot controller is depicted below:\n![Communication Protocol](https://github.com/torayeff/fanucpy/raw/main/media/CommProtocol.png)\n\n## Python package installation\n```bash\npip install fanucpy\n```\n\n## Driver installation\nFollow these [steps](https://github.com/torayeff/fanucpy/blob/main/fanuc.md) to install FANUC driver.\n\n## Usage\n### Connect to a robot:\n```python\nfrom fanucpy import Robot\n\nrobot = Robot(\n    robot_model=\"Fanuc\",\n    host=\"192.168.1.100\",\n    port=18735,\n    ee_DO_type=\"RDO\",\n    ee_DO_num=7,\n)\n\nrobot.connect()\n```\n\n### Moving\n```python\n# move in joint space\nrobot.move(\n    \"joint\",\n    vals=[19.0, 66.0, -33.0, 18.0, -30.0, -33.0],\n    velocity=100,\n    acceleration=100,\n    cnt_val=0,\n    linear=False\n)\n\n# move in cartesian space\nrobot.move(\n    \"pose\",\n    vals=[0.0, -28.0, -35.0, 0.0, -55.0, 0.0],\n    velocity=50,\n    acceleration=50,\n    cnt_val=0,\n    linear=False\n)\n```\n\n### Opening/closing gripper\n```Python\n# open gripper\nrobot.gripper(True)\n\n# close gripper\nrobot.gripper(False)\n```\n\n### Querying robot state\n```python\n# get robot state\nprint(f\"Current pose: {robot.get_curpos()}\")\nprint(f\"Current joints: {robot.get_curjpos()}\")\nprint(f\"Instantaneous power: {robot.get_ins_power()}\")\nprint(f\"Get gripper state: {robot.get_rdo(7)}\")\n```\n\n### Calling external program\n```python\nrobot.call_prog(prog_name)\n```\n\n### Get/Set RDO\n```python\nrobot.get_rdo(rdo_num=7)\nrobot.set_rdo(rdo_num=7, value=True)\n```\n\n### Get/Set DOUT\n```python\nrobot.get_rdo(dout_num=1)\nrobot.set_rdo(dout_num=1, value=True)\n```\n\n## Contributions\nExternal contributions are welcome!\n\n- Agajan Torayev: Key developer\n- Karol\n- Fan Mo: Support with documentation\n- Michael Yiu: External contributor\n\n\n## RobotApp\nWe introduce an experimental feature: Robot Apps. This class facilitates modularity and plug-and-produce functionality. Check the following example apps:\n\n1. [Pick and Place App](examples/PickAndPlaceApp.py)\n1. [Aruco Tracking App](examples/ArucoTrackingApp.py)\n1. [FANUC ChatGPT](examples/fanucpy-gpt/README.MD)\n\n## Citation\nPlease use the following to cite if you are using this library in academic publications [Towards Modular and Plug-and-Produce Manufacturing Apps](https://www.sciencedirect.com/science/article/pii/S2212827122004255)\n```\n@article{torayev2022towards,\n  title={Towards Modular and Plug-and-Produce Manufacturing Apps},\n  author={Torayev, Agajan and Mart{\\'\\i}nez-Arellano, Giovanna and Chaplin, Jack C and Sanderson, David and Ratchev, Svetan},\n  journal={Procedia CIRP},\n  volume={107},\n  pages={1257--1262},\n  year={2022},\n  publisher={Elsevier}\n}\n```\n\n## Acknowledgements\nThis work was developed at the [Institute for Advanced Manufacturing at the University of Nottingham](https://www.nottingham.ac.uk/ifam/index.aspx) as a part of the [Digital Manufacturing and Design Training Network](https://dimanditn.eu/).\n\nThis project has received funding from the European Union\u2019s Horizon 2020 research and innovation programme under the Marie Sk\u0142odowska-Curie grant agreement No 814078.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Python package for FANUC industrial robots",
    "version": "0.1.13",
    "project_urls": {
        "Homepage": "https://github.com/torayeff/fanucpy",
        "Repository": "https://github.com/torayeff/fanucpy"
    },
    "split_keywords": [
        "fanuc",
        "industrial robot",
        "robotic apps"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ced3d944f0b3d9539828c29ab8b54479113c4f365f7c147dbe32edf6596e7586",
                "md5": "b04a139847ec00681875618ef13f1ecc",
                "sha256": "8be970c4f4023008f62d0872842899b5faa50019407dfaff7dba2b2a53c3ace2"
            },
            "downloads": -1,
            "filename": "fanucpy-0.1.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b04a139847ec00681875618ef13f1ecc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<3.11",
            "size": 12782,
            "upload_time": "2023-05-25T07:17:37",
            "upload_time_iso_8601": "2023-05-25T07:17:37.099713Z",
            "url": "https://files.pythonhosted.org/packages/ce/d3/d944f0b3d9539828c29ab8b54479113c4f365f7c147dbe32edf6596e7586/fanucpy-0.1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42c65930c95b86ebf3c88648a0bcadf0bab1212456837c224d810b92c4bcf4a2",
                "md5": "dcd19efa9704e1c2ae82c8b1d0364c16",
                "sha256": "918ca13ac40d9bface464c9ea5c80ffb88cd1b002b1f4d6a1d2ee4b9612f6892"
            },
            "downloads": -1,
            "filename": "fanucpy-0.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "dcd19efa9704e1c2ae82c8b1d0364c16",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<3.11",
            "size": 13546,
            "upload_time": "2023-05-25T07:17:47",
            "upload_time_iso_8601": "2023-05-25T07:17:47.988968Z",
            "url": "https://files.pythonhosted.org/packages/42/c6/5930c95b86ebf3c88648a0bcadf0bab1212456837c224d810b92c4bcf4a2/fanucpy-0.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-25 07:17:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "torayeff",
    "github_project": "fanucpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fanucpy"
}
        
Elapsed time: 0.06958s