Пример #1
0
    def declare_forwards(_p):
        p = {'publisher': [ Forward('topic_name', new_key='namespace') ]}

        i = {'colorizer': [ Forward('input', new_key='pointcloud'),
                            Forward('clusters', new_key='input')]}
        o = {}

        return (p, i, o)
Пример #2
0
    def declare_forwards(_p):
        i = {
            'cluster_drawer': [Forward('clusters2d')],
            'plane_drawer': [Forward('image'),
                             Forward('masks', 'plane_mask')]
        }

        return ({}, i, {})
Пример #3
0
    def declare_forwards(cls, _p):
        p = {'json_db': [Forward('value', 'json_db')],
             'object_id': [Forward('value', 'object_id')],
             'trainer': 'all'}
        i = {}
        o = {}

        return (p, i, o)
Пример #4
0
 def declare_forwards(cls, p):
     p = {
         'gen':
         [Forward(key='step'),
          Forward(key='amount', new_key='amount1')],
         'inc': [Forward(key='amount', new_key='amount2')]
     }
     i = {}
     o = {'inc': [Forward(key='out', new_key='value', new_doc='New docs')]}
     return (p, i, o)
Пример #5
0
    def declare_forwards(p_in):
        p, i, o = BaseSource.declare_forwards(p_in)
        p['source'] = [Forward('bag', 'bag', "The bag file name.", "data.bag")]

        o['source'] = [
            Forward('image', 'image_message'),
            Forward('depth', 'depth_message'),
            Forward('image_info', 'image_info_message'),
            Forward('depth_info', 'depth_info_message')
        ]

        return (p, i, o)
Пример #6
0
    def declare_forwards(p_in):
        p, i, o = BaseSource.declare_forwards(p_in)

        #notice that this is not a forward declare
        #its a declaration with the name, and a pointer to a tendril.
        o['source'] = o.get('source', []) + [
            Forward('image', 'image_message'),
            Forward('depth', 'depth_message'),
            Forward('image_info', 'image_info_message'),
            Forward('depth_info', 'depth_info_message')
        ]

        return (p, i, o)
Пример #7
0
    def declare_forwards(self, _p):
        p = {'detector': 'all'}
        i = {
            'detector': [Forward('image'),
                         Forward('depth'),
                         Forward('K')],
            'mat_to_cloud': [Forward('points', 'points3d')]
        }
        o = {
            'detector': 'all',
            'mat_to_cloud': [Forward('point_cloud', 'cloud_out')]
        }

        return (p, i, o)
Пример #8
0
    def declare_forwards(p):
        p = {'clusterer': 'all', 'table_detector': 'all'}

        i = {'passthrough': 'all'}

        o = {
            'clusterer': [Forward('clusters2d'),
                          Forward('clusters3d')],
            'table_detector':
            [Forward('clouds_hull'),
             Forward('table_coefficients')],
            'table_pose': [Forward('pose_results')]
        }

        return (p, i, o)
Пример #9
0
    def declare_forwards(_p):
        p = {
            'pc_publisher': [
                Forward('topic_name', 'tabletop_cluster_topic',
                        'The ROS topic to use for the PointCloud2 message.',
                        'tabletop_cluster')
            ]
        }

        i = {
            'cluster_converter': [Forward('clusters3d')],
            'passthrough': [Forward('image_message'),
                            Forward('pose_results')]
        }

        return (p, i, {})
Пример #10
0
    def declare_forwards(p):
        p = { }

        i = { }

        o = {'detector_': [Forward('pose_results')]
            }

        return (p,i,o) 
Пример #11
0
    def declare_forwards(_p):
        p = {'marker_array_hulls': [Forward('topic_name', 'marker_hull_topic',
                                           'The ROS topic to use for the table message.', 'marker_table_hulls')],
             'marker_array_origins': [Forward('topic_name', 'marker_origin_topic',
                                             'The ROS topic to use for the table message.', 'marker_table_origins')],
             'marker_array_tables': [Forward('topic_name', 'marker_table_topic',
                                            'The ROS topic to use for the table message.', 'marker_tables')],
             'marker_array_clusters': [Forward('topic_name', 'marker_array_clusters',
                                               'The ROS topic to use for the markers of the clusters.',
                                               'marker_array_clusters')],
             'table_array': [Forward('topic_name', 'table_array', 'The array of found tables.', 'table_array')]
             }

        i = {'table_msg_assembler': [Forward('clouds_hull')],
             'table_visualization_msg_assembler': [Forward('clusters3d'), Forward('table_array_msg')],
             'passthrough': [Forward('image_message'), Forward('pose_results')]}

        return (p,i,{})
