IMPROVE: 增加目标状态数据,删除非holding谓词的nothing
This commit is contained in:
parent
a012fabf6d
commit
6adc7c750e
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
Object = ['Softdrink', 'BottledDrink', 'Yogurt', 'ADMilk', 'MilkDrink', 'Milk', 'VacuumCup', 'Nothing']
|
Object = ['Softdrink', 'BottledDrink', 'Yogurt', 'ADMilk', 'MilkDrink', 'Milk', 'VacuumCup']
|
||||||
|
|
||||||
Cookable = ['Coffee', 'Water', 'Dessert']
|
Cookable = ['Coffee', 'Water', 'Dessert']
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ Place = ['Bar', 'WaterTable', 'CoffeeTable', 'Bar2', 'Table1', 'Table2', 'Table3
|
||||||
|
|
||||||
Entity = ['Robot', 'Customer']
|
Entity = ['Robot', 'Customer']
|
||||||
|
|
||||||
Operable = ['AC', 'ACTemperature', 'HallLight', 'TubeLight', 'Curtain']
|
Operable = ['AC', 'ACTemperature', 'HallLight', 'TubeLight', 'Curtain', 'Chairs', 'Floor', 'Table']
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ def generate_goal_states(vln_num: int, vlm_num: int, opentask_num: int):
|
||||||
|
|
||||||
|
|
||||||
def enumerate_goal_states(total: int):
|
def enumerate_goal_states(total: int):
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
|
|
||||||
point_15 = int(total * .15)
|
point_15 = int(total * .15)
|
||||||
|
@ -131,7 +130,7 @@ def enumerate_goal_states(total: int):
|
||||||
res += list_vlm_2
|
res += list_vlm_2
|
||||||
|
|
||||||
# goal states for VLM-3, 0.1
|
# goal states for VLM-3, 0.1
|
||||||
count_vlm_3, list_vlm_3 = enumerate_predict(Object, None, 'hold')
|
count_vlm_3, list_vlm_3 = enumerate_predict(Object + ['Nothing'], None, 'hold')
|
||||||
list_vlm_3 = ['{%s}' % i for i in list_vlm_3]
|
list_vlm_3 = ['{%s}' % i for i in list_vlm_3]
|
||||||
if count_vlm_3 < point_10:
|
if count_vlm_3 < point_10:
|
||||||
list_vlm_3 *= point_10 // count_vlm_3
|
list_vlm_3 *= point_10 // count_vlm_3
|
||||||
|
@ -208,8 +207,12 @@ def enumerate_goal_states(total: int):
|
||||||
elif 'Is' in i and ('AC' in i or 'HallLight' in i or 'TubeLight' in i or 'Curtain' in i):
|
elif 'Is' in i and ('AC' in i or 'HallLight' in i or 'TubeLight' in i or 'Curtain' in i):
|
||||||
i = re.sub('0', 'Off', i)
|
i = re.sub('0', 'Off', i)
|
||||||
i = re.sub('1', 'On', i)
|
i = re.sub('1', 'On', i)
|
||||||
|
elif 'Is' in i and ('Chairs' in i or 'Floor' in i or 'Table' in i):
|
||||||
|
i = re.sub('0', 'Dirty', i)
|
||||||
|
i = re.sub('1', 'Clean', i)
|
||||||
|
|
||||||
file.write(i + '\n')
|
file.write(i + '\n')
|
||||||
|
|
||||||
|
|
||||||
# generate_goal_states(30, 6, 6)
|
# generate_goal_states(30, 6, 6)
|
||||||
enumerate_goal_states(5000)
|
enumerate_goal_states(5000)
|
||||||
|
|
1460
sub_task.ptml
1460
sub_task.ptml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue