Skip to content

Commit

Permalink
change to CPP14 library
Browse files Browse the repository at this point in the history
  • Loading branch information
atenpas committed Nov 2, 2019
1 parent 7222a24 commit 83035e5
Show file tree
Hide file tree
Showing 213 changed files with 15,547 additions and 6,260 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.0] - 2019-01-24
### Added
- Support different deep learning frameworks: OpenVINO, CAFFE, custom.
- Support C++11.

### Changed
- Use smart pointers instead of raw pointers.
- Reorganize code structure.

### Removed
- Remove CAFFE dependency.
- Remove ROS dependency.
475 changes: 241 additions & 234 deletions CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2017, Andreas ten Pas
Copyright (c) 2018, Andreas ten Pas
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
308 changes: 200 additions & 108 deletions README.md

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions cfg/all_axes_vino_12channels.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Path to config file for robot hand geometry
hand_geometry_filename = ../cfg/hand_geometry.cfg

# Path to config file for volume and image geometry
image_geometry_filename = ../cfg/image_geometry_12channels.cfg

# (OpenVINO) Path to directory that contains neural network parameters
model_file = ../models/openvino/two_views_12_channels_all_axes.xml
weights_file = ../models/openvino/two_views_12_channels_all_axes.bin
device = 0

# Preprocessing of point cloud
# voxelize: if the cloud gets voxelized/downsampled
# remove_outliers: if statistical outliers are removed from the cloud (used to remove noise)
# workspace: the workspace of the robot (dimensions of a cube centered at origin of point cloud)
# camera_position: the position of the camera from which the cloud was taken
# remove_plane_for_sampling: only draws samples which do not belong to the table plane
voxelize = 1
remove_outliers = 0
workspace = -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_position = 0 0 0
remove_plane_for_sampling = 0

# Grasp candidate generation
# num_samples: the number of samples to be drawn from the point cloud
# num_threads: the number of CPU threads to be used
# nn_radius: the radius for the neighborhood search
# num_orientations: the number of robot hand orientations to evaluate
# rotation_axes: the axes about which the point neighborhood gets rotated
num_samples = 500
num_threads = 4
nn_radius = 0.01
num_orientations = 8
num_finger_placements = 10
hand_axes = 0 1 2
deepen_hand = 1

# Filtering of candidates
# min_aperture: the minimum gripper width
# max_aperture: the maximum gripper width
# workspace_grasps: dimensions of a cube centered at origin of point cloud; should be smaller than <workspace>
min_aperture = 0.0
max_aperture = 0.85
workspace_grasps = -1 1 -1 1 -1 1

# Filtering of grasps which are too low on (i.e. too close to) support surface (e.g., table or floor)
# filter_table_side_grasps: turn this filter on/off
# vertical_axis: the vertical axis in the point cloud frame
# angle_thresh: threshold to determine which grasps are considered to be side grasps
# table_height: the height of the support surface (along vertical axis)
# table_thresh: thresold below which grasps are considered to close too the support surface
filter_table_side_grasps = 0
vertical_axis = 0 0 1
angle_thresh = 0.1
table_height = 0.0
table_thresh = 0.05

# Grasp image creation
# remove_plane_before_image_calculation: remove support plane from point cloud to speed up image computations
# create_image_batches: creates grasp images in batches (less memory usage)
remove_plane_before_image_calculation = 0
create_image_batches = 0

# Clustering of grasps
# min_inliers: minimum number of inliers per cluster; set to 0 to turn off clustering
min_inliers = 1

# Grasp selection
# min_score: threshold to sort out "bad" grasps
# num_selected: number of selected grasps (sorted by score)
min_score = 0.5
num_selected = 100

# Visualization
# plot_normals: plot the surface normals
# plot_samples: plot the samples
# plot_candidates: plot the grasp candidates
# plot_filtered_candidates: plot the grasp candidates which remain after filtering
# plot_valid_grasps: plot the candidates that are identified as valid grasps
# plot_clustered_grasps: plot the grasps that after clustering
# plot_selected_grasps: plot the selected grasps (final output)
plot_normals = 0
plot_samples = 0
plot_candidates = 0
plot_filtered_candidates = 0
plot_valid_grasps = 0
plot_clustered_grasps = 0
plot_selected_grasps = 1
92 changes: 92 additions & 0 deletions cfg/bigbird_train_params.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
data_root = /home/andreas/data/bigbird/
objects_file_location = /home/andreas/data/gpd/bigbird_pcds/objects.txt
output_root = /home/andreas/data/gpd/descriptors/
num_views_per_object = 20
test_views = 2 5 8 13 16

# Path to config file for robot hand geometry
hand_geometry_filename = ../cfg/hand_geometry.cfg

