pydhgripper


Namepydhgripper JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/han-xudong/pyDHgripper
SummaryPython library for controlling the DH gripper
upload_time2024-09-22 13:59:36
maintainerNone
docs_urlNone
authorYu Jie, Xudong Han
requires_python>=3.6
licenseMIT
keywords dh gripper robotics robotic gripper
VCS
bugtrack_url
requirements crcmod pyserial
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyDHgripper: Control DH Gripper with Python
===========================================

Description
-----------

PyDHgripper is a Python library that allows you to control the DH
gripper with Python. The DH grippers are a series of robot grippers
which is widely used in grasping tasks. This library is based on the
Modbus protocol, and the support types of DH gripper includes AG-95,
DH-3, RGD, and PGE series.

Hardware Requirements
---------------------

-  DH gripper
-  USB-to-RS485 converter
-  24V DC power supply

Here is a connection example for AG-95 gripper

Installation
------------

The ``pyDHgripper`` library supports Python 2.x and Python 3.x. You can
install the library using the following command:

.. code:: bash

   pip install pydhgripper

Or you can install the library from the source code:

.. code:: bash

   git clone https://github.com/han-xudong/pyDHgripper.git
   cd pyDHgripper
   pip install pip -U
   pip install -r requirements.txt

Quick Start
-----------

For Linux, it's needed to set the serial port permission first:

.. code:: bash

   sudo chmod 777 /dev/ttyUSB0
   # For CTS-B1.0,
   # sudo chmod 777 /dev/ttyACM0
   sudo usermod -aG dialout {userName}
   reboot

Several types of DH grippers can be controlled with ``pyDHgripper``. For
example, to control the AG-95 gripper:

.. code:: python

   from pydhgripper import AG95

   gripper = AG95(port='/dev/ttyUSB0')

And here are some functions that can be used to control the gripper:

-  ``read_state``: Read the state of the gripper.

.. code:: python

   gripper.read_state()

-  ``read_pos``: Read the position of the gripper.

.. code:: python

   gripper.read_pos()

-  ``set_force``: Set the force of the gripper.

.. code:: python

   gripper.set_force(val='{FORCE}')

-  ``set_pos``: Set the position of the gripper.

.. code:: python

   gripper.set_pos(val='{POSITION}')

-  ``set_vel``: Set the velocity of the gripper.

.. code:: python

   gripper.set_vel(val='{VELOCITY}')

For more functions, please refer to the source code.

License and Acknowledgement
---------------------------

PyDHgripper is licensed under the MIT License.

Some core codes are developed based on
`DaHuan-FingerControl <https://github.com/FrankJIE09/DaHuan-FingerControl>`__
by Frank.

The DH grippers are developed by DH Robotics. For more information,
please refer to the `DH Robotics
website <http://en.dh-robotics.com/>`__.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/han-xudong/pyDHgripper",
    "name": "pydhgripper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "DH gripper, robotics, robotic gripper",
    "author": "Yu Jie, Xudong Han",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "pyDHgripper: Control DH Gripper with Python\r\n===========================================\r\n\r\nDescription\r\n-----------\r\n\r\nPyDHgripper is a Python library that allows you to control the DH\r\ngripper with Python. The DH grippers are a series of robot grippers\r\nwhich is widely used in grasping tasks. This library is based on the\r\nModbus protocol, and the support types of DH gripper includes AG-95,\r\nDH-3, RGD, and PGE series.\r\n\r\nHardware Requirements\r\n---------------------\r\n\r\n-  DH gripper\r\n-  USB-to-RS485 converter\r\n-  24V DC power supply\r\n\r\nHere is a connection example for AG-95 gripper\r\n\r\nInstallation\r\n------------\r\n\r\nThe ``pyDHgripper`` library supports Python 2.x and Python 3.x. You can\r\ninstall the library using the following command:\r\n\r\n.. code:: bash\r\n\r\n   pip install pydhgripper\r\n\r\nOr you can install the library from the source code:\r\n\r\n.. code:: bash\r\n\r\n   git clone https://github.com/han-xudong/pyDHgripper.git\r\n   cd pyDHgripper\r\n   pip install pip -U\r\n   pip install -r requirements.txt\r\n\r\nQuick Start\r\n-----------\r\n\r\nFor Linux, it's needed to set the serial port permission first:\r\n\r\n.. code:: bash\r\n\r\n   sudo chmod 777 /dev/ttyUSB0\r\n   # For CTS-B1.0,\r\n   # sudo chmod 777 /dev/ttyACM0\r\n   sudo usermod -aG dialout {userName}\r\n   reboot\r\n\r\nSeveral types of DH grippers can be controlled with ``pyDHgripper``. For\r\nexample, to control the AG-95 gripper:\r\n\r\n.. code:: python\r\n\r\n   from pydhgripper import AG95\r\n\r\n   gripper = AG95(port='/dev/ttyUSB0')\r\n\r\nAnd here are some functions that can be used to control the gripper:\r\n\r\n-  ``read_state``: Read the state of the gripper.\r\n\r\n.. code:: python\r\n\r\n   gripper.read_state()\r\n\r\n-  ``read_pos``: Read the position of the gripper.\r\n\r\n.. code:: python\r\n\r\n   gripper.read_pos()\r\n\r\n-  ``set_force``: Set the force of the gripper.\r\n\r\n.. code:: python\r\n\r\n   gripper.set_force(val='{FORCE}')\r\n\r\n-  ``set_pos``: Set the position of the gripper.\r\n\r\n.. code:: python\r\n\r\n   gripper.set_pos(val='{POSITION}')\r\n\r\n-  ``set_vel``: Set the velocity of the gripper.\r\n\r\n.. code:: python\r\n\r\n   gripper.set_vel(val='{VELOCITY}')\r\n\r\nFor more functions, please refer to the source code.\r\n\r\nLicense and Acknowledgement\r\n---------------------------\r\n\r\nPyDHgripper is licensed under the MIT License.\r\n\r\nSome core codes are developed based on\r\n`DaHuan-FingerControl <https://github.com/FrankJIE09/DaHuan-FingerControl>`__\r\nby Frank.\r\n\r\nThe DH grippers are developed by DH Robotics. For more information,\r\nplease refer to the `DH Robotics\r\nwebsite <http://en.dh-robotics.com/>`__.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library for controlling the DH gripper",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/han-xudong/pyDHgripper"
    },
    "split_keywords": [
        "dh gripper",
        " robotics",
        " robotic gripper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bce3be1450561f068d0c21ec706e592d6af190a46bd6af1cbfd0c06446f26154",
                "md5": "e3c02476486b75b59481063f754c99ea",
                "sha256": "b3f1dfc7233bb8d31487e89c401b908ed3f290eb96fa6eae0f4a31120d462022"
            },
            "downloads": -1,
            "filename": "pydhgripper-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3c02476486b75b59481063f754c99ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 12373,
            "upload_time": "2024-09-22T13:59:36",
            "upload_time_iso_8601": "2024-09-22T13:59:36.332726Z",
            "url": "https://files.pythonhosted.org/packages/bc/e3/be1450561f068d0c21ec706e592d6af190a46bd6af1cbfd0c06446f26154/pydhgripper-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-22 13:59:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "han-xudong",
    "github_project": "pyDHgripper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "crcmod",
            "specs": [
                [
                    "==",
                    "1.7"
                ]
            ]
        },
        {
            "name": "pyserial",
            "specs": [
                [
                    "==",
                    "3.5"
                ]
            ]
        }
    ],
    "lcname": "pydhgripper"
}
        
Elapsed time: 0.37568s