robokudo.descriptors.analysis_engines.stretch_demo ================================================== .. py:module:: robokudo.descriptors.analysis_engines.stretch_demo .. autoapi-nested-parse:: Analysis engine answering perception queries for the Stretch robot. Localizes objects standing on the dominant plane within the apartment demo's second shelf layer, in view of the Stretch's RealSense, and reports their poses in response to a :class:`~robokudo_msgs.action.Query`, so a plan can correct an object's pose before grasping it. .. note:: The pipeline localizes but does not recognize: it attaches no :class:`~robokudo.types.annotation.Classification`, so every reported object designator has an empty ``type`` and the caller decides what it asked for. Adding a classifying annotator (for example :class:`~robokudo.annotators.clip_annotator.ClipAnnotator` or :class:`~robokudo.annotators.simple_yolo_annotator.SimpleYoloAnnotator`) before :class:`~robokudo.annotators.query.GenerateQueryResult` fills that field in without any other change. Attributes ---------- .. autoapisummary:: robokudo.descriptors.analysis_engines.stretch_demo.CAMERA_CONFIG_NAME robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_LAYER_MIN_WORLD_Z robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_LAYER_MAX_WORLD_Z robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_MIN_WORLD_X robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_MAX_WORLD_X robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_MIN_WORLD_Y robokudo.descriptors.analysis_engines.stretch_demo.TARGET_SHELF_MAX_WORLD_Y Classes ------- .. autoapisummary:: robokudo.descriptors.analysis_engines.stretch_demo.AnalysisEngine Module Contents --------------- .. py:data:: CAMERA_CONFIG_NAME :value: 'realsense' Camera configuration this engine reads from. The Stretch carries a RealSense D435i publishing on the stock ``realsense2_camera`` topics, and its colour frame is named ``camera_color_optical_frame``, so the shared RealSense config applies unchanged. Pass overrides to :meth:`~robokudo.descriptors.factories.cr_descriptor_factory.CollectionReaderDescriptorFactory.create_descriptor` if a particular robot publishes elsewhere. .. py:data:: TARGET_SHELF_LAYER_MIN_WORLD_Z :value: 0.4565 Lower world-frame height bound of the crop, in metres. The apartment demo's shelf has layers at world heights 0.283m, 0.63m, 1.265m and 1.613m (see ``experiments.real_stretch_apartment_demo.demo``); this engine targets the second layer at 0.63m. The bound is the midpoint between that layer and the one below it, so the crop keeps whatever sits on the target layer while excluding its neighbours. .. py:data:: TARGET_SHELF_LAYER_MAX_WORLD_Z :value: 0.9475 Upper world-frame height bound of the crop, in metres. The midpoint between the target layer (0.63m) and the one above it (1.265m). .. py:data:: TARGET_SHELF_MIN_WORLD_X :value: 0.4 .. py:data:: TARGET_SHELF_MAX_WORLD_X :value: 1.35 .. py:data:: TARGET_SHELF_MIN_WORLD_Y :value: -0.35 .. py:data:: TARGET_SHELF_MAX_WORLD_Y :value: 0.05 World-frame lateral bounds of the crop, in metres. The shelf (``experiments.real_stretch_apartment_demo.demo``) is a 0.305m x 0.85m footprint centred at world (0.88, -0.17) with a -90 degree yaw, which rotates its outer footprint to world X in [0.455, 1.305] and world Y in [-0.3225, -0.0175]. These bounds add roughly 5cm of margin on every side of that footprint, since the height bound alone left the shelf's own case (side walls, the layer's front lip) and, without a lateral bound at all, the rest of the room in view as further untyped candidates. .. py:class:: AnalysisEngine Bases: :py:obj:`robokudo.analysis_engine.AnalysisEngineInterface` Query-driven tabletop localization for the Stretch. .. py:method:: name() -> str Get the name of the analysis engine. :return: The name identifier of this analysis engine .. py:method:: implementation() -> robokudo.pipeline.Pipeline Build the pipeline that answers a query with the poses of the objects in view. The pipeline waits for a query, reads a frame, isolates the dominant plane, treats what stands on it as objects, estimates a pose per object from its bounding box, and replies. :return: The configured pipeline for Stretch perception