uzh-rpg / agile_flight

Developing and Comparing Vision-based Algorithms for Vision-based Agile Flight
MIT License
142 stars 54 forks source link

reset env? #35

Closed ngthanhtin closed 2 years ago

ngthanhtin commented 2 years ago

Hi I initialized the env as following:

      self.num_envs = self.env_sim_config["simulation"]["num_envs"]
      # load the Unity standardalone, make sure you have downloaded it.
      os.system(os.environ["FLIGHTMARE_PATH"] + "/flightrender/RPG_Flightmare.x86_64 &")
      self.env = VisionEnv_v1(dump(self.env_sim_config, Dumper=RoundTripDumper), False)
      self.env = wrapper.FlightEnvVec(self.env)
      self.env.reset(random=True)

For example, the num_envs is 4 meaning that I have 4 envs. So if when an env is done (done=True), how can I reset just this env.

Thanks.

yun-long commented 2 years ago

hi, the reset is done inside the vision_vec_env.cpp file.

here