Пример #12
0
    def declare_forwards(p):
        cell_types = FeatureDescriptor._figure_out_cell_types(p)

        # everybody needs an image
        if cell_types['feature_descriptor_cell'] is None:
            i = {
                'image_passthrough': [Forward('in', 'image')],
                'mask_passthrough': [Forward('in', 'mask')]
            }

            if 'depth' in cell_types['feature_cell'].inputs.keys():
                i['feature_cell'] = [Forward('depth')]

            o = {
                'feature_cell': Forward('keypoints'),
                'descriptor_cell': Forward('descriptors')
            }
        else:
            # deal with the combo case
            i = {'feature_descriptor_cell': 'all'}
            o = {'feature_descriptor_cell': 'all'}

        return ({}, i, o)
Пример #13
0
    def declare_forwards(_p):
        """
        Implement the virtual function from the base class
        """
        # we forward the start parameter of the cells 'i2' but the user will
        # see it as 'start2'
        p = {'i2': [Forward('start', new_key='start2', new_default=20)]}

        # there are no inputs to expose to the user
        i = {}

        # we forward all the outputs from add to the user
        o = {'add': 'all'}

        return (p, i, o)
    def declare_forwards(_p):
        """
        Implement the virtual function from the base class
        """
        p = {
            'throttle': [Forward('n', new_key='every_n')],
            'mat2image': 'all',
            'publisher': 'all',
        }

        i = {'mat2image': 'all'}

        o = {
            'throttled_publisher': 'all'  # has_subscribers
        }

        return (p, i, o)
Пример #15
0
    def declare_forwards(_p):
        #inputs
        i = {
            'gray_image': [Forward('in', 'image')],
            'rgb_image': [Forward('in', 'color_image')],
            'camera_info': [Forward('in', 'K_image')]
        }

        #outputs
        o = {
            'pose_calc': [Forward('R'), Forward('T')],
            'gather': [Forward('found')],
            'fps': [Forward('image', 'debug_image')]
        }

        return ({}, i, o)
Пример #16
0
    def declare_forwards(_p):
        p = {'crop_box': 'all'}
        p['image'] = [
            Forward('topic_name', 'rgb_image_topic',
                    'The ROS topic for the RGB image.',
                    '/camera/rgb/image_color')
        ]
        p['image_info'] = [
            Forward('topic_name', 'rgb_camera_info',
                    'The ROS topic for the RGB camera info.',
                    '/camera/rgb/camera_info')
        ]
        p['depth'] = [
            Forward('topic_name', 'depth_image_topic',
                    'The ROS topic for the depth image.',
                    '/camera/depth_registered/image_raw')
        ]
        p['depth_info'] = [
            Forward('topic_name', 'depth_camera_info',
                    'The ROS topic for the depth camera info.',
                    '/camera/depth_registered/camera_info')
        ]

        i = {}
        o = {
            'camera_info_image': [
                Forward('K', 'K_image',
                        'The camera intrinsics matrix of the image camera.')
            ],
            'depth_map': [
                Forward('K', 'K_depth',
                        'The camera intrinsics matrix of the depth camera.')
            ],
            'crop_box': [
                Forward('rgb', 'image', 'The RGB image from a OpenNI device.'),
                Forward(
                    'depth',
                    new_doc=
                    'The depth map from a OpenNI device. This is a CV_32FC1, with values in meters.'
                ),
                Forward('points3d'),
                Forward('mask')
            ]
        }
        if HAS_PCL:
            o['cloud'] = [Forward('point_cloud')]
        return (p, i, o)
Пример #17
0
    def declare_forwards(_p):
        p = {'publisher': [ Forward('topic_name', new_key='namespace') ]}
        i = {'convert2msg': [ Forward('input', new_key='input')]}
        o = {}

        return (p, i, o)
Пример #18
0
    def declare_forwards(cls, params):
        p = {'gen': 'all', 'inc': [Forward(key='amount')]}
        i = {}
        o = {'inc': [Forward(key='out', new_key='value', new_doc='New docs')]}

        return (p, i, o)
Пример #19
0
 def declare_forwards(_p):
     p = {}
     i = {'msg_assembler': [Forward('clusters3d'), Forward('image_message')],
          'passthrough': [Forward('pose_results')]}
     o = {}
     return (p,i,o)
Пример #20
0
 def declare_forwards(_p):
     return ({}, {'image_converter': [Forward('image')]}, {})