This package provides a ROS action controller and drivers for Robotiq two finger grippers, 2F-85, 2F-140 and Hand-E. The package is forked from the robotiq package developed by CRI group. The URCap driver is borrowed from the code by Felix von Drigalski.
URDF models of grippers can be found in urdf
subdirectory. You can visualize each model by:
$ cd aist_robotiq/urdf
$ roslauch urdf_tutorial display.launch model:=robotiq_<device>_gripper.urdf
where <device>
should be 85
, 140
or hande
.
The controller establishes an ROS action server of control_msgs::GripperCommand type. This action type is same as the one adopted by gripper_action_controller which is a part of ros_controllers, a controller stack conforming to ros_control interface.
The driver subscribes a command topic published by the controller and transfer it to the gripper. It also receives status from the gripper and publish it as a topic toward the controller. The following three drivers are available.
- TCP driver -- To be used when the gripper is connected to the Robotiq Universal Controller which acts as a converter between TCP/IP and Modbus. Not tested.
- RTU driver -- To be used when the gripper is connected to a USB port of the host PC via a converter between RS485 and USB.
- URCap driver -- To be used when the gripper is connected to the control box of Universal Robot CB-series or e-Series with URCap software installed. The driver sends commands and receives status to/from the gripper via unix socket connected to the URCap server which is exposed to the port
63352
of the box.
Two gazebo plugins conforming to gazebo_ros_control are provided for simulating gripper physics:
- gazebo_mimic_joint_plugin
- gazebo_disable_link_plugin
At first, you should activate the gripper hardware. If the gripper is connected to the controller box of Universal Robot, you can do it through the URCap panel of the Teaching Pendant.
Then you can start both the driver and the controller by typing:
$ roslaunch aist_robotiq run.launch ip_or_dev:=<ip_or_dev> [driver:=<driver>] [device:=<device>] [prefix:=<prefix>]
where
- ip_or_dev -- If
driver
=urcap
, specify IP address of the controller box of Universal Robot. Ifdriver
=tcp
, specify IP address of Robotiq Universal Controller. Ifdriver
=rtu
, specify tty device name(ex./dev/ttyUSB0
) of the host PC to which the gripper cable is conneted via a converter between RS485 and USB. - driver -- Specify driver type. Currently
tcp
,rtu
andurcap
are supported. (default:urcap
) - device -- Specify gripper device. Currently
robotiq_85
,robotiq_140
androbotiq_hande
are supported. (default:robotiq_85
) - prefix -- Specify a prefix string for identifying a specific device from multiple grippers. (default:
a_bot_gripper_
)
The gripper will be automatically calibrated by fully opening and then fully closing its fingers. Encoder readings at the both ends are recorded by the controller and will be used in the subsequent grasping tasks.
Now, you can make a connection to the action server of the controller from any action clients of control_msgs::GripperCommand type. The simplest way for testing is invoking actionlib's axclient
by:
$ roslaunch aist_robotiq test.launch [prefix:=<prefix>]
where
- prefix -- Specify gripper prefix which must be same as the one given to
run.launch
. (default:a_bot_gripper_
)
At this point, the launched nodes are connected like this:
You fill find that the gripper moves according to the goal position you give through the GUI of axclient
.
You can simulate gripper motions by using Gazebo through the following command
$ roslaunch aist_robotiq gazebo.launch [device:=<device>] [prefix:=<prefix>]
where
- device -- Specify gripper device. Currently
robotiq_85
,robotiq_140
androbotiq_hande
are supported. (default:robotiq_85
) - prefix -- Specify a prefix string for identifying a specific device from multiple grippers. (default:
a_bot_gripper_
)
This command starts
- gazebo for simulating gripper physics,
- joint_state_controller for publishing
/joint_states
of the virtual gripper simulated bygazebo
, - robot_state_publisher for converting
/joint_states
to cartesian poses and sending to tf, and - gripper_action_controller for handling goals requested by the clients.
Now, as in the case of real grippers, you can use axclient
to send goal commands to the controller:
$ roslaunch aist_robotiq test.launch [prefix:=<prefix>]
where
- prefix -- Specify gripper prefix which must be same as the one given to
gazebo.launch
. (default:a_bot_gripper_
)
At this point, the launched nodes are connected like this:
You fill find that the gripper moves according to the goal position you give through the GUI of axclient
.