habitat.core.utils module

Classes

class DatasetFloatJSONEncoder
JSON Encoder that sets a float precision for a space saving purpose and encodes ndarray and quaternion. The encoder is compatible with JSON version 2.0.9.
class DatasetJSONEncoder
class Singleton

Functions

def center_crop(obs, new_shape)
def not_none_validator(self: typing.Any, attribute: attr._make.Attribute, value: typing.Optional[typing.Any]) -> None
def tile_images(images: typing.List[numpy.ndarray]) -> numpy.ndarray
Tile multiple images into single image
def try_cv2_import()
The PyRobot python3 version which is a dependency of Habitat-PyRobot integration relies on ROS running in python2.7. In order to import cv2 in python3 we need to remove the python2.7 path from sys.path. To use the Habitat-PyRobot integration the user needs to export environment variable ROS_PATH which will look something like: /opt/ros/kinetic/lib/python2.7/dist-packages

Function documentation

def habitat.core.utils.tile_images(images: typing.List[numpy.ndarray]) -> numpy.ndarray

Tile multiple images into single image

Args:
images: list of images where each image has dimension
(height x width x channels)
Returns:
tiled image (new_height x width x channels)