utiasDSL / gym-pybullet-drones

PyBullet Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control
https://utiasDSL.github.io/gym-pybullet-drones/
MIT License
1.21k stars 351 forks source link

self.TIMESTEP not defined in BaseAviary Class #188

Closed praneelacharya closed 8 months ago

praneelacharya commented 8 months ago

When using custom physics which class _dynamics() from BaseAviary.py, it gives an error as the self.TIMESTEP is not defined in the BaseAviary.py. Thank you for sharing your work!

Update state

    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)   #<------ THIS LINE

Set PyBullet's state

JacopoPan commented 8 months ago

Thanks for pointing this out, I believe it should be self.PYB_TIMESTEP. You can open a PR if you want to contribute a bug fix, otherwise I will look at this in the upcoming days.