Skip to content

Commit

Permalink
Merge pull request #190 from ana-lys/main
Browse files Browse the repository at this point in the history
Update drag function BaseAviary.py
  • Loading branch information
JacopoPan authored Feb 10, 2024
2 parents ec807dd + 328c3d3 commit 00ca90a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gym_pybullet_drones/envs/BaseAviary.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def _drag(self,
base_rot = np.array(p.getMatrixFromQuaternion(self.quat[nth_drone, :])).reshape(3, 3)
#### Simple draft model applied to the base/center of mass #
drag_factors = -1 * self.DRAG_COEFF * np.sum(np.array(2*np.pi*rpm/60))
drag = np.dot(base_rot, drag_factors*np.array(self.vel[nth_drone, :]))
drag = np.dot(base_rot.T, drag_factors*np.array(self.vel[nth_drone, :]))
p.applyExternalForce(self.DRONE_IDS[nth_drone],
4,
forceObj=drag,
Expand Down

0 comments on commit 00ca90a

Please sign in to comment.