A ROS wrapper around the GPD package for detecting 6-DOF grasp poses for a 2-finger robot hand (e.g., a parallel jaw gripper) in 3D point clouds.
The following instructions have been tested on Ubuntu 16.04. Similar instructions should work for other Linux distributions.
-
Install GPD. You can follow these instructions. Make sure to run
make installto install GPD as a library. 1.1 Requirements1.2 Installation
The following instructions have been tested on Ubuntu 16.04. Similar instructions should work for other Linux distributions.
1.2.1. Install PCL and Eigen. If you have ROS Indigo or Kinetic installed, you should be good to go.
1.2.2. Install OpenCV 3.4 (tutorial).
1.2.3. Clone the repository into some folder:
git clone https://github.com/atenpas/gpd1.2.4. Build the package:
cd gpd mkdir build && cd build cmake .. make -j sudo make installYou can optionally install GPD with
sudo make installso that it can be used by other projects as a shared library.If building the package does not work, try to modify the compiler flags,
CMAKE_CXX_FLAGS, in the file CMakeLists.txt.1.3 You'll need to change path in line 32
-
Clone this repository into the
srcfolder of your catkin workspace:cd <location_of_your_workspace>/src git clone https://github.com/atenpas/gpd_ros -
Build your catkin workspace:
cd <location_of_your_workspace> catkin build
First, you need to modify the config file in your gpd folder, e.g.,
<path_to_gpd>/cfg/ros_eigen_params.cfg. Search for parameters that have
absolute file paths and change them to actual paths on your system.
Next, you need to modify the path in the ROS launch file that points to the config file that you changed in the previous step, e.g., this line.
Now, you can run GPD as a ROS node. The following command will launch a ROS node
that waits for point clouds on the ROS topic /cloud_stitched. Once a point
cloud is received, the node will search the cloud for grasps.
roslaunch gpd_ros ur5.launch
Call service to get grasps poses
rosservice call /detect_grasps/detect_grasps_poses "{}"
If you want to speed up GPD or look for grasps on a specific object, you should use one of these messages: CloudSamples, CloudIndexed. Both of these messages build up on the CloudSources message that can be used to represent a point cloud whose points were seen by multiple cameras or from multiple viewpoints.
As a typical use case for the CloudSamples message, consider a table with a single object on top of it, observed by one camera. The complete point cloud should be put in the message so that GPD can check grasp poses against collisions with the table. Samples in the message should correspond to points on the object so that GPD can search for grasps on the object (and avoids searching for grasps on the table).
If catkin_make cannot find libinference_engine.so, required by OpenVino, make
sure that LD_LIBRARY_PATH contains the path to that library:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_dldt/inference-engine/bin/intel64/Release/lib/