# Path to config file for volume and image geometry
#image_geometry_filename = ../cfg/image_geometry_15channels.cfg
image_geometry_filename = ../cfg/image_geometry_12channels.cfg
# image_geometry_filename = ../cfg/image_geometry_3channels.cfg

# Path to directory that contains neural network parameters
lenet_params_dir = ../lenet/15channels/params/
# lenet_params_dir = /home/andreas/data/gpd/caffe/15channels/params/
# lenet_params_dir = /home/andreas/data/gpd/caffe/3channels/params/

# Preprocessing of point cloud
# voxelize: if the cloud gets voxelized/downsampled
# remove_outliers: if statistical outliers are removed from the cloud (used to remove noise)
# workspace: the workspace of the robot (dimensions of a cube centered at origin of point cloud)
# camera_position: the position of the camera from which the cloud was taken
voxelize = 1
remove_outliers = 0
workspace = -1 1 -1 1 -1 1
camera_position = 0 0 1

# Grasp candidate generation
# num_samples: the number of samples to be drawn from the point cloud
# num_threads: the number of CPU threads to be used
# nn_radius: the radius for the neighborhood search
# num_orientations: the number of robot hand orientations to evaluate
# rotation_axes: the axes about which the point neighborhood gets rotated
num_samples = 500
num_threads = 4
nn_radius = 0.01
num_orientations = 8
hand_axes = 2

# Filtering of candidates
# min_aperture: the minimum gripper width
# max_aperture: the maximum gripper width
# workspace_grasps: dimensions of a cube centered at origin of point cloud; should be smaller than <workspace>
min_aperture = 0.0
max_aperture = 0.85
workspace_grasps = -0.5 1 -0.35 0.35 -0.12 1

# Filtering of grasps which are too low on (i.e. too close to) support surface (e.g., table or floor)
# filter_table_side_grasps: turn this filter on/off
# vertical_axis: the vertical axis in the point cloud frame
# angle_thresh: threshold to determine which grasps are considered to be side grasps
# table_height: the height of the support surface (along vertical axis)
# table_thresh: thresold below which grasps are considered to close too the support surface
filter_table_side_grasps = 0
vertical_axis = 0 0 1
angle_thresh = 0.1
table_height = 0.0
table_thresh = 0.05

# Grasp image creation
# remove_plane_before_image_calculation: remove support plane from point cloud to speed up image computations
# create_image_batches: creates grasp images in batches (less memory usage)
remove_plane_before_image_calculation = 0
create_image_batches = 0

# Clustering of grasps
# min_inliers: minimum number of inliers per cluster; set to 0 to turn off clustering
min_inliers = 1

# Grasp selection
# min_score: threshold to sort out "bad" grasps
# num_selected: number of selected grasps (sorted by score)
min_score = -5000
num_selected = 100

# Visualization
# plot_normals: plot the surface normals
# plot_samples: plot the samples
# plot_candidates: plot the grasp candidates
# plot_filtered_candidates: plot the grasp candidates which remain after filtering
# plot_valid_grasps: plot the candidates that are identified as valid grasps
# plot_clustered_grasps: plot the grasps that after clustering
# plot_selected_grasps: plot the selected grasps (final output)
plot_normals = 0
plot_samples = 0
plot_candidates = 0
plot_filtered_candidates = 0
plot_valid_grasps = 0
plot_clustered_grasps = 0
plot_selected_grasps = 0
79 changes: 79 additions & 0 deletions cfg/caffe_params.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Path to config file for robot hand geometry
hand_geometry_filename = ../cfg/hand_geometry.cfg

# Path to config file for volume and image geometry
image_geometry_filename = ../cfg/image_geometry_15channels.cfg

# Caffe specific parameters.
# model_file: path to file that contains network architecture
# weights_file: path to file that contains neural network parameters
# batch_size: number of images per batch
model_file = ../models/caffe/15channels/lenet_15_channels.prototxt
weights_file = ../models/caffe/15channels/two_views_15_channels_53_deg.caffemodel
batch_size = 64

# Preprocessing of point cloud
# voxelize: if the cloud gets voxelized/downsampled
# remove_outliers: if statistical outliers are removed from the cloud (used to remove noise)
# workspace: the workspace of the robot (dimensions of a cube centered at origin of point cloud)
# camera_position: the position of the camera from which the cloud was taken
# sample_above_plane: only draws samples which do not belong to the table plane
voxelize = 1
remove_outliers = 0
workspace = -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_position = 0 0 0
sample_above_plane = 0

# Grasp candidate generation
# num_samples: the number of samples to be drawn from the point cloud
# num_threads: the number of CPU threads to be used
# nn_radius: the radius for the neighborhood search
# num_orientations: the number of robot hand orientations to evaluate
# rotation_axes: the axes about which the point neighborhood gets rotated
num_samples = 30
num_threads = 4
nn_radius = 0.01
num_orientations = 8
num_finger_placements = 10
hand_axes = 2
deepen_hand = 1

