File size: 6,336 Bytes
5a4cd7b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import json
import os
from collections import defaultdict

object_type_list = ['AlarmClock', 'AluminumFoil', 'Apple', 'AppleSliced', 'ArmChair', 'BaseballBat', 'BasketBall',
                    'Bathtub', 'BathtubBasin', 'Bed',
                    'Blinds', 'Book', 'Boots', 'Bottle', 'Bowl', 'Box', 'Bread', 'BreadSliced', 'ButterKnife',
                    'Cabinet',
                    'Candle', 'CD', 'CellPhone', 'Chair', 'Cloth', 'CoffeeMachine', 'CoffeeTable', 'CounterTop',
                    'CreditCard', 'Cup',
                    'Curtains', 'Desk', 'DeskLamp', 'Desktop', 'DiningTable', 'DishSponge', 'DogBed', 'Drawer',
                    'Dresser', 'Dumbbell',
                    'Egg', 'EggCracked', 'Faucet', 'Floor', 'FloorLamp', 'Footstool', 'Fork', 'Fridge', 'GarbageBag',
                    'GarbageCan',
                    'HandTowel', 'HandTowelHolder', 'HousePlant', 'Kettle', 'KeyChain', 'Knife', 'Ladle', 'Laptop',
                    'LaundryHamper', 'Lettuce',
                    'LettuceSliced', 'LightSwitch', 'Microwave', 'Mirror', 'Mug', 'Newspaper', 'Ottoman', 'Painting',
                    'Pan', 'PaperTowelRoll',
                    'Pen', 'Pencil', 'PepperShaker', 'Pillow', 'Plate', 'Plunger', 'Poster', 'Pot', 'Potato',
                    'PotatoSliced',
                    'RemoteControl', 'RoomDecor', 'Safe', 'SaltShaker', 'ScrubBrush', 'Shelf', 'ShelvingUnit',
                    'ShowerCurtain', 'ShowerDoor', 'ShowerGlass',
                    'ShowerHead', 'SideTable', 'Sink', 'SinkBasin', 'SoapBar', 'SoapBottle', 'Sofa', 'Spatula', 'Spoon',
                    'SprayBottle',
                    'Statue', 'Stool', 'StoveBurner', 'StoveKnob', 'TableTopDecor', 'TargetCircle', 'TeddyBear',
                    'Television', 'TennisRacket', 'TissueBox',
                    'Toaster', 'Toilet', 'ToiletPaper', 'ToiletPaperHanger', 'Tomato', 'TomatoSliced', 'Towel',
                    'TowelHolder', 'TVStand', 'VacuumCleaner',
                    'Vase', 'Watch', 'WateringCan', 'Window', 'WineBottle']

pickupable_object_list = ['AlarmClock', 'AluminumFoil', 'Apple', 'AppleSliced', 'BaseballBat',
                          'BasketBall', 'Book', 'Boots', 'Bottle', 'Bowl', 'Box', 'Bread',
                          'BreadSliced', 'ButterKnife', 'Candle', 'CD', 'CellPhone', 'Cloth',
                          'CreditCard', 'Cup', 'DishSponge', 'Dumbbell', 'Egg', 'EggCracked',
                          'Fork', 'HandTowel', 'Kettle', 'KeyChain', 'Knife', 'Ladle', 'Laptop',
                          'Lettuce', 'LettuceSliced', 'Mug', 'Newspaper', 'Pan', 'PaperTowelRoll',
                          'Pen', 'Pencil', 'PepperShaker', 'Pillow', 'Plate', 'Plunger', 'Pot', 'Potato',
                          'PotatoSliced', 'RemoteControl', 'SaltShaker', 'ScrubBrush', 'SoapBar', 'SoapBottle',
                          'Spatula', 'Spoon', 'SprayBottle', 'Statue', 'TableTopDecor', 'TeddyBear', 'TennisRacket',
                          'TissueBox', 'ToiletPaper', 'Tomato', 'TomatoSliced', 'Towel', 'Vase', 'Watch', 'WateringCan',
                          'WineBottle']

receptacle_list = ['ArmChair', 'Bathtub', 'BathtubBasin', 'Bed', 'Bowl', 'Box', 'Cabinet', 'Chair', 'CoffeeMachine',
                   'CoffeeTable',
                   'CounterTop', 'Cup', 'Desk', 'DiningTable', 'Drawer', 'Dresser', 'Fridge', 'GarbageCan',
                   'HandTowelHolder',
                   'LaundryHamper', 'Microwave', 'Mug', 'Ottoman', 'Pan', 'Plate', 'Pot', 'Safe', 'Shelf', 'SideTable',
                   'Sink',
                   'SinkBasin', 'Sofa', 'StoveBurner', 'Toaster', 'Toilet', 'ToiletPaperHanger', 'TowelHolder',
                   'TVStand']

RoomList = [
    'Kitchen', 'Bathroom', 'LivingRoom', 'Bedroom'
]

HomerActivities = [
    "brushing_teeth",
    "showering",
    "breakfast",
    "dinner",
    "computer_work",
    "lunch",
    "cleaning",
    "laundry",
    "leave_home",
    "come_home",
    "socializing",
    "taking_medication",
    "watching_tv",
    "vacuum_cleaning",
    "reading",
    "going_to_the_bathroom",
    "getting_dressed",
    'kitchen_cleaning',
    "take_out_trash",
    "wash_dishes",
    "playing_music",
    "listening_to_music"
]

CustomActivitiesV1 = [
    "brushing teeth",
    "showering",
    "breakfast",
    "dinner",
    "computer work",
    "lunch",
    "cleaning the floor",
    "tidying up dinning table",
    "laundry",
    "socializing",
    "taking medication",
    "watching tv",
    "vacuum cleaning",
    "reading",
    "going to the bathroom",
    "getting dressed",
    'kitchen cleaning',
    "take out trash",
    "wash dishes",
    "playing music",
    "listening to music"
]

CustomActivitiesV2 = [
    "brushing teeth",
    "taking a shower",
    "having breakfast",
    "having dinner",
    "doing computer work",
    "having lunch",
    "cleaning the floor",
    "tidying up dinning table",
    "doing laundry",
    "socializing",
    "taking medication",
    "watching tv",
    "doing vacuum cleaning",
    "reading books",
    "going to the bathroom",
    "getting dressed",
    'cleaning kitchen',
    "taking out trash",
    "washing dishes",
    "playing music",
    "listening to music"
]

DLC_V1 = [
    "watering plants",
    "preparing meals",
    "exercising",
    "taking a nap",
    "checking e-mail",
    "meditating",
    "making coffee",
    "doing home repairs",
    "gardening",
    "ironing clothes",
    "making the bed",
    "studying",
    "placing groceries",
    "writing in a journal"
]

SpecialEvents = [
    'leave home',
    'come home'
]

data_root = os.path.dirname(__file__)

receptacle_stat = json.load(open(os.path.join(data_root, 'stats', 'receptacle_statistic.json'), 'r', encoding='utf-8'))
room_to_receptacle = defaultdict(list)

for receptacle, stat in receptacle_stat['receptacle_in_room_count']['immoveable_receptacle'].items():
    for room, count in stat.items():
        if count > 0:
            room_to_receptacle[room].append(receptacle)

room_to_receptacle_str = ''
for room, receptacles in room_to_receptacle.items():
    room_to_receptacle_str += f'{room}: {", ".join(receptacles)}\n'

object_stat = json.load(open(os.path.join(data_root, 'stats', 'object_statistic.json'), 'r', encoding='utf-8'))
appeared_objects = list(object_stat['count'].keys())