From bde95e1cb07a100f50a5f6122fee96302569018d Mon Sep 17 00:00:00 2001 From: Nozomi Mizoguchi Date: Fri, 16 Aug 2024 09:37:54 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AAscript=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/aruco_detection.py | 51 ------------------- .../scripts/color_detection.py | 14 ----- .../scripts/gripper_control.py | 48 ----------------- crane_plus_examples/scripts/joint_values.py | 14 ----- crane_plus_examples/scripts/pick_and_place.py | 14 ----- .../scripts/pick_and_place_tf.py | 14 ----- .../scripts/pose_groupstate.py | 14 ----- 7 files changed, 169 deletions(-) delete mode 100644 crane_plus_examples/scripts/aruco_detection.py delete mode 100644 crane_plus_examples/scripts/color_detection.py delete mode 100644 crane_plus_examples/scripts/gripper_control.py delete mode 100644 crane_plus_examples/scripts/joint_values.py delete mode 100644 crane_plus_examples/scripts/pick_and_place.py delete mode 100644 crane_plus_examples/scripts/pick_and_place_tf.py delete mode 100644 crane_plus_examples/scripts/pose_groupstate.py diff --git a/crane_plus_examples/scripts/aruco_detection.py b/crane_plus_examples/scripts/aruco_detection.py deleted file mode 100644 index e549d42..0000000 --- a/crane_plus_examples/scripts/aruco_detection.py +++ /dev/null @@ -1,51 +0,0 @@ -import rclpy -from rclpy.node import Node - -import math - -# from std_msgs.msg import String -from geometry_msgs.msg import TransformStamped -from sensor_msgs.msg import CameraInfo -from sensor_msgs.msg import Image -import cv2 -from cv_bridge import CvBridge -from geometry_msgs.msg import Quaternion -import tf2_ros - - -class ImageSubscriber(Node): - def __init__(self): - super().__init__("aruco_detection") - self.image_subscription = self.create_subscription( - Image, "image_raw", self.listener_callback, 10 - ) - self.image_subscription # prevent unused variable warning - - self.camera_info_subscription = self.create_subscription( - Image, "camera_info", self.listener_callback, 10 - ) - self.camera_info_subscription # prevent unused variable warning - - self.camera_info = None - - def image_callback(self, msg): - self.get_logger().info('I heard: "%s"' % msg.data) - - def camera_info_callback(self, msg): - self.get_logger().info('I heard: "%s"' % msg.data) - -def main(args=None): - rclpy.init(args=args) - - image_subscriber = ImageSubscriber() - rclpy.spin(image_subscriber) - - # Destroy the node explicitly - # (optional - otherwise it will be done automatically - # when the garbage collector destroys the node object) - image_subscriber.destroy_node() - rclpy.shutdown() - - -if __name__ == "__main__": - main() diff --git a/crane_plus_examples/scripts/color_detection.py b/crane_plus_examples/scripts/color_detection.py deleted file mode 100644 index 4ca7027..0000000 --- a/crane_plus_examples/scripts/color_detection.py +++ /dev/null @@ -1,14 +0,0 @@ -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node - -from std_msgs.msg import String - - - -def main(args=None): - try: - except: - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/crane_plus_examples/scripts/gripper_control.py b/crane_plus_examples/scripts/gripper_control.py deleted file mode 100644 index 37ec8e7..0000000 --- a/crane_plus_examples/scripts/gripper_control.py +++ /dev/null @@ -1,48 +0,0 @@ -import math - -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node -from std_msgs.msg import String - - -# generic ros libraries -from rclpy.logging import get_logger - -# moveit python library -from moveit.core.robot_state import RobotState -from moveit.planning import ( - MoveItPy, - MultiPipelinePlanRequestParameters, -) - -from config import moveit_config - -def to_radians(deg_angle): - return deg_angle * math.pi / 180.0 - - -def main(args=None): - # ros2の初期化 - rclpy.init(args=args) - - # ロガー生成 - logger = get_logger("gripper_control") - - # MoveItPy初期化 - crane_plus = MoveItPy(node_name="moveit_py", config_dict=moveit_config) - crane_plus_gripper = crane_plus.get_planning_component("gripper") - logger.info("MoveItPy instance created") - - - - - - - - # MoveItPyの終了 - crane_plus.shutdown() - - # rclpy.shutdown() -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/crane_plus_examples/scripts/joint_values.py b/crane_plus_examples/scripts/joint_values.py deleted file mode 100644 index 4ca7027..0000000 --- a/crane_plus_examples/scripts/joint_values.py +++ /dev/null @@ -1,14 +0,0 @@ -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node - -from std_msgs.msg import String - - - -def main(args=None): - try: - except: - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/crane_plus_examples/scripts/pick_and_place.py b/crane_plus_examples/scripts/pick_and_place.py deleted file mode 100644 index 4ca7027..0000000 --- a/crane_plus_examples/scripts/pick_and_place.py +++ /dev/null @@ -1,14 +0,0 @@ -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node - -from std_msgs.msg import String - - - -def main(args=None): - try: - except: - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/crane_plus_examples/scripts/pick_and_place_tf.py b/crane_plus_examples/scripts/pick_and_place_tf.py deleted file mode 100644 index 4ca7027..0000000 --- a/crane_plus_examples/scripts/pick_and_place_tf.py +++ /dev/null @@ -1,14 +0,0 @@ -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node - -from std_msgs.msg import String - - - -def main(args=None): - try: - except: - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/crane_plus_examples/scripts/pose_groupstate.py b/crane_plus_examples/scripts/pose_groupstate.py deleted file mode 100644 index 4ca7027..0000000 --- a/crane_plus_examples/scripts/pose_groupstate.py +++ /dev/null @@ -1,14 +0,0 @@ -import rclpy -from rclpy.executors import ExternalShutdownException -from rclpy.node import Node - -from std_msgs.msg import String - - - -def main(args=None): - try: - except: - -if __name__ == '__main__': - main() \ No newline at end of file