diff --git a/gym_pybullet_drones/envs/BaseAviary.py b/gym_pybullet_drones/envs/BaseAviary.py index 8de25c03c..d08dbbe27 100755 --- a/gym_pybullet_drones/envs/BaseAviary.py +++ b/gym_pybullet_drones/envs/BaseAviary.py @@ -859,7 +859,7 @@ def _dynamics(self, vel = vel + self.PYB_TIMESTEP * no_pybullet_dyn_accs rpy_rates = rpy_rates + self.PYB_TIMESTEP * rpy_rates_deriv pos = pos + self.PYB_TIMESTEP * vel - quat = self._integrateQ(quat, rpy_rates, self.TIMESTEP) + quat = self._integrateQ(quat, rpy_rates, self.PYB_TIMESTEP) #### Set PyBullet's state ################################## p.resetBasePositionAndOrientation(self.DRONE_IDS[nth_drone], pos, @@ -1146,4 +1146,4 @@ def _calculateNextStep(self, current_position, destination, step_size=1): next_step = ( current_position + normalized_direction * step_size ) # Calculate the next step - return next_step \ No newline at end of file + return next_step