Skip to main content

Python package for FANUC industrial robots

Project description

fanucpy: Python package for FANUC industrial robots

Acknowledgements

This work was developed at the Institute for Advanced Manufacturing at the University of Nottingham as a part of the Digital Manufacturing and Design Training Network.

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.

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

Python package installation

pip install fanucpy

Driver installation

Follow these steps to install FANUC driver.

Usage

Connect to a robot:

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

# 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

# open gripper
robot.gripper(True)

# close gripper
robot.gripper(False)

Querying robot state

# 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

robot.call_prog(prog_name)

Get/Set RDO

robot.get_rdo(rdo_num=7)
robot.set_rdo(rdo_num=7, value=True)

Contributions

External contributions are welcome!

  • Agajan Torayev: Key developer
  • 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
  2. Aruco Tracking App

Citation

Please use the following to cite if you are using this library in academic publications Towards Modular and Plug-and-Produce Manufacturing Apps

@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}
}

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

fanucpy-0.1.10.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

fanucpy-0.1.10-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file fanucpy-0.1.10.tar.gz.

File metadata

  • Download URL: fanucpy-0.1.10.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.2.0

File hashes

Hashes for fanucpy-0.1.10.tar.gz
Algorithm Hash digest
SHA256 eeee15ea02153138e4229802946009ad8b9b3551dfd7d7220e87cc147ab32062
MD5 5f92aba85fca5ba829f6476d080333b9
BLAKE2b-256 470964c8af0b00bbad500df9d09796387a9989934b8d434a30b74ec753897efb

See more details on using hashes here.

File details

Details for the file fanucpy-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: fanucpy-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.2.0

File hashes

Hashes for fanucpy-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 460a65ab01ccd17557c4d468cdedf77a1e55c7edd33f034f147ec86777594a97
MD5 7974b186b1fc52f5b1a1f3722ac84823
BLAKE2b-256 1604fed2ae1f52bef19742b0ac2b39002f279eae0f2f83f478721e038fb626ae

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