本文整理汇总了Python中src.map_utils.make_map方法的典型用法代码示例。如果您正苦于以下问题:Python map_utils.make_map方法的具体用法?Python map_utils.make_map怎么用?Python map_utils.make_map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.map_utils
的用法示例。
在下文中一共展示了map_utils.make_map方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from src import map_utils [as 别名]
# 或者: from src.map_utils import make_map [as 别名]
def __init__(self, building_name, robot, env,
category_list=None, small=False, flip=False, logdir=None,
building_loader=None):
self.restrict_to_largest_cc = True
self.robot = robot
self.env = env
self.logdir = logdir
# Load the building meta data.
building = building_loader.load_building(building_name)
if small:
building['mesh_names'] = building['mesh_names'][:5]
# New code.
shapess = building_loader.load_building_meshes(building)
if flip:
for shapes in shapess:
shapes.flip_shape()
vs = []
for shapes in shapess:
vs.append(shapes.get_vertices()[0])
vs = np.concatenate(vs, axis=0)
map = make_map(env.padding, env.resolution, vertex=vs, sc=100.)
map = compute_traversibility(
map, robot.base, robot.height, robot.radius, env.valid_min,
env.valid_max, env.num_point_threshold, shapess=shapess, sc=100.,
n_samples_per_face=env.n_samples_per_face)
room_dims = _get_room_dimensions(building['room_dimension_file'],
env.resolution, map.origin, flip=flip)
class_maps, class_map_names = _get_semantic_maps(
building['class_map_folder'], building_name, map, flip)
self.class_maps = class_maps
self.class_map_names = class_map_names
self.building = building
self.shapess = shapess
self.map = map
self.traversible = map.traversible*1
self.building_name = building_name
self.room_dims = room_dims
self.flipped = flip
self.renderer_entitiy_ids = []
if self.restrict_to_largest_cc:
self.traversible = pick_largest_cc(self.traversible)