Giter Club home page Giter Club logo

minimal-isaac-gym's People

Contributors

lorenmt avatar marwan99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

minimal-isaac-gym's Issues

Possible mistake in DQN implementation

Hi Shikun & Marwan, thank you for releasing this repo!

I'm using DQN implementation in my customed environment. However, I have noticed that resetting the environment in every step of the run() function (located in this line of code) is causing an issue. It seems that this can cause the agent to become stuck in the initial scene of the environment.

In addition, the evaluation consequently doesn't make sense due to reset and we have 1-step evaluation.

I'm running the code (both CartPole & mine) headlessly, so I'm not very sure about the conclusion of CartPole above, but indeed the bug happens in custom environment.

Broadcast error (`cannot broadcast to a lower rank tensor`)

I have a working install of IsaagGym, IsaacGymEnvs and rl-games, and I just followed the steps in this repository's README to get it to run, however I get the following issue :

Traceback (most recent call last):
  File "trainer.py", line 35, in <module>
    policy.run()
  File "/home/theo/Documents/minimal-isaac-gym/dqn.py", line 105, in run
    self.env.step(action)
  File "/home/theo/Documents/minimal-isaac-gym/env.py", line 199, in step
    self.get_reward()
  File "/home/theo/Documents/minimal-isaac-gym/env.py", line 139, in get_reward
    self.max_episode_length)
RuntimeError: MALFORMED INPUT: Cannot broadcast to a lower rank tensor

Does anyone know whether this is a common issue ?

Possible mistake in ppo.py

Hi Shikun & Marwan, thank you for releasing this repo!

My conclusion: I think the code on line 103 in ppo.py will get the wrong result. My solution is to remove the reversed function.

I simplified a trajectory into s1, s2, ... , st.

In ppo.py run():

self.env.step(action)
next_obs, reward, done = self.env.obs_buf.clone(), self.env.reward_buf.clone(), self.env.reset_buf.clone()
self.env.reset()

self.data.append((obs, action, reward, next_obs, log_prob, 1 - done))

Therefore, in self.data, it is like s1, s2, ... ,st.

In ppo.py make_data():

After self.data.pop(), the obs, action and reward are located at the last position of trajectory.

So obs_lst is like st, st-1, ..., sk (k=t-self.mini_chunk_size+1).

After executing the code on line 92, obs is like st, st-1, ..., sk (k=t-self.mini_chunk_size+1).

The variable delta is also like st, st-1, ..., sk. (delta_t, ... delta_k)

One calculation method of GAE is from back to front (the same as in the code):
image

But the code on line 102 reverses the delta, reversed(delta) is like sk, sk+1, ... st.

So I think the code on line 103 will get the wrong result. My solution is to remove the reversed function.
image

But I found that removing the reversed function has little effect on the training results [Lol]

Original version: reversed
image

Without reversed:
image

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.