Code Monkey home page Code Monkey logo

gpd_ros's Introduction

ROS Wrapper for GPD

Overview

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.

1) Installation

The following instructions have been tested on Ubuntu 16.04. Similar instructions should work for other Linux distributions.

  1. Install GPD. You can follow these instructions. Make sure to run make install to install GPD as a library.

  2. Clone this repository into the src folder of your catkin workspace:

    cd <location_of_your_workspace>/src
    git clone https://github.com/atenpas/gpd_ros
    
  3. Build your catkin workspace:

    cd <location_of_your_workspace>
    catkin_make
    

2) Generate Grasps for a Point Cloud on a ROS Topic

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

3) Using Advanced Messages

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).

4) Troubleshooting

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/

gpd_ros's People

Contributors

atenpas avatar fi6 avatar mbreyer avatar ondrejbiza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gpd_ros's Issues

Fatal Error: gpd_ros/GraspConfig.h: No such file or directory

Hello,

  1. System: Ubuntu 18.04
  2. Successfully Installed and tested gpd library.

Getting following error:

fatal error: gpd_ros/GraspConfig.h: No such file or directory
#include <gpd_ros/GraspConfig.h>

Is the file missing in the actual repository?

I tried running catkin_make multiple times as you have mentioned in #3

Issue with catkin build

Hello, when I try to run catkin build in my workspace I get the following error. (I'm using Ubuntu 16.04)
.................................................................................................
Screenshot from 2021-04-30 15-45-43

At global scope: cc1plus: warning: unrecognized command line option ‘-Wno-ignored-attributes’ make[2]: *** [CMakeFiles/gpd_ros_detect_grasps_server.dir/src/gpd_ros/grasp_detection_server.cpp.o] Error 1 make[1]: *** [CMakeFiles/gpd_ros_detect_grasps_server.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... At global scope: cc1plus: warning: unrecognized command line option ‘-Wno-ignored-attributes’ make[2]: *** [CMakeFiles/gpd_ros_detect_grasps.dir/src/gpd_ros/grasp_detection_node.cpp.o] Error 1 make[1]: *** [CMakeFiles/gpd_ros_detect_grasps.dir/all] Error 2 make: *** [all] Error 2 cd /home/nicholas/catkin_ws/build/gpd_ros; catkin build --get-env gpd_ros | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd

I was curious if anyone new how to fix this issue.

Get_grasps.py with gpd_ros

Hello, on Ubuntu 18.04 ROS melodic I've successfully build "gpd_ros" and finish the GPD perception part. Then I'd like to get the cluttered grasps to execute motion planning for my robot with python. So followed by the tutorial in the "forward_version" gpd, I run the following get_grasps.py script:

import rospy
from gpd_ros.msg import GraspConfigList
grasps = []

def callback(msg):
    global grasps
    grasps = msg.grasps

# Create a ROS node.
rospy.init_node('get_grasps')

# Subscribe to the ROS topic that contains the grasps.
sub = rospy.Subscriber('/detect_grasps/plot_grasps', GraspConfigList, callback)

# Wait for grasps to arrive.
rate = rospy.Rate(1)

while not rospy.is_shutdown():    
    print '.'
    if len(grasps) > 0:
        rospy.loginfo('Received %d grasps.', len(grasps))
        break
    rate.sleep()

However, I could not get any cluttered grasps. So could u pls help me 😢 and update new tutorials based on "gpd_ros" ? Thank u very much~

error: double free or corruption (out)

I'm use ubuntu 20.04
I built gpd with no error and run test successfuly
But when I use gpd_ros in my program, it publish Grasps once, and then it gives memory error.

in Rviz Viewer
image

and my terminal state

======== RUNTIMES ========
 1. Candidate generation: 0.0050s
 2. Descriptor extraction: 0.0096s
 3. Classification: 0.0500s
==========
 TOTAL: 0.0648s
[ INFO] [1643430121.548557640]: Published 6 highest-scoring grasps.
[ INFO] [1643430121.548737998]: Waiting for point cloud to arrive ...
double free or corruption (out)
[detect_grasps-1] process has died [pid 49987, exit code -6, cmd /home/min/catkin_ws/devel/lib/gpd_ros/detect_grasps __name:=detect_grasps __log:=/home/min/.ros/log/88596dbe-80b5-11ec-8827-37b752ea5aa8/detect_grasps-1.log].
log file: /home/min/.ros/log/88596dbe-80b5-11ec-8827-37b752ea5aa8/detect_grasps-1*.log

Segfault for `rosrun gpd_ros detect_grasps_server`

Initiating the command rosrun gpd_ros detect_grasps_server results in a SIGSEGV with backtrace:

(gdb) bt
#0  0x000000000040e30c in GraspDetectionServer::GraspDetectionServer (this=0xffeffee70, node=...)
    at ~/catkin_ws/src/gpd2_ros/src/gpd_ros/grasp_detection_server.cpp:14
#1  0x000000000040d71e in main (argc=1, argv=<optimized out>)
    at ~/catkin_ws/src/gpd2_ros/src/gpd_ros/grasp_detection_server.cpp:132

and valgrind is saying:

==20809== Invalid read of size 8
==20809==    at 0x40E30C: GraspDetectionServer::GraspDetectionServer(ros::NodeHandle&) (grasp_detection_server.cpp:14)
==20809==    by 0x40D71D: main (grasp_detection_server.cpp:132)
==20809==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

It didn't make much sense (the error was alternating between the std::string constructor and the ros::NodeHandle object) and the culprit is unrelated to the error messages:

https://github.com/atenpas/gpd2_ros/blob/63cec397d5c2ee064f32d21afe373290da5b63fa/src/gpd_ros/grasp_detection_server.cpp#L11

Commenting this line, and it's declaration in https://github.com/atenpas/gpd2_ros/blob/master/include/gpd_ros/grasp_detection_server.h#L103 results in no more segfaults. The variable is uninitialized (and never used anyways) so either a simple

diff --git a/src/gpd_ros/grasp_detection_server.cpp b/src/gpd_ros/grasp_detection_server.cpp
index 171b6d9..94d7e2f 100644
--- a/src/gpd_ros/grasp_detection_server.cpp
+++ b/src/gpd_ros/grasp_detection_server.cpp
@@ -6,7 +6,7 @@ GraspDetectionServer::GraspDetectionServer(ros::NodeHandle& node)
   cloud_camera_ = NULL;
 
   // set camera viewpoint to default origin
-  std::vector<double> camera_position;
+  auto camera_position = std::vector<double> {0.0, 0.0, 0.0};
   node.getParam("camera_position", camera_position);
   view_point_ << camera_position[0], camera_position[1], camera_position[2];

or deleting the variable, work.

fatal error: gpd/candidate/hand.h: No such file or directory

Hi,

When I'm performing "catkin_make", I receive "
/src/gpd_ros/include/gpd_ros/grasp_plotter.h:43:10: fatal error: gpd/candidate/hand.h: No such file or directory
43 | #include <gpd/candidate/hand.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [gpd_ros/CMakeFiles/gpd_ros_grasp_plotter.dir/build.make:76: gpd_ros/CMakeFiles/gpd_ros_grasp_plotter.dir/src/gpd_ros/grasp_plotter.cpp.o] Error 1
" error message. Is there anything I'm missing?

ERROR: Cannot open file: two_views_15_channels_curv_axis.binconv1_weights.bin!

when I ues the OpenVINO, the lauch file like behind:

<launch>
  <node name="detect_grasps" pkg="gpd_ros" type="detect_grasps" output="screen">

    <!-- If sequential importance sampling is used (default: false) -->
<!--
    <param name="use_importance_sampling" value="false" />
-->

    <!-- What type of point cloud is used and what ROS topic it comes from -->
    <param name="cloud_type" value="0" /> <!-- 0: PointCloud2, 1: CloudIndexed, 2: CloudSamples -->
    <param name="cloud_topic" value="/kinect2/hd/points" />

    <!-- (optional) The ROS topic that the samples come from (default: an empty string) -->
    <!--<param name="samples_topic" value="" />-->

    <!-- Filepath to the configuration file for GPD -->
    <!--<param name="config_file" value="/home/junjie/ubuntu/gpd/cfg/ros_eigen_params.cfg" />   -->
    <param name="config_file" value="/home/junjie/ubuntu/gpd/cfg/ros_vino_params.cfg" /> 

    <param name="rviz_topic" value="plot_grasps" />

  </node>

</launch>

I got the Error like this:

ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv1_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv1_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv2_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv2_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip1_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip1_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip2_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip2_biases.bin!
NET SETUP runtime: 0.000115554

the whole detail is:

(base) junjie@junjie-Aspire-VX5-591G:~/ubuntu/gpd_ros$ roslaunch gpd_ros ur5.launch 
... logging to /home/junjie/.ros/log/a2d8ae74-37af-11ec-84f9-94e979c9e899/roslaunch-junjie-Aspire-VX5-591G-29449.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://junjie-Aspire-VX5-591G:45131/

SUMMARY
========

PARAMETERS
 * /detect_grasps/cloud_topic: /kinect2/hd/points
 * /detect_grasps/cloud_type: 0
 * /detect_grasps/config_file: /home/junjie/ubun...
 * /detect_grasps/rviz_topic: plot_grasps
 * /rosdistro: melodic
 * /rosversion: 1.14.12

NODES
  /
    detect_grasps (gpd_ros/detect_grasps)

ROS_MASTER_URI=http://localhost:11311

process[detect_grasps-1]: started with pid [29466]
Init ....
============ HAND GEOMETRY ======================
finger_width: 0.01
hand_outer_diameter: 0.12
hand_depth: 0.06
hand_height: 0.02
init_bite: 0.01
=================================================
============ PLOTTING ========================
plot_normals: false
plot_samples false
plot_candidates: false
plot_filtered_candidates: false
plot_valid_grasps: false
plot_clustered_grasps: false
plot_selected_grasps: false
==============================================
============ CLOUD PREPROCESSING =============
voxelize: true
voxel_size: 0.003
remove_outliers: false
workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
sample_above_plane: false
normals_radius: 0.030
refine_normals_k: 0
==============================================
============ CANDIDATE GENERATION ============
num_samples: 500
num_threads: 6
nn_radius: 0.01
hand axes: 2 
num_orientations: 8
num_finger_placements: 10
deepen_hand: true
friction_coeff: 20.00
min_viable: 6
==============================================
============ GRASP IMAGE GEOMETRY ===============
volume width: 0.1
volume depth: 0.06
volume height: 0.02
image_size: 60
image_num_channels: 15
=================================================
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv1_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv1_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv2_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binconv2_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip1_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip1_biases.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip2_weights.bin!
ERROR: Cannot open file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.binip2_biases.bin!
NET SETUP runtime: 0.000115554
============ CLASSIFIER ======================
model_file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.xml
weights_file: /home/junjie/ubuntu/gpd/models/openvino/two_views_15_channels_curv_axis.bin
batch_size: 1
==============================================
============ CANDIDATE FILTERING =============
candidate_workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
min_aperture: 0.0000
max_aperture: 0.8500
==============================================
============ CLUSTERING ======================
min_inliers: 1
==============================================

Created GPD ....
[ INFO] [1635405423.457303890]: Waiting for point cloud to arrive ...
[ INFO] [1635405424.693733291]: Received cloud with 2073600 points.
Processing cloud with 2073600 points.
Cloud after removing NANs: 966086
[detect_grasps-1] process has died [pid 29466, exit code -11, cmd /home/junjie/ubuntu/gpd_ros/devel/lib/gpd_ros/detect_grasps __name:=detect_grasps __log:=/home/junjie/.ros/log/a2d8ae74-37af-11ec-84f9-94e979c9e899/detect_grasps-1.log].
log file: /home/junjie/.ros/log/a2d8ae74-37af-11ec-84f9-94e979c9e899/detect_grasps-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Even I use the ros_eigen_params.cfg,it always get the erro that process has died [pid 29466, exit code -11],I was troubled by this problem, by the way,I have checked that all the .cfg file and weigths file are right .
Who can help me in this question ,thank you.
PCL Version 1.9
Ubuntu 18.04
Ros melodic

OpenCV Dependencies

Hi,
while compiling gpd2_ros, I get errors that a OpenCV files is missing. CMakeLists.txt should be updated accordingly to link the OpenCV libs.

fatal error: opencv2/imgproc.hpp: No such file or directory

Cheers

How to return the grasping pose calculated by the GPD algorithm to moveit for execution?

Hello, may I ask, I see the message output in the gpd_ros package, the position and attitude, which are in the camera coordinate system; and the transformation to the camera coordinate system is the correct pose information at the end of the robot.
If I grab multiple objects in sequence, and set the final output posture to be 10, I want moveit to execute in sequence, and what format should it be passed to the move_group interface? If you have the relevant code can I refer to it? Thank you so much!
image

Setting Paths correctly

Hello,

I changed the following paths according to the instructions, but im still getting file not found errors.
It looks like some paths are appended the wrong way.

Changes in the GPD2 library:

user@Workstation:~/gpd2-src/gpd2$ git diff
diff --git a/cfg/ros_eigen_params.cfg b/cfg/ros_eigen_params.cfg
index 5b07554..a86a2af 100644
--- a/cfg/ros_eigen_params.cfg
+++ b/cfg/ros_eigen_params.cfg
@@ -29,7 +29,7 @@ image_size = 60
 image_num_channels = 15
 
 # (OpenVINO) Path to directory that contains neural network parameters
-weights_file = /home/andreas/projects/gpd/lenet/15channels/params/
+weights_file = /home/user/gpd2-src/gpd2/models/lenet/15channels/params/
 
 # Preprocessing of point cloud
 #   voxelize: if the cloud gets voxelized/downsampled
diff --git a/cfg/ros_vino_params.cfg b/cfg/ros_vino_params.cfg
index bd7e8a1..ed587d8 100644
--- a/cfg/ros_vino_params.cfg
+++ b/cfg/ros_vino_params.cfg
@@ -29,8 +29,8 @@ image_size = 60
 image_num_channels = 12
 
 # (OpenVINO) Path to directory that contains neural network parameters
-model_file = /home/ur5/projects/gpd/models/openvino/two_views_12_channels_curv_axis.xml
-weights_file = /home/ur5/projects/gpd/models/openvino/two_views_12_channels_curv_axis.bin
+model_file = /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.xml
+weights_file = /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.bin
 device = 0
 
 # Preprocessing of point cloud

Changes in the ROS Wrapper:

user@Workstation:~/catkin_ws/src/gpd2_ros$ git diff
diff --git a/launch/ur5.launch b/launch/ur5.launch
index 285c6cb..1a1bf62 100644
--- a/launch/ur5.launch
+++ b/launch/ur5.launch
@@ -15,8 +15,8 @@
     <param name="samples_topic" value="" />
 
     <!-- Filepath to the configuration file for GPD -->
-    <!-- <param name="config_file" value="/home/ur5/projects/gpd/cfg/ros_eigen_params.cfg" /> -->
-               <param name="config_file" value="/home/ur5/projects/gpd/cfg/ros_vino_params.cfg" />
+    <!-- <param name="config_file" value="/home/user/gpd2-src/gpd2/cfg/ros_eigen_params.cfg" /> -->
+               <param name="config_file" value="/home/user/gpd2-src/gpd2/cfg/ros_vino_params.cfg" />
 
        </node>

Output of ur5.launch, including erros:

user@Workstation:~/catkin_ws/src/gpd2_ros$ roslaunch gpd_ros ur5.launch 

SUMMARY
========

PARAMETERS
 * /detect_grasps/cloud_topic: /cloud_stitched
 * /detect_grasps/cloud_type: 2
 * /detect_grasps/config_file: /home/user/gp...
 * /detect_grasps/samples_topic: 
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    detect_grasps (gpd_ros/detect_grasps)

auto-starting new master
process[master]: started with pid [29759]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to ...
process[rosout-1]: started with pid [29772]
started core service [/rosout]
process[detect_grasps-2]: started with pid [29775]
Init ....
============ HAND GEOMETRY ======================
finger_width: 0.01
hand_outer_diameter: 0.1
hand_depth: 0.06
hand_height: 0.02
init_bite: 0.01
=================================================
============ PLOTTING ========================
plot_normals: 0
plot_samples: 0
plot_candidates: 0
plot_filtered_candidates: 0
plot_volumes_: 0
plot_valid_grasps: 0
plot_clustered_grasps: 0
plot_selected_grasps: 0
==============================================
============ CLOUD PREPROCESSING =============
voxelize: 1
remove_outliers: 0
workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
============ CANDIDATE GENERATION ============
num_samples: 500
num_threads: 6
nn_radius: 0.01
hand axes: 2 
num_orientations: 8
num_finger_placements: 10
deepen_hand: 1
==============================================
============ GRASP IMAGE GEOMETRY ===============
volume width: 0.1
volume depth: 0.06
volume height: 0.02
image_size: 60
image_num_channels: 12
=================================================
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binconv1_weights.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binconv1_biases.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binconv2_weights.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binconv2_biases.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binip1_weights.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binip1_biases.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binip2_weights.bin!
ERROR: Cannot open file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.binip2_biases.bin!
NET SETUP runtime: 0.000965038
============ CLASSIFIER ======================
model_file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.xml
weights_file: /home/user/gpd2-src/gpd2/models/openvino/two_views_12_channels_curv_axis.bin
batch_size: 1
==============================================
============ CANDIDATE FILTERING =============
candidate_workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
min_aperture: 0
max_aperture: 0.85
==============================================
============ CLUSTERING ======================
min_inliers: 1
==============================================

Created GPD ....
[ INFO] [1554212801.206714333]: Waiting for point cloud to arrive ...

Random grasp candidates

Hello. I kept getting grasp candidates in the wrong/inverted direction from gpd_ros, given a partial point cloud of a cylindrical object, like so.

image
This is the view from the top of the point cloud. The grasp scores were:

Selecting the 5 highest scoring grasps ...
 grasp #0, score: -224.7175
 grasp #1, score: -224.7175
 grasp #2, score: -224.7175
 grasp #3, score: -433.5794
 grasp #4, score: -433.5794

This error is however not present in gpd (master branch). I get this:

image
with grasp scores:

Selecting the 5 highest scoring grasps ...
 grasp #0, score: 108.9073
 grasp #1, score: 108.9073
 grasp #2, score: 108.9073
 grasp #3, score: 108.9073
 grasp #4, score: 69.8524

Error

There is an error currently in grasp_detection_node.cpp, in the cloud_callback() definition:

Eigen::Matrix3Xd view_points(3,1);
view_points.col(0) = view_point_; 

where the view_point_ variable is undefined. The definition has been commented out, probably as we phased out getting camera_position from rosparam, and now defining it in the config files.

My temporary fix is define it explicitly:

Eigen::Matrix3Xd view_points(3,1);
view_points << 0.0, 0.0, 0.0;

grasp_detection_server with sensor_msgs::PointCloud2

Hello,

I am currently trying to integrate your wrapper with a realsense camera which produces pointcloud2 data.

My program is supposed to automatically and continuously produce grasp data which is why the normal u5.launch does not suffice (since the display window has to be manually closed to create new data and publish it.)

Is there an easy way to do this with grasp_detection_server or should I rewrite the code of the normal node.

Thank you very much in advance.

roslaunch gpd_ros ur5.launch returns error. Its unable to find the node of type detect_grasps even though all files set to chmod +x

ERROR: cannot launch node of type [gpd_ros/detect_grasps]: Cannot locate node of type [detect_grasps] in package [gpd_ros]. Make sure file exists in package path and permission is set to executable (chmod +x)

Before catkin_make I went to gpd_ros and chmod -R +x *
Still it gives me this error.
I have made path changes to ros_vino_params.cfg in home/gpd/cfg folder as suggested.

Cannot build gpd_ros

Hi, I followed your README but have a trouble when building.
My environment is Ubuntu 18.04, melodic.

I installed GPD and confirmed that it works.
After cloning this repository and moving to my work space, I tried catkiin build gpd_ros.
But error occurred saying " CMake Error at /home/shumpeiwakabayashi/ow_ws/src/gpd2_ros/CMakeLists.txt:20 (message):
Library GPD not found "

--------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /home/shumpeiwakabayashi/catkin_ws/devel:/opt/ros/melodic
Workspace:                   /home/shumpeiwakabayashi/ow_ws
--------------------------------------------------------------------------------
Build Space:        [exists] /home/shumpeiwakabayashi/ow_ws/build
Devel Space:        [exists] /home/shumpeiwakabayashi/ow_ws/devel
Install Space:      [unused] /home/shumpeiwakabayashi/ow_ws/install
Log Space:          [exists] /home/shumpeiwakabayashi/ow_ws/logs
Source Space:       [exists] /home/shumpeiwakabayashi/ow_ws/src
DESTDIR:            [unused] None
--------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
--------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
--------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
--------------------------------------------------------------------------------
Workspace configuration appears valid.
--------------------------------------------------------------------------------
[build] Found '86' packages in 0.0 seconds.                                    
[build] Package table is up to date.                                           
Starting  >>> gpd_ros                                                          
_______________________________________________________________________________
Errors     << gpd_ros:cmake /home/shumpeiwakabayashi/ow_ws/logs/gpd_ros/build.cmake.001.log
** WARNING ** io features related to ensenso will be disabled
** WARNING ** io features related to davidSDK will be disabled
** WARNING ** io features related to dssdk will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
** WARNING ** visualization features related to ensenso will be disabled
** WARNING ** visualization features related to davidSDK will be disabled
** WARNING ** visualization features related to dssdk will be disabled
** WARNING ** visualization features related to rssdk will be disabled
CMake Error at /home/shumpeiwakabayashi/ow_ws/src/gpd2_ros/CMakeLists.txt:20 (message):
  Library GPD not found


cd /home/shumpeiwakabayashi/ow_ws/build/gpd_ros; catkin build --get-env gpd_ros | catkin env -si  /usr/bin/cmake /home/shumpeiwakabayashi/ow_ws/src/gpd2_ros --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/shumpeiwakabayashi/ow_ws/devel/.private/gpd_ros -DCMAKE_INSTALL_PREFIX=/home/shumpeiwakabayashi/ow_ws/install; cd -
...............................................................................
Failed     << gpd_ros:cmake          [ Exited with code 1 ]                    
Failed    <<< gpd_ros                [ 2.2 seconds ]                           
[build] Summary: 0 of 1 packages succeeded.                                    
[build]   Ignored:   85 packages were skipped or are blacklisted.              
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 2.7 seconds total.      

Seeing CMakeList.txt:16,

find_library(GPD_LIB NAMES gpd PATHS /usr/local/lib PATH_SUFFIXES lib NO_DEFAULT_PATH)

Should I specify the path and if so how?

Thank you in advance!

[detect_grasps-1] process has died [pid 26762, exit code -11,

Hello,
I am trying to use this lib with my simulated point cloud under gazebo,but I am getting error in title. I see the log but there is no any meaningful output for further debug. Here is what happens when Launch the node;


atas@atas-G7-7590:~/catkin_ws$ roslaunch gpd_ros ur5.launch 
... logging to /home/atas/.ros/log/9273b2be-62b2-11ea-ad7d-e4b97aeb78f3/roslaunch-atas-G7-7590-26747.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/atas/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

started roslaunch server http://atas-G7-7590:36443/

SUMMARY
========

PARAMETERS
 * /detect_grasps/cloud_topic: /camera/depth/points
 * /detect_grasps/cloud_type: 0
 * /detect_grasps/config_file: /home/atas/gpd/cf...
 * /detect_grasps/rviz_topic: plot_grasps
 * /detect_grasps/samples_topic: 
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES
  /
    detect_grasps (gpd_ros/detect_grasps)

ROS_MASTER_URI=http://localhost:11311

process[detect_grasps-1]: started with pid [26762]
Init ....
============ HAND GEOMETRY ======================
finger_width: 0.01
hand_outer_diameter: 0.12
hand_depth: 0.06
hand_height: 0.02
init_bite: 0.01
=================================================
============ PLOTTING ========================
plot_normals: false
plot_samples false
plot_candidates: false
plot_filtered_candidates: false
plot_valid_grasps: false
plot_clustered_grasps: false
plot_selected_grasps: true
==============================================
============ CLOUD PREPROCESSING =============
voxelize: true
voxel_size: 0.003
remove_outliers: false
workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
sample_above_plane: false
normals_radius: 0.030
refine_normals_k: 0
==============================================
============ CANDIDATE GENERATION ============
num_samples: 500
num_threads: 4
nn_radius: 0.01
hand axes: 2 
num_orientations: 8
num_finger_placements: 10
deepen_hand: true
friction_coeff: 20.00
min_viable: 6
==============================================
============ GRASP IMAGE GEOMETRY ===============
volume width: 0.1
volume depth: 0.06
volume height: 0.02
image_size: 60
image_num_channels: 15
=================================================
NET SETUP runtime: 0.12472
============ CLASSIFIER ======================
model_file: 
weights_file: /home/atas/gpd/models/lenet/15channels/params/
batch_size: 1
==============================================
============ CANDIDATE FILTERING =============
candidate_workspace: -1.00 1.00 -1.00 1.00 -1.00 1.00 
min_aperture: 0.0000
max_aperture: 0.8500
==============================================
============ CLUSTERING ======================
min_inliers: 1
==============================================

Created GPD ....
[ INFO] [1583834549.041823993]: Waiting for point cloud to arrive ...
[ INFO] [1583834549.278995343, 4695.919000000]: Received cloud with 307200 points.
Processing cloud with 307200 points.
Voxelized cloud: 113000
Calculating surface normals ...
num_threads: 4
 runtime(computeNormals): 2.4907
camera: 0, #indices: 113000, #normals: 113000 
Calculated 113000 surface normals in 2.5002s (mode: OpenMP).
Reversing direction of normals that do not point to at least one camera ...
 reversed 0 normals
 runtime (reverse normals): 0.00284553
Estimating local reference frames ...
Estimated 500 frames in 0.0042s.
Finding hand poses ...
[detect_grasps-1] process has died [pid 26762, exit code -11, cmd /home/atas/catkin_ws/devel/lib/gpd_ros/detect_grasps __name:=detect_grasps __log:=/home/atas/.ros/log/9273b2be-62b2-11ea-ad7d-e4b97aeb78f3/detect_grasps-1.log].
log file: /home/atas/.ros/log/9273b2be-62b2-11ea-ad7d-e4b97aeb78f3/detect_grasps-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
  

is there any suggestions ?
Thank you for your time

ros wrapper issue "[detect_grasps-1] process has died ..."

Hi, I was able to run gpd without ros using eigen_params.cfg and krylon point cloud.
Then I tried the gpd_ros. The installation went ok except some warnings regarding the libpcl version. I guess it is related to having version 1.7 in ros and 1.9 for gpd itself.
I used ros_eigen_params.cfg file for ros with the realsense camera publishing pointcloud, but I see the following error:

Created GPD ....
[ INFO] [1574350027.709595006]: Waiting for point cloud to arrive ...
[ INFO] [1574350027.904605404]: Received cloud with 208106 points.
Processing cloud with 208106 points.
Voxelized cloud: 61211
Calculating surface normals ...
num_threads: 2

[detect_grasps-1] process has died [pid 26283, exit code -11, cmd /home/milad/Hans/Git/pose-estimation/gpd/catkin_ws/devel/lib/gpd_ros/detect_grasps __name:=detect_grasps __log:=/home/milad/.ros/log/908bec9c-0c5d-11ea-8f28-24ee9a933a2d/detect_grasps-1.log].
log file: /home/milad/.ros/log/908bec9c-0c5d-11ea-8f28-24ee9a933a2d/detect_grasps-1
.log
*
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

  • I am not using pcl gpu

stitching point clouds

If you don't mind sharing, how did you stitch the point clouds from two depth cameras? I currently don't have two cameras so I'm trying to simulate using Gazebo.

Thanks!
Calvin

PCL error when running ROS node

Hello,

I'm getting the following error while I try to run the ur5.launch using ROS:

detect_grasps: error while loading shared libraries: libpcl_features.so.1.9: cannot open shared object file: No such file or directory

I have successfully compiled and installed PCL 1.9.0 though.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.