ravens/tasks/defs_cables.py
def add_random_box(self, env):
        """Generate randomly shaped box, from aligning env."""
        box_size = self.random_size(0.05, 0.15, 0.05, 0.15, 0.01, 0.06)
        box_pose = self.random_pose(env, box_size)
        box_template = 'assets/box/box-template.urdf'
        box_urdf = self.fill_template(box_template, {'DIM': box_size})
        box_id = env.add_object(box_urdf, box_pose)
        os.remove(box_urdf)
        self.color_random_brown(box_id)
        self.object_points[box_id] = np.float32((0, 0, 0)).reshape(3, 1)
        self._IDs[box_id] = 'random_box'
        return box_id
Generate randomly shaped box, from aligning env.
Generate randomly shaped box, from aligning env.
Generate randomly shaped box from aligning env .
def add_random_box(self, env):
        box_size = self.random_size(0.05, 0.15, 0.05, 0.15, 0.01, 0.06)
        box_pose = self.random_pose(env, box_size)
        box_template = 'assets/box/box-template.urdf'
        box_urdf = self.fill_template(box_template, {'DIM': box_size})
        box_id = env.add_object(box_urdf, box_pose)
        os.remove(box_urdf)
        self.color_random_brown(box_id)
        self.object_points[box_id] = np.float32((0, 0, 0)).reshape(3, 1)
        self._IDs[box_id] = 'random_box'
        return box_id
def add_random_box ( self , env ) : box_size = self . random_size ( 0.05 , 0.15 , 0.05 , 0.15 , 0.01 , 0.06 ) box_pose = self . random_pose ( env , box_size ) box_template = 'assets/box/box-template.urdf' box_urdf = self . fill_template ( box_template , { 'DIM' : box_size } ) box_id = env . add_object ( box_urdf , box_pose ) os . remove ( box_urdf ) self . color_random_brown ( box_id ) self . object_points [ box_id ] = np . float32 ( ( 0 , 0 , 0 ) ) . reshape ( 3 , 1 ) self . _IDs [ box_id ] = 'random_box' return box_id
Generate randomly shaped box, from aligning env.
Generate randomly shaped box from aligning env .
"""Generate randomly shaped box, from aligning env."""
self
env