Exemple #1
0
 def set_origin(self, offset):
     """Applies a constant offset to all objects."""
     offset = np.array(offset)
     for node in self.worldbody.findall("./*[@pos]"):
         cur_pos = string_to_array(node.get("pos"))
         new_pos = cur_pos + offset
         node.set("pos", array_to_string(new_pos))
Exemple #2
0
 def bin_abs(self):
     """Returns the absolute position of table top"""
     return string_to_array(self.bin1_body.get("pos"))
Exemple #3
0
 def table_top_abs(self):
     """
     Returns the absolute position of table top.
     """
     return string_to_array(self.table_body.get("pos"))
Exemple #4
0
 def table_top_abs(self):
     """Returns the absolute position of table top"""
     table_height = np.array([0, 0, self.table_full_size[2]])
     return string_to_array(self.floor.get("pos")) + table_height
Exemple #5
0
 def get_horizontal_radius(self):
     horizontal_radius_site = self.worldbody.find(
         "./body/site[@name='horizontal_radius_site']")
     return string_to_array(horizontal_radius_site.get("pos"))[0]
Exemple #6
0
 def get_top_offset(self):
     top_site = self.worldbody.find("./body/site[@name='top_site']")
     return string_to_array(top_site.get("pos"))
Exemple #7
0
 def get_bottom_offset(self):
     bottom_site = self.worldbody.find("./body/site[@name='bottom_site']")
     return string_to_array(bottom_site.get("pos"))