BerkeleyAutomation / gqcnn

Python module for GQ-CNN training and deployment with ROS integration.
https://berkeleyautomation.github.io/gqcnn
Other
306 stars 148 forks source link

Trouble with suction position ++ #19

Closed osterdalh closed 6 years ago

osterdalh commented 6 years ago

Hi. I have installed the suction gqcnn using the pretrained model, but i encounter several issues when running the suction_policy.py example on my own setup. The script is not runned in ROS, only as a python script.

Setup is as follows; Ubuntu 16.04 Zivid 3D camera, with the objects placed 50-60 cm from the camera. The depth_0.npy file is in float32 format, and the values are in meters. The image is resized to fit the 640x480 requirement, and NAN values are set to the maximum distance.

The main issue seems to be that the network prefers the pick suction locations that does not make sense, such as edges (see image). The network will also favor areas that are only marginally closer to the camera (in the optimal range), even if the area is not suited for suction. The calculated probability of grasp success is also not a logical result. This is illustrated in the logdir files.

policy_output_iydhxpqkuc.zip

cem_iter_0 cem_iter_1 figure_4 final_grasps

This is our suction_policy.yaml file:

`

sensor params

sensor: image_dir: /home/minion/BinPick_ws/src/gqcnn_pkg/src/gqcnn-dev_jeff/data/rgbd/multiple_objects type: virtual_primesense frame: primesense_overhead calib_dir: /home/minion/BinPick_ws/src/gqcnn_pkg/src/gqcnn-dev_jeff/data/calib

policy params

policy:

optimization params

num_seed_samples: 700 num_gmm_samples: 300 num_iters: 2 gmm_refit_p: 0.25 gmm_component_frac: 0.4 gmm_reg_covar: 0.01

general params

deterministic: 1 gripper_width: 0.06 crop_height: 100 crop_width: 100 logging_dir: /home/minion/BinPick_ws/src/gqcnn_pkg/src/gqcnn-dev_jeff/log

sampling params

sampling:

type

type: suction

# params
max_suction_dir_optical_axis_angle: 20
delta_theta: 1
delta_phi: 1
sigma_depth: 0.00025
min_suction_dist: 1.0
angle_dist_weight: 5.0
depth_gaussian_sigma: 2.0
num_grasp_samples: 1000

max_dist_from_center: 1
max_num_samples: 10000

metric params

metric: type: gaussian_curvature

window_size: 5
sample_rate: 1.0

gqcnn_model: /home/minion/BinPick_ws/src/gqcnn_pkg/src/model_zoo/GQ-Suction
crop_height: 96
crop_width: 96

visualization

vis: grasp_sampling : 0 tf_images: 0 plane: 0 grasp_candidates: 1 elite_grasps: 0 grasp_ranking: 0 grasp_plan: 0 final_grasp: 1 vmin: 0.2 vmax: 0.8 k: 25

image proc params

inpaint_rescale_factor: 0.75

detection params

detection: type: point_cloud_box

foreground_mask_tolerance: 60 min_pt:

`

Logdir files are attached. Please let me know if additional files/logs would be helpful for trouble shooting! Hope someone can help me out.

osterdalh commented 6 years ago

Found out what was causing the issue. Under

metric:
type: gaussian_curvature

in suction_policy.yaml it should be

metric: 
type: gqcnn
jeffmahler commented 6 years ago

Great! Thanks for the detailed info. We are working on better documentation for running the suction example but the new version has been delayed slightly.

Also I'm very supportive pushing the limits on use cases of GQ-CNN but please keep in mind our system requirements, which state that the camera is expected to be overhead.