Skip to content

Commit 7165549

Browse files
committed
tune prompt
1 parent 15f8bb1 commit 7165549

4 files changed

Lines changed: 108 additions & 38 deletions

File tree

data/.lfs/maps.tar.gz

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:6ab6a8a604c7674e8b1ba073bd5723f4a805fe36e78a9dc3fd17b2fce6ed6509
3-
size 9047989
2+
oid sha256:737e7730517c74b0426d3fa7e466a5cd38813468c2511b71cd3b1ab61ce9c6ac
3+
size 8169448

dimos/agents2/skills/interpret_map/OccupancyGridImage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ def _rotate_image_to_align_robot(
219219
rotation_matrix[1, 2] += (new_height - height) / 2
220220

221221
# Apply rotation
222-
rotated_image = cv2.warpAffine(image_arr, rotation_matrix, (new_width, new_height))
222+
rotated_image = cv2.warpAffine(
223+
image_arr, rotation_matrix, (new_width, new_height), borderValue=(127, 127, 127)
224+
)
223225

224226
return (
225227
rotated_image.astype(np.uint8),

dimos/agents2/skills/interpret_map/eval/test_map_eval.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,22 @@ def goal_placement_prompt(description: str, robot_pixel_coord: tuple[int, int])
191191
" - gray pixels represent unexplored space, \n"
192192
" - black pixels are obstacles and walls, \n"
193193
" - green circle represents the robot.\n"
194+
" - Note: The image may contain some noise or artifacts, ignore them and focus on clear structural patterns.\n"
195+
194196
"The image has been rotated so that the robot always faces straight upwards.\n"
195197
"- The robot's front is towards the of the image.\n"
196198
"- The robot's back is towards the bottom.\n"
197199
"- The robot's left is towards the left.\n"
198200
"- The robot's right is towards the right.\n"
201+
199202
f"Identify a location in free space based on the following description: {description}\n"
200203
f"Metadata - pixel coordinates of robot (x, y): {robot_pixel_coord}\n"
204+
201205
"Guildelines for identified location: \n"
202-
" - the point should be reacheable by the robot following a reasonable path through free space"
203-
" - never place the location on thick walls or obstacles."
206+
" - the point should be reacheable by the robot following a reasonable path through free space, it should not be surrounded by walls on all sides.\n"
207+
" - NEVER place the point on thick walls, obstacles or unexplored space.\n"
204208
" - maintain clearance of few pixels and find the nearest clear location that still matches the general direction and description.\n"
209+
205210
"Return ONLY a JSON object with this exact format:\n"
206211
'{"point": [x, y]}\n'
207212
f"where x,y are the pixel coordinates of the identified location in the image. \n"

dimos/agents2/skills/interpret_map/eval/test_map_interpretability.yaml

Lines changed: 96 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@ point_placement_tests:
66
position: [1018, 810, 0] # bottom center
77
orientation: [ 0, 0, 0.7372773, 0.6755902 ] # 95 deg
88
questions:
9-
- query: "which would be the furthest room from the robot's current position?"
10-
expected_range:
11-
x: [1300, 1509]
12-
y: [477, 859]
13-
- query: "go to the conference table in the office"
14-
expected_range:
15-
x: [42, 547]
16-
y: [15, 270]
17-
- query: "a room to accomodate more than 10 people"
9+
- query: "a room to accomodate more than 10 people" # fails
1810
expected_range:
1911
x: [34, 615]
2012
y: [12, 352]
21-
- query: "smallest room"
13+
- query: "smallest room" # fail: not the smallest room
2214
expected_range:
2315
x: [1290, 1510]
2416
y: [478, 861]
@@ -46,6 +38,14 @@ point_placement_tests:
4638
expected_range:
4739
x: [436, 516]
4840
y: [837, 909]
41+
- query: "the furthest room from the robot's current position?"
42+
expected_range:
43+
x: [1300, 1509]
44+
y: [477, 859]
45+
- query: "the conference table in the office"
46+
expected_range:
47+
x: [42, 547]
48+
y: [15, 270]
4949

5050
- map_id: "office_noise_pose2"
5151
image_path: "floorplan_office_noise.png"
@@ -54,73 +54,136 @@ point_placement_tests:
5454
position: [465, 930, 0] # bottom left
5555
orientation: [ 0, 0, 0, 1 ]
5656
questions:
57-
- query: "which would be the furthest room from the robot's current position?"
57+
- query: "the furthest room from the robot's current position?"
5858
expected_range:
5959
x: [1300, 1509]
6060
y: [477, 859]
61-
- query: "which would be the second room to the robot's left along the corridor?"
61+
- query: "the second room to the robot's left along the corridor?"
6262
expected_range:
6363
x: [30, 373]
6464
y: [665, 854]
6565

66+
- map_id: "office_noise_pose3"
67+
image_path: "floorplan_office_noise.png"
68+
resolution: 0.05
69+
robot_pose:
70+
position: [65, 610, 0] # left, inside room
71+
orientation: [ 0, 0, -0.7071068, 0.7071068 ] # 90 deg
72+
questions:
73+
- query: "the room's doorway to exit"
74+
expected_range:
75+
x: [1300, 1509]
76+
y: [477, 859]
77+
78+
- map_id: "office_small_noise_pose2"
79+
image_path: "floorplan_office_small_noise.png"
80+
resolution: 0.05
81+
robot_pose:
82+
position: [175, 340, 0] # top left, inside conf room
83+
orientation: [ 0, 0, 0, 1 ] # 175 deg
84+
questions:
85+
- query: "entrance of the current room" # fail - works without noise
86+
expected_range:
87+
x: [1300, 1509]
88+
y: [477, 859]
89+
90+
91+
- map_id: "office_noise_pose6"
92+
image_path: "floorplan_office_noise.png"
93+
resolution: 0.05
94+
robot_pose:
95+
position: [450, 980, 0] #
96+
orientation: [ 0, 0, 0, 1 ]
97+
questions:
98+
- query: "doorway to enter the nearest room" # mostly fails - even w/o noise
99+
expected_range:
100+
x: [1300, 1509]
101+
y: [477, 859]
102+
103+
- map_id: "office_noise_pose7"
104+
image_path: "floorplan_office_noise.png"
105+
resolution: 0.05
106+
robot_pose:
107+
position: [625, 760, 0] # center cubicles
108+
orientation: [ 0, 0, -0.7071068, 0.7071068 ]
109+
questions:
110+
- query: "entrance to the next cublicle ahead"
111+
expected_range:
112+
x: [1300, 1509]
113+
y: [477, 859]
114+
115+
- map_id: "office_noise_pose8"
116+
image_path: "floorplan_office_noise.png"
117+
resolution: 0.05
118+
robot_pose:
119+
position: [595, 820, 0] # top left, inside conf room
120+
orientation: [ 0, 0, -0.7071068, 0.7071068 ]
121+
questions:
122+
- query: "corner straight ahead"
123+
expected_range:
124+
x: [1300, 1509]
125+
y: [477, 859]
126+
127+
66128
- map_id: "office_noise_unknown_pose1"
67129
image_path: "floorplan_office_noise_unknown.png"
68130
resolution: 0.05
69131
robot_pose:
70132
position: [1018, 810, 0] # bottom center
71133
orientation: [ 0, 0, 0.7372773, 0.6755902 ] # 95 deg
72134
questions:
73-
- query: "which would be the furthest room from the robot's current position?"
135+
- query: "the furthest room from the robot's current position?" # fails, places on unexplored space
74136
expected_range:
75137
x: [1300, 1509]
76138
y: [477, 859]
77-
- query: "point to start exploring unmapped space"
139+
- query: "point to start exploring unmapped area"
78140
expected_range:
79141
x: [1300, 1509]
80142
y: [477, 859]
81143

82144

83145
# small office + noise
84146
- map_id: "office_small_noise_pose1"
85-
image_path: "floorplan_office_small_noise.png"
147+
image_path: "floorplan_office_small.png"
86148
resolution: 0.05
87149
robot_pose:
88150
position: [480, 270, 0.0]
89-
orientation: [ 0, 0, 0.7071068, 0.7071068 ] # 90 deg
151+
orientation: [ 0, 0, 0.6087614, 0.7933533 ] # 75 deg
90152
questions:
91-
- query: "which room would be the second room to the robot's left along the corridor?"
153+
- query: "the second room to the robot's left along the corridor?"
92154
expected_range:
93155
x: [144, 419]
94156
y: [314, 462]
95-
- query: "which would be the furthest room from the robot's current position"
157+
- query: "the furthest room from the robot's current position"
96158
expected_range:
97159
x: [5, 219]
98160
y: [15, 458]
99-
- query: "go to the largest room"
161+
- query: "the largest room"
100162
expected_range:
101163
x: [227, 518]
102164
y: [12, 238]
103-
- query: "a point in front of the robot"
165+
- query: "a point few meters ahead of the robot"
104166
expected_range:
105167
x: [372, 488]
106168
y: [234, 302]
107-
- query: "entrance of the top right room"
169+
- query: "doorway of the top right room" # fails - even without noise
108170
expected_range:
109171
x: [70, 164]
110172
y: [129, 222]
111-
- query: "a point on the robot"
112-
expected_range:
113-
x: [446, 532]
114-
y: [250, 292]
115-
- query: "a point behind the robot"
116-
expected_range:
117-
x: [400, 552]
118-
y: [908, 1009]
119-
- query: "a point to the left of the robot"
173+
174+
# large office + noise
175+
- map_id: "office_large"
176+
image_path: "floorplan_large.png"
177+
resolution: 0.05
178+
robot_pose:
179+
position: [900, 445, 0.0]
180+
orientation: [ 0, 0, 0, 1 ] # 65 deg
181+
questions:
182+
- query: "a space for seating more than 10 people"
120183
expected_range:
121-
x: [277, 451]
122-
y: [805, 1009]
123-
- query: "a point to the right of the robot"
184+
x: [450, 634]
185+
y: [804, 1013]
186+
- query: "main hallway"
124187
expected_range:
125188
x: [450, 634]
126189
y: [804, 1013]

0 commit comments

Comments
 (0)