Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roslaunch compatibility and module paths #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
7 changes: 7 additions & 0 deletions launch/mesh_completion_server.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

<launch>
<node pkg="pc_object_completion_cnn" type="mesh_completion_server.py" name="pc_cnn_mesh" args="depth">
<!-- arguments define which CNN gets used, options are depth and depth_and_tactile -->
</node>
depth
</launch>
20 changes: 14 additions & 6 deletions scripts/shape_completion_server/mesh_completion_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def completion_cb(self, goal):
dtype=np.float32)
batch_x[0, :, :, :, 0] = partial_vox.data


if self.flip_batch_x:
rospy.loginfo("Flipping Batch X, if performance is poor,\
try setting flip_batch_x=False")
Expand Down Expand Up @@ -198,10 +198,10 @@ def completion_cb(self, goal):
parser = argparse.ArgumentParser(
description="Complete a partial object view")
parser.add_argument(
"ns",
"-ns",
type=str,
help=
"Namespace used to create action server, also determines what model to load. Ex: depth, depth_and_tactile"
default="depth",
help= "Namespace used to create action server, also determines what model to load. Ex: depth, depth_and_tactile"
)
parser.add_argument(
"--flip_batch_x",
Expand All @@ -210,18 +210,26 @@ def completion_cb(self, goal):
help=
"Z+ should be extending away from the camera, sometime binvox files have this as Y+ and need to be rotated. "
)
parser.add_argument(
"roslaunch arguments",
type=str,
default=" ",
nargs="*",
help=
""
)
args = parser.parse_args()
cnns = {
"depth": {
"cnn_python_module":
"shape_completion_server.trained_models.depth_y17_m05_d26_h14_m22_s35_bare_keras_v2.reconstruction_network",
"trained_models.depth_y17_m05_d26_h14_m22_s35_bare_keras_v2.reconstruction_network",
"weights_filepath":
rospkg.RosPack().get_path('pc_object_completion_cnn') +
'/scripts/shape_completion_server/trained_models/depth_y17_m05_d26_h14_m22_s35_bare_keras_v2/best_weights.h5'
},
"depth_and_tactile": {
"cnn_python_module":
"shape_completion_server.trained_models.depth_and_tactile_y17_m08_d09_h15_m55_s53_bare_keras_v2.reconstruction_network",
"trained_models.depth_and_tactile_y17_m08_d09_h15_m55_s53_bare_keras_v2.reconstruction_network",
"weights_filepath":
rospkg.RosPack().get_path('pc_object_completion_cnn') +
'/scripts/shape_completion_server/trained_models/depth_and_tactile_y17_m08_d09_h15_m55_s53_bare_keras_v2/best_weights.h5'
Expand Down