blenderproc.python.sampler.ReplicaPointInRoomSampler module

Allows the sampling in Replica scenes

class blenderproc.python.sampler.ReplicaPointInRoomSampler.ReplicaPointInRoomSampler(room_bounding_box, replica_floor, height_list_file_path)[source]

Bases: object

Allows the sampling in Replica scenes

sample(height, max_tries=1000)[source]

Samples a point inside one of the loaded replica rooms.

The points are uniformly sampled along x/y over all rooms. The z-coordinate is set based on the given height value.

Parameters:
  • height (float) – The height above the floor to use for the z-component of the point.

  • max_tries (int) – The maximum number of times sampling above the floor should be tried.

Return type:

ndarray

Returns:

The sampled point.