# Filtering of candidates
# min_aperture: the minimum gripper width
# max_aperture: the maximum gripper width
# workspace_grasps: dimensions of a cube centered at origin of point cloud; should be smaller than <workspace>
min_aperture = 0.0
max_aperture = 0.85
workspace_grasps = -1 1 -1 1 -1 1

# Filtering of candidates based on their approach direction
# filter_approach_direction: turn filtering on/off
# direction: the direction to compare against
# angle_thresh: angle in radians above which grasps are filtered
filter_approach_direction = 0
direction = 1 0 0
thresh_rad = 2.0

# Clustering of grasps
# min_inliers: minimum number of inliers per cluster; set to 0 to turn off clustering
min_inliers = 0

# Grasp selection
# num_selected: number of selected grasps (sorted by score)
num_selected = 5

# Visualization
# plot_normals: plot the surface normals
# plot_samples: plot the samples
# plot_candidates: plot the grasp candidates
# plot_filtered_candidates: plot the grasp candidates which remain after filtering
# plot_valid_grasps: plot the candidates that are identified as valid grasps
# plot_clustered_grasps: plot the grasps that after clustering
# plot_selected_grasps: plot the selected grasps (final output)
plot_normals = 0
plot_samples = 0
plot_candidates = 0
plot_filtered_candidates = 0
plot_valid_grasps = 0
plot_clustered_grasps = 0
plot_selected_grasps = 1
84 changes: 84 additions & 0 deletions cfg/cem_vino_params.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Path to config file for robot hand geometry
hand_geometry_filename = ../cfg/hand_geometry.cfg

# Path to config file for volume and image geometry
image_geometry_filename = ../cfg/image_geometry_12channels.cfg

# (OpenVINO) Path to directory that contains neural network parameters
model_file = ../models/openvino/two_views_12_channels_curv_axis.xml
weights_file = ../models/openvino/two_views_12_channels_curv_axis.bin
device = 0
batch_size = 64

# Preprocessing of point cloud
# voxelize: if the cloud gets voxelized/downsampled
# remove_outliers: if statistical outliers are removed from the cloud (used to remove noise)
# workspace: the workspace of the robot (dimensions of a cube centered at origin of point cloud)
# camera_position: the position of the camera from which the cloud was taken
# sample_above_plane: only draws samples which do not belong to the table plane
voxelize = 1
remove_outliers = 0
workspace = -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_position = 0 0 0
sample_above_plane = 1

# Cross Entropy Method
# sampling_method: 0 -> sum of Gaussians, 1 -> max of Gaussians
num_iterations = 10
num_init_samples = 50
num_samples_per_iteration = 50
prob_rand_samples = 0.3
standard_deviation = 1.5
sampling_method = 1
min_score = 0
visualize_rounds = 0
visualize_steps = 0
visualize_results = 1

# Grasp candidate generation
# num_threads: the number of CPU threads to be used
# nn_radius: the radius for the neighborhood search
# num_orientations: the number of robot hand orientations to evaluate
# rotation_axes: the axes about which the point neighborhood gets rotated
num_threads = 4
nn_radius = 0.01
num_orientations = 8
num_finger_placements = 10
hand_axes = 2
deepen_hand = 1

# Filtering of candidates
# min_aperture: the minimum gripper width
# max_aperture: the maximum gripper width
# workspace_grasps: dimensions of a cube centered at origin of point cloud; should be smaller than <workspace>
min_aperture = 0.0
max_aperture = 0.085
workspace_grasps = -1 1 -1 1 -1 1

# Filtering of candidates based on their approach direction
# filter_approach_direction: turn filtering on/off
# direction: the direction to compare against
# angle_thresh: angle in radians above which grasps are filtered
filter_approach_direction = 1
direction = 1 0 0
thresh_rad = 2.0

# Clustering of grasps
# min_inliers: minimum number of inliers per cluster; set to 0 to turn off clustering
min_inliers = 0

# Visualization
# plot_normals: plot the surface normals
# plot_samples: plot the samples
# plot_candidates: plot the grasp candidates
# plot_filtered_candidates: plot the grasp candidates which remain after filtering
# plot_valid_grasps: plot the candidates that are identified as valid grasps
# plot_clustered_grasps: plot the grasps that after clustering
# plot_selected_grasps: plot the selected grasps (final output)
plot_normals = 0
plot_samples = 0
plot_candidates = 0
plot_filtered_candidates = 0
plot_valid_grasps = 0
plot_clustered_grasps = 0
plot_selected_grasps = 0
Loading

0 comments on commit 83035e5

Please sign in to comment.