diff --git a/niryo_robot_poses_handlers/msg/DynamicFrame.msg b/niryo_robot_poses_handlers/msg/DynamicFrame.msg index aa9680355..a47548ccf 100644 --- a/niryo_robot_poses_handlers/msg/DynamicFrame.msg +++ b/niryo_robot_poses_handlers/msg/DynamicFrame.msg @@ -1,6 +1,7 @@ string name # maximum lenght of dynamic_frame's name is 30 characters string new_name string description +bool belong_to_workspace geometry_msgs/Point position niryo_robot_msgs/RPY rpy diff --git a/niryo_robot_poses_handlers/scripts/poses_handlers_node.py b/niryo_robot_poses_handlers/scripts/poses_handlers_node.py index 9e14e721a..7dd963ab4 100755 --- a/niryo_robot_poses_handlers/scripts/poses_handlers_node.py +++ b/niryo_robot_poses_handlers/scripts/poses_handlers_node.py @@ -54,23 +54,6 @@ def __init__(self): self.__tool_id = 0 rospy.Subscriber('/niryo_robot_tools_commander/current_id', Int32, self.__callback_tool_id) - # Workspaces - ws_dir = rospy.get_param("~workspace_dir") - - self.__ws_manager = WorkspaceManager(ws_dir) - rospy.Service('~manage_workspace', ManageWorkspace, self.__callback_manage_workspace) - rospy.Service('~get_workspace_ratio', GetWorkspaceRatio, self.__callback_workspace_ratio) - rospy.Service('~get_workspace_list', GetNameDescriptionList, self.__callback_workspace_list) - rospy.Service('~get_workspace_poses', GetWorkspaceRobotPoses, self.__callback_get_workspace_poses) - rospy.Service('~get_workspace_points', GetWorkspacePoints, self.__callback_get_workspace_points) - rospy.Service('~get_workspace_matrix_poses', GetWorkspaceMatrixPoses, self.__callback_get_workspace_matrix) - - if rospy.has_param('~gazebo_workspaces'): - for ws_name, ws_poses in rospy.get_param('~gazebo_workspaces').items(): - if ws_name not in self.get_available_workspaces()[0]: - rospy.loginfo("Poses Handler - Adding the {} workspace...".format(ws_name)) - self.create_workspace_from_points(ws_name, "", [Point(*point) for point in ws_poses]) - # Grips tool_config_dict = rospy.get_param("niryo_robot_tools_commander/tool_list", dict()) self.__tool_id_gripname_dict = {tool["id"]: "default_" + tool["name"].replace(" ", "_") @@ -108,6 +91,23 @@ def __init__(self): # Publisher dynamic frames thread.start_new_thread(self.dynamic_frame_manager.publish_frames, ()) + # Workspaces + ws_dir = rospy.get_param("~workspace_dir") + + self.__ws_manager = WorkspaceManager(ws_dir) + rospy.Service('~manage_workspace', ManageWorkspace, self.__callback_manage_workspace) + rospy.Service('~get_workspace_ratio', GetWorkspaceRatio, self.__callback_workspace_ratio) + rospy.Service('~get_workspace_list', GetNameDescriptionList, self.__callback_workspace_list) + rospy.Service('~get_workspace_poses', GetWorkspaceRobotPoses, self.__callback_get_workspace_poses) + rospy.Service('~get_workspace_points', GetWorkspacePoints, self.__callback_get_workspace_points) + rospy.Service('~get_workspace_matrix_poses', GetWorkspaceMatrixPoses, self.__callback_get_workspace_matrix) + + if rospy.has_param('~gazebo_workspaces'): + for ws_name, ws_poses in rospy.get_param('~gazebo_workspaces').items(): + if ws_name not in self.get_available_workspaces()[0]: + rospy.loginfo("Poses Handler - Adding the {} workspace...".format(ws_name)) + self.create_workspace_from_points(ws_name, "", [Point(*point) for point in ws_poses]) + # Set a bool to mentioned this node is initialized rospy.set_param('~initialized', True) @@ -249,7 +249,8 @@ def __callback_manage_dynamic_frame(self, req): return CommandStatus.DYNAMIC_FRAME_CREATION_FAILED, "Frame have 3 points, {} given".format( len(frame.poses)) try: - self.create_dynamic_frame_from_poses(frame.name, frame.description, frame.poses) + self.create_dynamic_frame_from_poses(frame.name, frame.description, frame.poses, + frame.belong_to_workspace) return CommandStatus.SUCCESS, "Created dynamic frame '{}'".format(frame.name) except NiryoRobotFileException as e: return CommandStatus.FILE_ALREADY_EXISTS, str(e) @@ -260,7 +261,8 @@ def __callback_manage_dynamic_frame(self, req): return CommandStatus.DYNAMIC_FRAME_CREATION_FAILED, "Frame have 3 points, {} given".format( len(frame.points)) try: - self.create_dynamic_frame_from_points(frame.name, frame.description, frame.points) + self.create_dynamic_frame_from_points(frame.name, frame.description, frame.points, + frame.belong_to_workspace) return CommandStatus.SUCCESS, "Created dynamic frame '{}'".format(frame.name) except NiryoRobotFileException as e: return CommandStatus.FILE_ALREADY_EXISTS, str(e) @@ -268,7 +270,7 @@ def __callback_manage_dynamic_frame(self, req): return CommandStatus.POSES_HANDLER_CREATION_FAILED, str(e) elif cmd == req.DELETE: try: - self.remove_dynamic_frame(frame.name) + self.remove_dynamic_frame(frame.name, frame.belong_to_workspace) return CommandStatus.SUCCESS, "Removed dynamic frame '{}'".format(frame.name) except Exception as e: return CommandStatus.POSES_HANDLER_REMOVAL_FAILED, str(e) @@ -330,8 +332,12 @@ def create_workspace(self, name, description, robot_poses): pose_raw = [[pose.position.x, pose.position.y, pose.position.z], [pose.rpy.roll, pose.rpy.pitch, pose.rpy.yaw]] robot_poses_raw.append(pose_raw) + self.__ws_manager.create(name, points, robot_poses_raw, description) + # Asssociate frame + self.dynamic_frame_manager.create(name, [points[0]] + [points[3]] + [points[1]], description, True) + def create_workspace_from_points(self, name, description, points): """ @@ -344,6 +350,9 @@ def create_workspace_from_points(self, name, description, points): points_raw.append([point.x, point.y, point.z]) self.__ws_manager.create(name, points_raw, description) + # Asssociate frame + self.dynamic_frame_manager.create(name, [points_raw[0]] + [points_raw[3]] + [points_raw[1]], description, True) + def remove_workspace(self, name): """ Removes a workspace @@ -351,6 +360,8 @@ def remove_workspace(self, name): """ self.__ws_manager.remove(name) + self.dynamic_frame_manager.remove(name, True) + def get_available_workspaces(self): """ Returns a list of all available workspace names. @@ -483,7 +494,7 @@ def get_available_poses(self): return self.__pos_manager.get_all_names_w_description() # Dynamic frame - def create_dynamic_frame_from_poses(self, name, description, poses): + def create_dynamic_frame_from_poses(self, name, description, poses, belong_to_workspace=False): """ Create a dynamic frame from ManageDynamicFrame message fields @@ -503,9 +514,9 @@ def create_dynamic_frame_from_poses(self, name, description, poses): rospy.loginfo("Tip point\n{}".format(point)) points.append([point.x, point.y, point.z]) - self.dynamic_frame_manager.create(name, points, description) + self.dynamic_frame_manager.create(name, points, description, belong_to_workspace) - def create_dynamic_frame_from_points(self, name, description, points): + def create_dynamic_frame_from_points(self, name, description, points, belong_to_workspace=False): """ Create a dynamic frame from ManageDynamicFrame message fields @@ -521,9 +532,9 @@ def create_dynamic_frame_from_points(self, name, description, points): for point in points: points_raw.append([point.x, point.y, point.z]) - self.dynamic_frame_manager.create(name, points_raw, description) + self.dynamic_frame_manager.create(name, points_raw, description, belong_to_workspace) - def remove_dynamic_frame(self, name): + def remove_dynamic_frame(self, name, belong_to_workspace=False): """ Asks dynamic frame manager to remove dynamic frame @@ -531,7 +542,7 @@ def remove_dynamic_frame(self, name): :type name: str :return: None """ - self.dynamic_frame_manager.remove(name) + self.dynamic_frame_manager.remove(name, belong_to_workspace) def edit_dynamic_frame(self, name, new_name, description): """ diff --git a/niryo_robot_poses_handlers/src/niryo_robot_poses_handlers/dynamic_frame_manager.py b/niryo_robot_poses_handlers/src/niryo_robot_poses_handlers/dynamic_frame_manager.py index 318e6e398..cd870a301 100644 --- a/niryo_robot_poses_handlers/src/niryo_robot_poses_handlers/dynamic_frame_manager.py +++ b/niryo_robot_poses_handlers/src/niryo_robot_poses_handlers/dynamic_frame_manager.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from asyncore import read from niryo_robot_poses_handlers.file_manager import FileManager, NiryoRobotFileException from niryo_robot_poses_handlers.transform_functions import euler_from_matrix, quaternion_from_euler @@ -17,6 +18,7 @@ class DynamicFrame(object): def __init__(self, name, description): self.name = name self.description = description + self.belong_to_workspace = False self.robot_poses = [] self.points = [] self.static_transform_stamped = [] @@ -25,6 +27,7 @@ def to_dict(self): dict_ = dict() dict_["name"] = self.name dict_["description"] = self.description + dict_["belong_to_workspace"] = self.belong_to_workspace dict_["points"] = self.points dict_["static_transform_stamped"] = self.static_transform_stamped return dict_ @@ -33,6 +36,7 @@ def to_dict(self): def from_dict(cls, dict_): dyn_frame = cls(dict_["name"], dict_["description"]) dyn_frame.points = dict_["points"] + dyn_frame.belong_to_workspace = dict_["belong_to_workspace"] dyn_frame.static_transform_stamped = dict_["static_transform_stamped"] return dyn_frame @@ -92,10 +96,11 @@ def calculate_transform(points): return point_o, point_vx, point_vy, q - def create(self, frame_name, points, description=""): + def create(self, frame_name, points, description="", belong_to_workspace=False): """ Create a new local frame """ + print(points) if self.exists(frame_name): raise NiryoRobotFileException("Frame {} already exists".format(frame_name)) @@ -115,6 +120,7 @@ def create(self, frame_name, points, description=""): dynamic_frame = DynamicFrame(frame_name, description) dynamic_frame.points = points + dynamic_frame.belong_to_workspace = belong_to_workspace dynamic_frame.static_transform_stamped = [[point_o.x, point_o.y, point_o.z], q.tolist()] self._write(frame_name, dynamic_frame) @@ -148,6 +154,7 @@ def edit_frame(self, frame_name, new_frame_name, description=""): dynamic_frame = DynamicFrame(new_frame_name, description) dynamic_frame.points = points + dynamic_frame.belong_to_workspace = dynamic_frame.belong_to_workspace dynamic_frame.static_transform_stamped = [[point_o.x, point_o.y, point_o.z], q.tolist()] self._write(new_frame_name, dynamic_frame) @@ -156,10 +163,16 @@ def edit_frame(self, frame_name, new_frame_name, description=""): if (frame_name != new_frame_name): FileManager.remove(self, frame_name) - def remove(self, frame_name): + def remove(self, frame_name, belong_to_workspace=False): """ Remove a frame """ + if not belong_to_workspace: + frame = self.read(frame_name) + if frame.belong_to_workspace: + raise NiryoRobotFileException("Frame {} can't be removed because it belong to a workspace".format( + frame_name)) + if not self.exists(frame_name): raise NiryoRobotFileException("Frame {} not already exists".format(frame_name)) diff --git a/niryo_robot_python_ros_wrapper/src/niryo_robot_python_ros_wrapper/ros_wrapper.py b/niryo_robot_python_ros_wrapper/src/niryo_robot_python_ros_wrapper/ros_wrapper.py index 76360fd99..ba371389c 100644 --- a/niryo_robot_python_ros_wrapper/src/niryo_robot_python_ros_wrapper/ros_wrapper.py +++ b/niryo_robot_python_ros_wrapper/src/niryo_robot_python_ros_wrapper/ros_wrapper.py @@ -1044,7 +1044,7 @@ def clean_trajectory_memory(self): # - Dynamic frame - def save_dynamic_frame_from_poses(self, frame_name, description, list_robot_poses): + def save_dynamic_frame_from_poses(self, frame_name, description, list_robot_poses, belong_to_workspace=False): """ Create a dynamic frame with 3 poses (origin, x, y) @@ -1054,6 +1054,8 @@ def save_dynamic_frame_from_poses(self, frame_name, description, list_robot_pose :type description: str :param list_robot_poses: 3 poses needed to create the frame :type list_robot_poses: list[list[float]] + :param belong_to_workspace: indicate if the frame belong to a workspace + :type belong_to_workspace: boolean :return: status, message :rtype: (int, str) """ @@ -1066,6 +1068,7 @@ def save_dynamic_frame_from_poses(self, frame_name, description, list_robot_pose req.dynamic_frame.name = frame_name req.dynamic_frame.description = description req.dynamic_frame.poses = list_poses + req.dynamic_frame.belong_to_workspace = belong_to_workspace result = self._call_service('/niryo_robot_poses_handlers/manage_dynamic_frame', ManageDynamicFrame, req) @@ -1073,7 +1076,7 @@ def save_dynamic_frame_from_poses(self, frame_name, description, list_robot_pose return self._classic_return_w_check(result) - def save_dynamic_frame_from_points(self, frame_name, description, list_points): + def save_dynamic_frame_from_points(self, frame_name, description, list_points, belong_to_workspace=False): """ Create a dynamic frame with 3 points (origin, x, y) @@ -1083,6 +1086,8 @@ def save_dynamic_frame_from_points(self, frame_name, description, list_points): :type description: str :param list_points: 3 points needed to create the frame :type list_points: list[list[float]] + :param belong_to_workspace: indicate if the frame belong to a workspace + :type belong_to_workspace: boolean :return: status, message :rtype: (int, str) """ @@ -1095,6 +1100,7 @@ def save_dynamic_frame_from_points(self, frame_name, description, list_points): req.dynamic_frame.name = frame_name req.dynamic_frame.description = description req.dynamic_frame.points = points + req.dynamic_frame.belong_to_workspace = belong_to_workspace result = self._call_service('/niryo_robot_poses_handlers/manage_dynamic_frame', ManageDynamicFrame, req) @@ -1129,12 +1135,14 @@ def edit_dynamic_frame(self, frame_name, new_frame_name, new_description): return self._classic_return_w_check(result) - def delete_dynamic_frame(self, frame_name): + def delete_dynamic_frame(self, frame_name, belong_to_workspace=False): """ Delete a dynamic frame :param frame_name: name of the frame to remove :type frame_name: str + :param belong_to_workspace: indicate if the frame belong to a workspace + :type belong_to_workspace: boolean :return: status, message :rtype: (int, str) """ @@ -1143,6 +1151,7 @@ def delete_dynamic_frame(self, frame_name): req = ManageDynamicFrameRequest() req.cmd = ManageDynamicFrameRequest.DELETE req.dynamic_frame.name = frame_name + req.dynamic_frame.belong_to_workspace = belong_to_workspace result = self._call_service('/niryo_robot_poses_handlers/manage_dynamic_frame', ManageDynamicFrame, req) diff --git a/niryo_robot_user_interface/src/niryo_robot_user_interface/tcp_server/command_interpreter.py b/niryo_robot_user_interface/src/niryo_robot_user_interface/tcp_server/command_interpreter.py index 4e5d87fe0..aa881eb40 100644 --- a/niryo_robot_user_interface/src/niryo_robot_user_interface/tcp_server/command_interpreter.py +++ b/niryo_robot_user_interface/src/niryo_robot_user_interface/tcp_server/command_interpreter.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import rospy - from enum import Enum from niryo_robot_python_ros_wrapper.ros_wrapper_enums import ShiftPose, PinMode, PinState, PinID, \ ToolID, ConveyorID, ConveyorDirection, CommandEnum, ConveyorTTL, ConveyorCan @@ -553,22 +552,26 @@ def __get_saved_dynamic_frame(self, *param_list): frame = self.__niryo_robot.get_saved_dynamic_frame(*param_list) return self.__send_answer(*frame) - @check_nb_args(5) + @check_nb_args(6) def __save_dynamic_frame_from_poses(self, *param_list): name = param_list[0] description = param_list[1] - list_poses = list(param_list[2:]) + list_poses = list(param_list[2:-1]) + belong_to_workspace = bool(param_list[-1]) - self.__niryo_robot.save_dynamic_frame_from_poses(name, description, list_poses) + print(belong_to_workspace) + + self.__niryo_robot.save_dynamic_frame_from_poses(name, description, list_poses, belong_to_workspace) return self.__send_answer() - @check_nb_args(5) + @check_nb_args(6) def __save_dynamic_frame_from_points(self, *param_list): name = param_list[0] description = param_list[1] - list_poses = list(param_list[2:]) + list_poses = list(param_list[2:-1]) + belong_to_workspace = bool(param_list[-1]) - self.__niryo_robot.save_dynamic_frame_from_points(name, description, list_poses) + self.__niryo_robot.save_dynamic_frame_from_points(name, description, list_poses, belong_to_workspace) return self.__send_answer() @check_nb_args(3) @@ -576,9 +579,11 @@ def __edit_dynamic_frame(self, *param_list): self.__niryo_robot.edit_dynamic_frame(*param_list) return self.__send_answer() - @check_nb_args(1) + @check_nb_args(2) def __delete_dynamic_frame(self, *param_list): - self.__niryo_robot.delete_dynamic_frame(*param_list) + name = param_list[0] + belong_to_workspace = bool(param_list[1]) + self.__niryo_robot.delete_dynamic_frame(name, belong_to_workspace) return self.__send_answer() @check_nb_args(2) diff --git a/sphinx_doc/locale/en/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po b/sphinx_doc/locale/en/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po index 1051c3744..90e7f0b30 100644 --- a/sphinx_doc/locale/en/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po +++ b/sphinx_doc/locale/en/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Ned ROS Documentation 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-12 14:10+0000\n" +"POT-Creation-Date: 2022-04-13 14:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -165,7 +165,7 @@ msgstr "" #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.close_gripper:9 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.control_conveyor:12 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.deactivate_electromagnet:5 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:5 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:7 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_pose:5 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_trajectory:5 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_workspace:5 @@ -192,8 +192,8 @@ msgstr "" #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.push_air_vacuum_pump:3 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.release_with_tool:9 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.reset_tcp:4 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:9 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:9 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:11 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:11 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_pose:17 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_trajectory:7 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_workspace_from_points:7 @@ -721,6 +721,13 @@ msgstr "" msgid "3 poses needed to create the frame" msgstr "" +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:5 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:9 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:9 +#: of +msgid "indicate if the frame belong to a workspace" +msgstr "" + #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:1 #: of msgid "Create a dynamic frame with 3 points (origin, x, y)" diff --git a/sphinx_doc/locale/en/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po b/sphinx_doc/locale/en/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po index 80c83f8e4..9518c140d 100644 --- a/sphinx_doc/locale/en/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po +++ b/sphinx_doc/locale/en/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Ned ROS Documentation 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-23 15:17+0100\n" +"POT-Creation-Date: 2022-04-13 14:24+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -275,54 +275,72 @@ msgstr "" msgid "Sets the saturation of the video stream" msgstr "" +#: ../../source/stack/high_level/niryo_robot_vision.rst:103 +msgid "``visualization``" +msgstr "" + +#: ../../source/stack/high_level/niryo_robot_vision.rst:104 +msgid "" +":ref:`Visualization`" +msgstr "" + #: ../../source/stack/high_level/niryo_robot_vision.rst:105 +msgid "Add visuals markers of objects detected by the vision kit to rviz" +msgstr "" + +#: ../../source/stack/high_level/niryo_robot_vision.rst:108 msgid "All these services are available as soon as the node is started." msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:109 +#: ../../source/stack/high_level/niryo_robot_vision.rst:112 msgid "Dependencies - Vision" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:110 +#: ../../source/stack/high_level/niryo_robot_vision.rst:113 msgid ":doc:`niryo_robot_msgs`" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:111 +#: ../../source/stack/high_level/niryo_robot_vision.rst:114 msgid ":msgs_index:`sensor_msgs`" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:115 +#: ../../source/stack/high_level/niryo_robot_vision.rst:118 msgid "Topics files - Vision" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:118 +#: ../../source/stack/high_level/niryo_robot_vision.rst:121 msgid "ImageParameters (Topic)" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:126 +#: ../../source/stack/high_level/niryo_robot_vision.rst:129 msgid "Services files - Vision" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:129 +#: ../../source/stack/high_level/niryo_robot_vision.rst:132 msgid "DebugColorDetection (Service)" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:136 +#: ../../source/stack/high_level/niryo_robot_vision.rst:139 msgid "DebugMarkers (Service)" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:143 +#: ../../source/stack/high_level/niryo_robot_vision.rst:146 msgid "ObjDetection (Service)" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:150 +#: ../../source/stack/high_level/niryo_robot_vision.rst:153 msgid "TakePicture (Service)" msgstr "" -#: ../../source/stack/high_level/niryo_robot_vision.rst:156 +#: ../../source/stack/high_level/niryo_robot_vision.rst:160 msgid "SetImageParameter (Service)" msgstr "" +#: ../../source/stack/high_level/niryo_robot_vision.rst:167 +msgid "Visualization (Service)" +msgstr "" + #~ msgid "Niryo Robot Vision Package" #~ msgstr "" @@ -477,3 +495,6 @@ msgstr "" #~ msgid "The namespace used is: |namespace_emphasize|" #~ msgstr "" +#~ msgid "Add visual marker of object detected by the vision kit to rviz" +#~ msgstr "" + diff --git a/sphinx_doc/locale/fr/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po b/sphinx_doc/locale/fr/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po index 776aec86a..e31c30312 100644 --- a/sphinx_doc/locale/fr/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po +++ b/sphinx_doc/locale/fr/LC_MESSAGES/source/python_ros_wrapper/ros_wrapper_doc.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Ned ROS Documentation 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-12 14:10+0000\n" +"POT-Creation-Date: 2022-04-13 14:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -172,7 +172,7 @@ msgstr "Renvoie" #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.close_gripper:9 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.control_conveyor:12 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.deactivate_electromagnet:5 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:5 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:7 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_pose:5 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_trajectory:5 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_workspace:5 @@ -199,8 +199,8 @@ msgstr "Renvoie" #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.push_air_vacuum_pump:3 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.release_with_tool:9 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.reset_tcp:4 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:9 -#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:9 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:11 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:11 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_pose:17 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_trajectory:7 #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_workspace_from_points:7 @@ -759,6 +759,13 @@ msgstr "description du repère" msgid "3 poses needed to create the frame" msgstr "3 positions nécessaires pour créer le repère" +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.delete_dynamic_frame:5 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:9 +#: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_poses:9 +#: of +msgid "indicate if the frame belong to a workspace" +msgstr "indique si le repère appartient à un espace de travail" + #: niryo_robot_python_ros_wrapper.ros_wrapper.NiryoRosWrapper.save_dynamic_frame_from_points:1 #: of msgid "Create a dynamic frame with 3 points (origin, x, y)" diff --git a/sphinx_doc/locale/fr/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po b/sphinx_doc/locale/fr/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po index 2af766879..3abd15cf1 100644 --- a/sphinx_doc/locale/fr/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po +++ b/sphinx_doc/locale/fr/LC_MESSAGES/source/stack/high_level/niryo_robot_vision.po @@ -10,17 +10,14 @@ msgid "" msgstr "" "Project-Id-Version: Ned ROS Documentation 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-23 15:17+0100\n" +"POT-Creation-Date: 2022-04-13 14:24+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Language: fr\n" -"X-Source-Language: C\n" #: ../../source/stack/high_level/niryo_robot_vision.rst:2 msgid "Niryo_robot_vision" @@ -37,37 +34,34 @@ msgstr "Noeud Vision" #: ../../source/stack/high_level/niryo_robot_vision.rst:9 msgid "" "The ROS Node is made of several services to deal with video streaming, " -"object detection... The node is working exactly the same way if you chose to " -"use it on simulation or reality." +"object detection... The node is working exactly the same way if you chose" +" to use it on simulation or reality." msgstr "" -"Le nœud ROS est composé de plusieurs services pour gérer le streaming vidéo, " -"la détection d'objets... Le nœud fonctionne exactement de la même manière si " -"vous avez choisi de l'utiliser sur la simulation ou la réalité." +"Le nœud ROS est composé de plusieurs services pour gérer le streaming " +"vidéo, la détection d'objets... Le nœud fonctionne exactement de la même " +"manière si vous avez choisi de l'utiliser sur la simulation ou la " +"réalité." #: ../../source/stack/high_level/niryo_robot_vision.rst:12 -msgid "" -"This node can be launched locally in a standalone mode via the command: ::" -msgstr "" -"Ce nœud peut être lancé localement en mode autonome via la commande : ::" +msgid "This node can be launched locally in a standalone mode via the command: ::" +msgstr "Ce nœud peut être lancé localement en mode autonome via la commande : ::" #: ../../source/stack/high_level/niryo_robot_vision.rst:16 msgid "" "Configuration (Frame Per Second, Camera Port, Video Resolution) can be " "edited in the config file:" msgstr "" -"La configuration (image par seconde, port de caméra, résolution vidéo) peut " -"être modifiée dans le fichier de configuration :" +"La configuration (image par seconde, port de caméra, résolution vidéo) " +"peut être modifiée dans le fichier de configuration :" #: ../../source/stack/high_level/niryo_robot_vision.rst:19 -msgid "" -"For \"standard\" Node: *niryo_robot_vision/config/video_server_setup.yaml*" +msgid "For \"standard\" Node: *niryo_robot_vision/config/video_server_setup.yaml*" msgstr "" "Pour un nœud \"standard\" : " "*niryo_robot_vision/config/video_server_setup.yaml*" #: ../../source/stack/high_level/niryo_robot_vision.rst:20 -msgid "" -"For local Node: *niryo_robot_vision/config/video_server_setup_local.yaml*" +msgid "For local Node: *niryo_robot_vision/config/video_server_setup_local.yaml*" msgstr "" "Pour un nœud local : " "*niryo_robot_vision/config/video_server_setup_local.yaml*" @@ -171,18 +165,19 @@ msgstr "``video_stream_parameters``" #: ../../source/stack/high_level/niryo_robot_vision.rst:64 msgid "" -":ref:`ImageParameters`" +":ref:`ImageParameters`" msgstr "" -":ref:`ImageParameters`" +":ref:`ImageParameters`" #: ../../source/stack/high_level/niryo_robot_vision.rst:65 msgid "" "Publishes the brightness, contrast and saturation settings of the video " "stream" msgstr "" -"Publie les paramètres de luminosité, contraste et saturation du stream vidéo" +"Publie les paramètres de luminosité, contraste et saturation du stream " +"vidéo" #: ../../source/stack/high_level/niryo_robot_vision.rst:68 msgid "Services - Vision" @@ -198,15 +193,14 @@ msgstr "``debug_colors``" #: ../../source/stack/high_level/niryo_robot_vision.rst:80 msgid "" -":ref:`DebugColorDetection`" +":ref:`DebugColorDetection`" msgstr "" -":ref:`DebugColorDetection`" +":ref:`DebugColorDetection`" #: ../../source/stack/high_level/niryo_robot_vision.rst:81 -msgid "" -"Returns an annotated image to emphasize what happened with color detection" +msgid "Returns an annotated image to emphasize what happened with color detection" msgstr "" "Renvoie une image annotée pour souligner ce qu'il s'est passé avec la " "détection des couleurs" @@ -217,15 +211,16 @@ msgstr "``debug_markers``" #: ../../source/stack/high_level/niryo_robot_vision.rst:83 msgid "" -":ref:`DebugMarkers`" +":ref:`DebugMarkers`" msgstr "" -":ref:`DebugMarkers`" +":ref:`DebugMarkers`" #: ../../source/stack/high_level/niryo_robot_vision.rst:84 msgid "" -"Returns an annotated image to emphasize what happened with markers detection" +"Returns an annotated image to emphasize what happened with markers " +"detection" msgstr "" "Renvoie une image annotée pour souligner ce qu'il s'est passé avec la " "détection des marqueurs" @@ -236,11 +231,11 @@ msgstr "``obj_detection_rel``" #: ../../source/stack/high_level/niryo_robot_vision.rst:86 msgid "" -":ref:`ObjDetection`" +":ref:`ObjDetection`" msgstr "" -":ref:`ObjDetection`" +":ref:`ObjDetection`" #: ../../source/stack/high_level/niryo_robot_vision.rst:87 msgid "Object detection service" @@ -282,11 +277,11 @@ msgstr "``set_brightness``" #: ../../source/stack/high_level/niryo_robot_vision.rst:98 #: ../../source/stack/high_level/niryo_robot_vision.rst:101 msgid "" -":ref:`SetImageParameter`" +":ref:`SetImageParameter`" msgstr "" -":ref:`SetImageParameter`" +":ref:`SetImageParameter`" #: ../../source/stack/high_level/niryo_robot_vision.rst:96 msgid "Sets the brightness of the video stream" @@ -308,54 +303,74 @@ msgstr "``set_saturation``" msgid "Sets the saturation of the video stream" msgstr "Définir la saturation du stream vidéo" +#: ../../source/stack/high_level/niryo_robot_vision.rst:103 +msgid "``visualization``" +msgstr "``visualization``" + +#: ../../source/stack/high_level/niryo_robot_vision.rst:104 +msgid "" +":ref:`Visualization`" +msgstr "" +":ref:`Visualization`" + #: ../../source/stack/high_level/niryo_robot_vision.rst:105 +msgid "Add visuals markers of objects detected by the vision kit to rviz" +msgstr "Ajoute des marqueurs sur rviz des objects détectés par le kit vision" + +#: ../../source/stack/high_level/niryo_robot_vision.rst:108 msgid "All these services are available as soon as the node is started." msgstr "Tous ces services sont disponibles dès le démarrage du nœud." -#: ../../source/stack/high_level/niryo_robot_vision.rst:109 +#: ../../source/stack/high_level/niryo_robot_vision.rst:112 msgid "Dependencies - Vision" msgstr "Dépendances - Vision" -#: ../../source/stack/high_level/niryo_robot_vision.rst:110 +#: ../../source/stack/high_level/niryo_robot_vision.rst:113 msgid ":doc:`niryo_robot_msgs`" msgstr ":doc:`niryo_robot_msgs`" -#: ../../source/stack/high_level/niryo_robot_vision.rst:111 +#: ../../source/stack/high_level/niryo_robot_vision.rst:114 msgid ":msgs_index:`sensor_msgs`" msgstr ":msgs_index:`sensor_msgs`" -#: ../../source/stack/high_level/niryo_robot_vision.rst:115 +#: ../../source/stack/high_level/niryo_robot_vision.rst:118 msgid "Topics files - Vision" msgstr "Fichiers de services - Vision" -#: ../../source/stack/high_level/niryo_robot_vision.rst:118 +#: ../../source/stack/high_level/niryo_robot_vision.rst:121 msgid "ImageParameters (Topic)" msgstr "ImageParameters (Topic)" -#: ../../source/stack/high_level/niryo_robot_vision.rst:126 +#: ../../source/stack/high_level/niryo_robot_vision.rst:129 msgid "Services files - Vision" msgstr "Fichiers de services - Vision" -#: ../../source/stack/high_level/niryo_robot_vision.rst:129 +#: ../../source/stack/high_level/niryo_robot_vision.rst:132 msgid "DebugColorDetection (Service)" msgstr "DebugColorDetection (Service)" -#: ../../source/stack/high_level/niryo_robot_vision.rst:136 +#: ../../source/stack/high_level/niryo_robot_vision.rst:139 msgid "DebugMarkers (Service)" msgstr "DebugMarkers (Service)" -#: ../../source/stack/high_level/niryo_robot_vision.rst:143 +#: ../../source/stack/high_level/niryo_robot_vision.rst:146 msgid "ObjDetection (Service)" msgstr "ObjDetection (Service)" -#: ../../source/stack/high_level/niryo_robot_vision.rst:150 +#: ../../source/stack/high_level/niryo_robot_vision.rst:153 msgid "TakePicture (Service)" msgstr "TakePicture (Service)" -#: ../../source/stack/high_level/niryo_robot_vision.rst:156 +#: ../../source/stack/high_level/niryo_robot_vision.rst:160 msgid "SetImageParameter (Service)" msgstr "SetImageParameter (Service)" +#: ../../source/stack/high_level/niryo_robot_vision.rst:167 +msgid "Visualization (Service)" +msgstr "Visualization (Service)" + #~ msgid "Niryo Robot Vision Package" #~ msgstr "Package de vision du robot Niryo" @@ -367,7 +382,8 @@ msgstr "SetImageParameter (Service)" #~ "*niryo_robot_vision/config/video_server_setup.yaml*" #~ msgid "" -#~ "For local Node : *niryo_robot_vision/config/video_server_setup_local.yaml*" +#~ "For local Node : " +#~ "*niryo_robot_vision/config/video_server_setup_local.yaml*" #~ msgstr "" #~ "Pour un noeud local : " #~ "*niryo_robot_vision/config/video_server_setup_local.yaml*" @@ -397,36 +413,41 @@ msgstr "SetImageParameter (Service)" #~ msgstr "" #~ msgid "" -#~ ":ref:`niryo_robot_msgs `" +#~ ":ref:`niryo_robot_msgs `" #~ msgstr "" #~ msgid "" -#~ ":ref:`ImageParameters`" +#~ ":ref:`ImageParameters`" #~ msgstr "" #~ msgid "" -#~ ":ref:`DebugColorDetection`" +#~ ":ref:`DebugColorDetection`" #~ msgstr "" #~ msgid "" -#~ ":ref:`DebugMarkers`" +#~ ":ref:`DebugMarkers`" #~ msgstr "" #~ msgid "" -#~ ":ref:`ObjDetection`" +#~ ":ref:`ObjDetection`" #~ msgstr "" #~ msgid ":ref:`source/ros/niryo_robot_msgs:SetBool`" #~ msgstr "" -#~ msgid "" -#~ ":ref:`TakePicture`" +#~ msgid ":ref:`TakePicture`" #~ msgstr "" #~ msgid "" -#~ ":ref:`SetImageParameter`" +#~ ":ref:`SetImageParameter`" +#~ msgstr "" + +#~ msgid "Add visual marker of object detected by the vision kit to rviz" #~ msgstr "" + diff --git a/sphinx_doc/source/stack/high_level/niryo_robot_vision.rst b/sphinx_doc/source/stack/high_level/niryo_robot_vision.rst index 2a28cdbb9..de469f7fa 100644 --- a/sphinx_doc/source/stack/high_level/niryo_robot_vision.rst +++ b/sphinx_doc/source/stack/high_level/niryo_robot_vision.rst @@ -100,6 +100,9 @@ Services - Vision * - ``set_saturation`` - :ref:`SetImageParameter` - Sets the saturation of the video stream + * - ``visualization`` + - :ref:`Visualization` + - Add visuals markers of objects detected by the vision kit to rviz All these services are available as soon as the node is started. @@ -152,6 +155,7 @@ TakePicture (Service) .. literalinclude:: ../../../../niryo_robot_vision/srv/TakePicture.srv :language: rostype + SetImageParameter (Service) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -159,6 +163,13 @@ SetImageParameter (Service) :language: rostype +Visualization (Service) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../../../../niryo_robot_vision/srv/Visualization.srv + :language: rostype + + .. |namespace| replace:: /niryo_robot_vision/ .. |namespace_emphasize| replace:: ``/niryo_robot_vision/`` .. |package_path| replace:: ../../../../niryo_robot_vision