From ec807dd32983e51eee09eb89459a6c4424946ee7 Mon Sep 17 00:00:00 2001 From: Jacopo Panerati Date: Tue, 30 Jan 2024 12:08:46 +0400 Subject: [PATCH] see issue #188 --- gym_pybullet_drones/envs/BaseAviary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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