You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jacopo,
Thank you for working on this simulator. I have a question on the dynamics of the drones. In gym-pybullet-drones/gym_pybullet_drones/envs/BaseAviary.py, line 851: rpy = rpy + self.TIMESTEP * ang_v
Please correct me if I'm wrong here. I think the angular velocity is generally not the same as roll, pitch and yaw rates so I wonder if this is a bug? To calculate the new rotation matrix after 1 TIMESTEP, I think it should be something like: next_rotation = matmul(rotation,expm(skew(self.TIMESTEP * ang_v)))
And then the new roll, pitch, yaw can be calculated from this new rotation matrix.
Best.
The text was updated successfully, but these errors were encountered:
Thanks Thai! You are likely correct and/or spotted a mix-up in variable names.
I'll double check the content of ang_v and fix it ASAP.
However, note that the function you are referring to, _dynamics() is currently unused, by default.
There was a mix-up in variable names as PyBullet's angular velocity vector was used as intermediate storage (with the intent of reducing code duplication) for the RPY rates (but not to update the pose) when choosing to call _dynamics() instead of _physics. It should be fixed in the next commit.
Hi Jacopo,
Thank you for working on this simulator. I have a question on the dynamics of the drones. In
gym-pybullet-drones/gym_pybullet_drones/envs/BaseAviary.py, line 851
:rpy = rpy + self.TIMESTEP * ang_v
Please correct me if I'm wrong here. I think the angular velocity is generally not the same as roll, pitch and yaw rates so I wonder if this is a bug? To calculate the new rotation matrix after 1 TIMESTEP, I think it should be something like:
next_rotation = matmul(rotation,expm(skew(self.TIMESTEP * ang_v)))
And then the new roll, pitch, yaw can be calculated from this new rotation matrix.
Best.
The text was updated successfully, but these errors were encountered: