[Documentation] [TitleIndex] [WordIndex

Note: The procedure is similar for controlling a Robotiq 2-Finger Gripper using the "robotiq_c_model_gripper" package.
(!) 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 a 3-Finger Gripper using the Modbus TCP protocol (ros indigo and earlier releases)

Description: This tutorial explains how to use the "robotiq_s_model_control" and "robotiq_modbus_tcp" packages to control an 3-Finger Gripper configured with the Modbus TCP protocol. Please visit this website for more information on the Robotiq Adaptive Robot Grippers.

Tutorial Level: BEGINNER

Prerequisites

This tutorial assumes that you have a 3-Finger Gripper configured with the Modbus TCP protocol. The Gripper should be connected to a network, which has been properly configured (you can validate the communication with the Gripper using the Robotiq User Interface).

Finally, make sure that the external dependency for the package "robotiq_modbus_tcp" has been installed. The dependency is the python package pyModbus. From Ubuntu Precise, it is simply installed using "rosdep install robotiq_modbus_tcp". On other systems, it can be installed using "easy_install -U pymodbus".

Network configuration

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

robotiq_network_setup.jpeg

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

ROS Nodes to Control the Gripper

Run the S-Model Driver Node

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

For example, the driver for controlling an 3-Finger Gripper with the IP address 192.168.1.11 is launched using the following command: "rosrun robotiq_s_model_control SModelTcpNode.py 192.168.1.11".

Run the S-Model Simple Controller Node

The driver listens for messages on "SModelRobotOutput" using the "SModel_robot_output" msg type. 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 robotiq_s_model_control SModelSimpleController.py".

simple_controller.jpg

The "SModel_robot_output" msg type is simply composed of the robot output variables described in the Robotiq 3-Finger Gripper user manual. The simple controller node can therefore be modified to send custom commands to the Gripper.

Run the S-Model Status Listener Node

In the package "robotiq_s_model_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 "SModelRobotInput" using the "SModel_robot_input" msg type. The msg type is composed of the robot input variables described in the Robotiq 3-Finger Gripper user manual. The status listener node can be run (at another terminal) using the following command: "rosrun robotiq_s_model_control SModelStatusListener.py".

status_listener.jpg


2019-06-22 13:05