-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathreadme.txt~
81 lines (60 loc) · 5.13 KB
/
readme.txt~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Control of a 3-Finger Gripper using the Modbus TCP protocol
http://wiki.ros.org/robotiq/Tutorials/Control%20of%20a%203-Finger%20Gripper%20using%20the%20Modbus%20TCP%20Protocol
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".
1. Run the 3-Finger Gripper Driver Node
"rosrun robotiq_3f_gripper_control Robotiq3FGripperTcpNode.py 192.168.1.11".
The Gripper is driven by the node "Robotiq3FGripperTcpNode.py" contained in the package "robotiq_3f_gripper_control".
The IP address of the Gripper has to be provided as an argument.
For example, the driver for controlling a 3-Finger Gripper with the IP address 192.168.1.11 is launched using the following command:
"rosrun robotiq_3f_gripper_control Robotiq3FGripperTcpNode.py 192.168.1.11".
2. Run the 3-Finger Gripper Simple Controller Node
"rosrun robotiq_3f_gripper_control Robotiq3FGripperSimpleController.py".
The driver listens for messages on "Robotiq3FGripperRobotOutput" using the "Robotiq3FGripper_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_3f_gripper_control Robotiq3FGripperSimpleController.py".
The "Robotiq3FGripper_robot_output" msg type is simply composed of the robot output variables described in the Robotiq 3-Finger Gripper Instruction Manual.
The simple controller node can therefore be modified to send custom commands to the Gripper.
3. Run the 3-Finger Gripper Status Listener Node
"rosrun robotiq_3f_gripper_control Robotiq3FGripperStatusListener.py".
In the package "robotiq_3f_gripper_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 "Robotiq3FGripperRobotInput" using the "Robotiq3FGripper_robot_input" msg type.
The msg type is composed of the robot input variables described in the Robotiq 3-Finger Gripper Instruction Manual. The status listener node can be run (at another terminal) using the following command:
"rosrun robotiq_3f_gripper_control Robotiq3FGripperStatusListener.py".
==================================================================================================================================================
Control of a 2-Finger Gripper using the Modbus RTU protocol
1. Prerequisites
It is assumed you have the robotiq_2f_gripper_control package and the robotiq_modbus_rtu package installed for your ROS distribution
(see the [[https://github.com/ros-industrial/robotiq || robotiq packages on ROS-I github).
2. Configuring the serial port
To control the gripper over a serial port, you may need to give proper privileges to the user:
sudo usermod -aG dialout $USER
To find out the port on which the controller is connected, use:
dmesg | grep tty
3. ROS Nodes to Control the Gripper
3.1 Run the 2-Finger Gripper Driver Node
rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /dev/ttyUSB0
The gripper is driven by the node "Robotiq2FGripperRtuNode.py" contained in the package "robotiq_2f_gripper_control".
Note that "roscore" should be running prior to launching the driver node.
The gripper device ID will also need to be provided as an argument. Thus, to know what is the device ID of your 2-finger gripper,
one way is simply by typing "dmesg | grep ttyUSB" in a terminal right after the gripper was connected to the computer's USB port.
For example, the driver for controlling a 2-finger gripper having "ttyUSB0" as its device ID is launched using the following command:
rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /dev/ttyUSB0
3.2 Run the 2-Finger Gripper Simple Controller Node
rosrun robotiq_2f_gripper_control Robotiq2FGripperSimpleController.py
The driver listens for messages on "Robotiq2FGripperRobotOutput" using the "Robotiq2FGripper_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 (in another terminal) using
"rosrun robotiq_2f_gripper_control Robotiq2FGripperSimpleController.py"
3.3 Run the 2-Finger Gripper Status Listener Node
In the package "robotiq_2f_gripper_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 "Robotiq2FGripperRobotInput" using the "Robotiq2FGripper_robot_input" msg type.
The msg type is composed of the robot input variables described in the Robotiq 2-Finger Gripper Instruction Manual.
The status listener node can be run (in another terminal) using the following command:
"rosrun robotiq_2f_gripper_control Robotiq2FGripperStatusListener.py".