def reconfigure(self, agent_config: AgentConfiguration, reconfigure_sensors: bool = True): r"""Re-create the agent with a new configuration Args: agent_config (AgentConfiguration): New config reconfigure_sensors (bool): Whether or not to also reconfigure the sensors, there are specific cases where false makes sense, but most cases are covered by true """ habitat_sim.errors.assert_obj_valid(self.body) self.agent_config = agent_config if reconfigure_sensors: self.sensors.clear() for spec in self.agent_config.sensor_specifications: self.sensors.add( hsim.PinholeCamera(self.scene_node.create_child(), spec))
def reconfigure(self, agent_config: AgentConfiguration, reconfigure_sensors: bool = True): r"""Re-create the agent with a new configuration :param agent_config: New config :param reconfigure_sensors: Whether or not to also reconfigure the sensors. There are specific cases where :py:`False` makes sense, but most cases are covered by :py:`True`. """ habitat_sim.errors.assert_obj_valid(self.body) self.agent_config = agent_config if reconfigure_sensors: self._sensors.clear() for spec in self.agent_config.sensor_specifications: self._sensors.add( hsim.PinholeCamera(self.scene_node.create_child(), spec))
def reconfigure(self, agent_config: AgentConfiguration, reconfigure_sensors: bool = True): r"""Re-create the agent with a new configuration Args: agent_config (AgentConfiguration): New config reconfigure_sensors (bool): Whether or not to also reconfigure the sensors, there are specific cases where false makes sense, but most cases are covered by true """ self.agent_config = agent_config if reconfigure_sensors: self.sensors.clear() for spec in self.agent_config.sensor_specifications: self.sensors.add(hsim.PinholeCamera(spec)) if self.body.is_valid: for _, v in self.sensors.items(): v.attach(self.scene_node.create_child())