Configure a Soft Robotics Gripper

The softrobotics model supports the Soft Robotics mGrip gripper controlled by the Soft Robotics coDrive Control Unit.

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and navigate to the Create component menu. Enter a name for your gripper, select the type gripper, and select the softrobotics model.

Click Create component.

Creation of a softrobotics gripper component in the Viam app config builder.

Edit and fill in the attributes as applicable.

{
    "components": [
        {
            "name": "<your-gripper-name>",
            "type": "gripper",
            "model" : "softrobotics",
            "attributes": {
                "board": "<your-board-name>",
                "open": "<pin-number-on-board>",
                "close": "<pin-number-on-board>",
                "power": "<pin-number-on-board>",
                "analog_reader": "psi"
            }
        }
    ]
}
{
    "components": [
        {
            "name": "local",
            "type": "board",
            "model": "pi",
            "attributes": {
                "analogs": [
                    {
                        "name": "psi",
                        "pin": "32"
                    }
                ]
            }
        },
        {
            "name": "my_gripper",
            "type": "gripper",
            "model" : "softrobotics",
            "attributes": {
                "board": "local",
                "open": "11",
                "close": "13",
                "power": "15",
                "analog_reader": "psi"
            }
        }
    ]
}

The following attributes are available for softrobotics grippers:

NameInclusionTypeDescription
boardRequiredstringThe name of the board to which your gripper control unit is wired.
openRequiredstringThe pin number of the board pin wired to the open pin (D1) on the gripper controller.
closeRequiredstringThe pin number of the board pin wired to the close pin (D2) on the gripper controller.
powerRequiredstringThe pin number of the board pin wired to the enable pin (D3) on the gripper controller.
analog_readerRequiredstringMust be called "psi". You must configure an analog on your board and name it "psi".


Have questions, or want to meet other people working on robots? Join our Community Discord.