From c3b243b4176558375e633d90a93a8a49f186f272 Mon Sep 17 00:00:00 2001 From: Nishanth Kumar Date: Wed, 30 Oct 2024 17:41:04 -0400 Subject: [PATCH] adds set-of-marks labels for knobs --- predicators/envs/kitchen.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/predicators/envs/kitchen.py b/predicators/envs/kitchen.py index bab273fb34..731e987dc1 100644 --- a/predicators/envs/kitchen.py +++ b/predicators/envs/kitchen.py @@ -209,6 +209,14 @@ def render(self, burner3_position = (260, 250) burner4_text = "burner4" burner4_position = (185, 260) + knob1_text = "knob1" + knob1_position = (260, 155) + knob2_text = "knob2" + knob2_position = (160, 170) + knob3_text = "knob3" + knob3_position = (260, 125) + knob4_text = "knob4" + knob4_position = (160, 125) burner1_img = utils.add_text_to_draw_img(draw, burner1_position, burner1_text, font) burner2_img = utils.add_text_to_draw_img(burner1_img, @@ -217,8 +225,16 @@ def render(self, burner3_img = utils.add_text_to_draw_img(burner2_img, burner3_position, burner3_text, font) - _ = utils.add_text_to_draw_img(burner3_img, burner4_position, + burner4_img = utils.add_text_to_draw_img(burner3_img, burner4_position, burner4_text, font) + knob1_img = utils.add_text_to_draw_img(burner4_img, knob1_position, + knob1_text, font) + knob2_img = utils.add_text_to_draw_img(knob1_img, knob2_position, + knob2_text, font) + knob3_img = utils.add_text_to_draw_img(knob2_img, knob3_position, + knob3_text, font) + _ = utils.add_text_to_draw_img(knob3_img, knob4_position, + knob4_text, font) curr_img_arr = np.array(curr_img_pil) return [curr_img_arr]