diff --git a/setup.py b/setup.py index b0e9a57..5afa652 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ from catkin_pkg.python_setup import generate_distutils_setup # Fetch values from package.xml. setup_args = generate_distutils_setup( packages=["active_grasp"], + package_dir={"": "src"}, ) setup(**setup_args) diff --git a/active_grasp/__init__.py b/src/active_grasp/__init__.py similarity index 100% rename from active_grasp/__init__.py rename to src/active_grasp/__init__.py diff --git a/active_grasp/baselines.py b/src/active_grasp/baselines.py similarity index 100% rename from active_grasp/baselines.py rename to src/active_grasp/baselines.py diff --git a/active_grasp/bbox.py b/src/active_grasp/bbox.py similarity index 100% rename from active_grasp/bbox.py rename to src/active_grasp/bbox.py diff --git a/active_grasp/controller.py b/src/active_grasp/controller.py similarity index 100% rename from active_grasp/controller.py rename to src/active_grasp/controller.py diff --git a/active_grasp/nbv.py b/src/active_grasp/nbv.py similarity index 100% rename from active_grasp/nbv.py rename to src/active_grasp/nbv.py diff --git a/active_grasp/policy.py b/src/active_grasp/policy.py similarity index 100% rename from active_grasp/policy.py rename to src/active_grasp/policy.py diff --git a/active_grasp/simulation.py b/src/active_grasp/simulation.py similarity index 100% rename from active_grasp/simulation.py rename to src/active_grasp/simulation.py diff --git a/active_grasp/timer.py b/src/active_grasp/timer.py similarity index 100% rename from active_grasp/timer.py rename to src/active_grasp/timer.py diff --git a/active_grasp/visualization.py b/src/active_grasp/visualization.py similarity index 89% rename from active_grasp/visualization.py rename to src/active_grasp/visualization.py index 9c7f773..a987162 100644 --- a/active_grasp/visualization.py +++ b/src/active_grasp/visualization.py @@ -242,33 +242,3 @@ def create_cam_view_marker( ] marker.points = [to_point_msg(p) for p in points] return marker - - -def create_grasp_markers( - frame, - grasp, - color, - ns, - id=0, - finger_depth=0.05, - radius=0.003, -): - w, d = grasp.width, finger_depth - - pose = grasp.pose * Transform.translation([0.0, -w / 2, d / 2]) - scale = [radius, radius, d] - left = create_marker(Marker.CYLINDER, frame, pose, scale, color, ns, id) - - pose = grasp.pose * Transform.translation([0.0, w / 2, d / 2]) - scale = [radius, radius, d] - right = create_marker(Marker.CYLINDER, frame, pose, scale, color, ns, id + 1) - - pose = grasp.pose * Transform.translation([0.0, 0.0, -d / 4]) - scale = [radius, radius, d / 2] - wrist = create_marker(Marker.CYLINDER, frame, pose, scale, color, ns, id + 2) - - pose = grasp.pose * Transform.rotation(Rotation.from_rotvec([np.pi / 2, 0, 0])) - scale = [radius, radius, w] - palm = create_marker(Marker.CYLINDER, frame, pose, scale, color, ns, id + 3) - - return [left, right, wrist, palm]