GithubHelp home page GithubHelp logo

Comments (4)

MegaCreater avatar MegaCreater commented on June 19, 2024 1

Thanks @JacopoPan ,
For your fast and detailed explanation. I got it (that obs return normalised values whereas env.pos reruns original values). Is there is any way so that I get max(x,y,z) and min(x,y,z) (original\not normalised).
If you want I make Google-Colaboratory examples for your example (non-gui) and for TensorFlow also. (For gui=True, it shows an error cannot connect to server x (same as it shows for cv2.imshow); we just had to make changes or add attribute like gui_show=False; so it don't show GUI but one can record video that can be later on visualised for Google-Colab.).

from gym-pybullet-drones.

JacopoPan avatar JacopoPan commented on June 19, 2024

Hi @MegaCreater,

I should double check your numbers and slicing but one sure reason why the obs in TakeoffAviary (and all other env classes meant for RL) does not contain the raw, world frame values is because it is clipped and normalized to the -1, +1 range:


You can use CtrlAviary for unbounded, raw obs.

from gym-pybullet-drones.

MegaCreater avatar MegaCreater commented on June 19, 2024

Hi @MegaCreater,

I should double check your numbers and slicing but one sure reason why the obs in TakeoffAviary (and all other env classes meant for RL) does not contain the raw, world frame values is because it is clipped and normalized to the -1, +1 range:

You can use CtrlAviary for unbounded, raw obs.

Hi @JacopoPan ,
That i got that why values are btwn -1 and 1 (or 0 and 1 for z) (That is not the issue.). I just only want to get/Know that obs, reward, done, info = env.step(env.action_space.sample()); obs numerical values are not equal to env-pos,vel or ang_v parameters (numerically not equal.).

from gym-pybullet-drones.

JacopoPan avatar JacopoPan commented on June 19, 2024

Because kinematic information is retrieved from PyBullet in:

def _updateAndStoreKinematicInformation(self):

Which is called at every step:

And those value are used to build a state:
def _getDroneStateVector(self,

But then that state is clipped to max, min values and divided by ranges in:
obs = self._clipAndNormalizeState(self._getDroneStateVector(0))

Before being returned as an obs.
If you spot any numerical mistake please let me know but I wouldn't expect obs and env.pos to contain the same values.

from gym-pybullet-drones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.