VisualNavigation--3D 环境 ai2thor keyboard

import ai2thor
from ai2thor.controller import Controller


def ai2thor_attr_print(ai2thor_display=False):
    if ai2thor_display:
        print(ai2thor)
        # < module 'ai2thor'>
        print(dir(ai2thor))
        # ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__',
        # '__spec__', '__version__', '_builds', '_quality_settings', '_version', 'controller', 'docker',
        # 'downloader', 'interact', 'server', 'util']
        print(len(dir(ai2thor)))
        # 19

        help(ai2thor)


def ai2thor_controller_attr_print(ai2thor_controller_display=False):
    if ai2thor_controller_display:
        print(ai2thor.controller)
        # <module 'ai2thor.controller'>
        print(dir(ai2thor.controller))
        # ['BFSController', 'BFSSearchPoint', 'BUILDS', 'Controller', 'DEFAULT_QUALITY', 'DefaultActions',
        # 'DepthFormat', 'InteractiveControllerPrompt', 'QUALITY_SETTINGS', 'Queue', 'RECEPTACLE_OBJECTS',
        # '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__',
        # 'ai2thor', 'atexit', 'copy', 'defaultdict', 'deque', 'distance', 'fcntl', 'get_term_character', 'io',
        # 'json', 'key_for_point', 'logger', 'logging', 'makedirs', 'math', 'np', 'os', 'platform', 'process_alive',
        # 'product', 'queue_get', 'random', 're', 'shlex', 'shutil', 'signal', 'subprocess', 'sys', 'termios',
        # 'threading', 'time', 'tty', 'uuid', 'zipfile']
        print(len(dir(ai2thor.controller)))
        # 53

        # which objects could be placed in a receptacle
        # print(ai2thor.controller.RECEPTACLE_OBJECTS)

        help(ai2thor.controller)


def Controller_attr_print(Controller_display=False):
    if Controller_display:
        print(Controller)
        # <class 'ai2thor.controller.Controller'>
        print(dir(Controller))
        # '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__',
        # '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__',
        # '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
        # '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_start_server_thread',
        # '_start_unity_thread', 'base_dir', 'build_name', 'build_url', 'check_docker', 'check_x_display',
        # 'download_binary', 'executable_path', 'interact', 'lock_release', 'multi_step_physics',
        # 'next_interact_command', 'prune_releases', 'random_initialize', 'releases_dir', 'reset', 'robothor_scenes',
        # 'scene_names', 'scenes_in_build', 'start', 'step', 'stop', 'stop_container', 'stop_unity', 'unity_command',
        # 'unlock_release']
        print(len(dir(Controller)))
        # 55

        # print([e for e in dir(Controller) if not e.startswith('_')])

        help(Controller)
        # Controller(quality='Ultra', fullscreen=False, headless=False, port=0, start_unity=True,
        # local_executable_path=None, width=300, height=300, x_display=None, host='127.0.0.1',
        # scene='FloorPlan_Train1_1', image_dir='.', save_image_per_frame=False, docker_enabled=False,
        # depth_format=<DepthFormat.Meters: (0,)>, add_depth_noise=False, download_only=False,
        # **unity_initialization_parameters)


def event_data_print(event_display=False):
    global event
    if event_display:
        # print(event)
        print(dir(event))
        # ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__',
        # '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__',
        # '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
        # '__str__', '__subclasshook__', '__weakref__', '_image_depth', 'add_image', 'add_image_classes',
        # 'add_image_depth', 'add_image_depth_robot', 'add_image_flows', 'add_image_ids', 'add_image_normals',
        # 'add_third_party_camera_image', 'add_third_party_image_classes', 'add_third_party_image_depth',
        # 'add_third_party_image_flows', 'add_third_party_image_ids', 'add_third_party_image_normals',
        # 'class_detections2D', 'class_masks', 'class_segmentation_frame', 'color_to_object_id', 'cv2image',
        # 'cv2img', 'depth_frame', 'events', 'flow_frame', 'frame', 'get_object', 'image_data',
        # 'instance_detections2D', 'instance_masks', 'instance_segmentation_frame', 'metadata', 'normals_frame',
        # 'object_id_to_color', 'objects_by_type', 'pose', 'pose_discrete', 'process_colors', 'process_colors_ids',
        # 'process_visible_bounds2D', 'screen_height', 'screen_width', 'third_party_camera_frames',
        # 'third_party_class_segmentation_frames', 'third_party_depth_frames', 'third_party_flows_frames',
        # 'third_party_instance_segmentation_frames', 'third_party_normals_frames']
        print(len(dir(event)))
        # 72

        # event.metadata
        print(type(event.metadata))
        # <class 'dict'>
        print(event.metadata)
        print(even
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值