diff --git a/fancy_gym/envs/mujoco/__init__.py b/fancy_gym/envs/mujoco/__init__.py index 4bdab68..8dc6cfc 100644 --- a/fancy_gym/envs/mujoco/__init__.py +++ b/fancy_gym/envs/mujoco/__init__.py @@ -1,7 +1,7 @@ from .ant_jump.ant_jump import AntJumpEnv from .beerpong.beerpong import BeerPongEnv, BeerPongEnvStepBasedEpisodicReward from .half_cheetah_jump.half_cheetah_jump import HalfCheetahJumpEnv -from .hopper_jump.hopper_jump import HopperJumpEnv +from .hopper_jump.hopper_jump import HopperJumpEnv, HopperJumpMarkovRew from .hopper_jump.hopper_jump_on_box import HopperJumpOnBoxEnv from .hopper_throw.hopper_throw import HopperThrowEnv from .hopper_throw.hopper_throw_in_basket import HopperThrowInBasketEnv diff --git a/fancy_gym/envs/mujoco/box_pushing/box_pushing_env.py b/fancy_gym/envs/mujoco/box_pushing/box_pushing_env.py index 9ac03dd..294f88a 100644 --- a/fancy_gym/envs/mujoco/box_pushing/box_pushing_env.py +++ b/fancy_gym/envs/mujoco/box_pushing/box_pushing_env.py @@ -97,11 +97,15 @@ class BoxPushingEnvBase(MujocoEnv, utils.EzPickle): obs = self._get_obs() box_goal_pos_dist = 0. if not episode_end else np.linalg.norm(box_pos - target_pos) box_goal_quat_dist = 0. if not episode_end else rotation_distance(box_quat, target_quat) + mean_squared_jerk, maximum_jerk, dimensionless_jerk = (0.0,0.0,0.0) if not episode_end else self.calculate_smoothness_metrics(np.array(self.velocity_profile), self.dt) infos = { 'episode_end': episode_end, 'box_goal_pos_dist': box_goal_pos_dist, 'box_goal_rot_dist': box_goal_quat_dist, 'episode_energy': 0. if not episode_end else self._episode_energy, + 'mean_squared_jerk': mean_squared_jerk, + 'maximum_jerk': maximum_jerk, + 'dimensionless_jerk': dimensionless_jerk, 'is_success': True if episode_end and box_goal_pos_dist < 0.05 and box_goal_quat_dist < 0.5 else False, 'num_steps': self._steps }