(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Control of an VG10 / VGC10 Gripper using the Modbus / TCP protocol (ROS Noetic)

Description: This tutorial explains how to use the "onrobot_vg_control" and "onrobot_vg_modbus_tcp" packages to control an VG10 / VGC10 Gripper configured with the Modbus / TCP protocol.

Tutorial Level: BEGINNER

Prerequisites

This tutorial assumes that you have a VG10 / VGC10 Gripper configured with the Modbus / TCP protocol. The Gripper should be connected to a network, which has been properly configured.

Finally, make sure that the external dependency for the package "onrobot_vg_modbus_tcp" has been installed. The dependency is the python package pymodbus.

$ rosdep install onrobot_vg_modbus_tcp

Network configuration

Make sure that the ethernet card in your PC to which your gripper is connected has the following static IP network configuration:

onrobot_network_setup.jpg

The static IP address of the PC (192.168.1.10) can be any IP address different from the hand's IP address (whose default is 192.168.1.1).

ROS Nodes to Control the VG Gripper

Run the VG Gripper Driver Node

The Gripper is driven by the node "OnRobotVGTcpNode.py" contained in the package "onrobot_vg_control". The IP address of the Gripper has to be provided as an argument.

For example, the driver for controlling a VG10 / VGC10 Gripper with the IP address 192.168.1.1 is launched using the following command:

$ roslaunch onrobot_vg_control bringup.launch ip:=192.168.1.1

Run the VG Gripper Status Listener Node

In the package "onrobot_vg_control", there is also a node for listening to and interpreting the status of the Gripper. The driver publishes the status of the Gripper on "OnRobotVGInput". The status listener node can be run together with the driver node using the following same command:

$ roslaunch onrobot_vg_control bringup.launch ip:=192.168.1.1

status_listener.jpg

Run the VG Gripper Simple Controller Node

The driver listens for messages on "OnRobotVGOutput". The messages are interpreted and commands are sent to the gripper accordingly. A simple controller node is provided which can be run (at another terminal) using:

$ rosrun onrobot_vg_control OnRobotVGSimpleController.py

simple_controller.jpg

The simple controller node can therefore be modified to send custom commands to the Gripper.

Wiki: onrobot/Tutorials/Control of an VG Gripper using the Modbus TCP protocol (Noetic) (last edited 2022-02-24 13:22:12 by TakuyaKiyokawa)