diff --git a/CHANGELOG.md b/CHANGELOG.md index dea8c02..d8c6ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Resolve [iss7](https://github.com/mit-ll/spacegym-kspdg/issues/7) by switching print statements to logger statements in lbg1_base.py + ### Changed -- Conda environment is no longer pinned to python 3.9 due to removal of poliastro dependency +- Conda environment is no longer pinned to python 3.9 due to removal of poliastro dependency. This will cause the most recent python version (currently 3.12) to be used when creating the environment +- `evaluate.pyc` script has been replaced by python-version-specific binaries `evaluate.cpython-39.pyc` (for python 3.9) and `evaluate.cpython-312.pyc` (for python 3.12). This is to avoid a `RuntimeError: Bad magic number in .pyc file` when trying to run evaluate.pyc from the wrong python version ### Removed - poliastro dependency and related functions in `utils.py`. This removes functions for propagating orbits which were used for non-essential metric evals. For further justification, see [this issue](https://github.com/mit-ll/spacegym-kspdg/issues/8) +- `utils.estimate_capture_dv` and related unit tests which depended upon poliastro +- `utils.solve_lambert` and related unit tests which depended upon poliastro +- `utils.propagate_orbit_tof` and related unit tests which depended upon poliastro ## [v0.1.0] - 2023-10-23 diff --git a/src/kspdg/lbg1/lbg1_base.py b/src/kspdg/lbg1/lbg1_base.py index 9d07fa6..9e2f9fa 100644 --- a/src/kspdg/lbg1/lbg1_base.py +++ b/src/kspdg/lbg1/lbg1_base.py @@ -214,13 +214,13 @@ def _reset_vessels(self): # Set the bandit as the the active (i.e. human-controlled) vessel # and target lady - print("Changing active vehicle to Bandit and setting target to Lady...") + self.logger.info("Changing active vehicle to Bandit and setting target to Lady...") self.conn.space_center.active_vessel = self.vesBandit self.conn.space_center.target_vessel = self.vesLady time.sleep(0.5) # give time to re-orient # orient bandit in target-pointing direction - print("Activating Bandit SAS, RCS and orienting to Lady...") + self.logger.info("Activating Bandit SAS, RCS and orienting to Lady...") self.vesBandit.control.sas = True time.sleep(0.1) # give time to re-orient self.vesBandit.control.sas_mode = self.vesBandit.control.sas_mode.target @@ -517,21 +517,21 @@ def enforce_episode_termination(self): d_vesL_vesB = self.get_lb_relative_distance() is_lady_captured = d_vesL_vesB < self.lady_capture_dist if is_lady_captured: - print("\n~~~SUCCESS! LADY CAPTURED BY BANDIT~~~\n") + self.logger.info("\n~~~SUCCESS! LADY CAPTURED BY BANDIT~~~\n") # check termination condition: bandit-guard proximity d_vesB_vesG = self.get_bg_relative_distance() is_bandit_captured = d_vesB_vesG < self.bandit_capture_dist if is_bandit_captured: - print("\n~~~FAILURE! BANDIT CAPTURED BY GUARD~~~\n") + self.logger.info("\n~~~FAILURE! BANDIT CAPTURED BY GUARD~~~\n") # check for episode timeout is_timeout = self.vesBandit.met > self.episode_timeout if is_timeout: - print("\n~~~EPISODE TIMEOUT~~~\n") + self.logger.info("\n~~~EPISODE TIMEOUT~~~\n") if is_lady_captured or is_bandit_captured or is_timeout: - print("Terminating episode...\n") + self.logger.info("Terminating episode...\n") self.is_episode_done = True self.stop_bot_thread = True self.stop_episode_termination_thread = True