semitable/robotic-warehouse

Bugs caused by gym version changes

wwxFromTju opened this issue · 4 comments

Hi,

Great environment, good job!

But it is worth pointing out that due to the change of the gym version to 0.20 or more, the calculation of the number of dimensions of MultiDiscrete has changed. This also leads to different observation dim under different gym versions, and makes the way of writing information in the function _make_obs wrong.

eg:

obs.write([agent.x, agent.y, int(agent.carrying_shelf is not None)])

Should be modified to something like:

direction = np.zeros(4)
direction[self.agents[id_agent - 1].dir.value] = 1.0
obs.write(direction)

Hi @wwxFromTju ,

Thanks for the issue report. I recently noticed this problem and raised issue #4 and pushed commit be626e4 which changes the multi discrete space and pins gym version to >=0.20.

Is this a duplicate of this issue or you have noticed a problem in the newest version as well?

Thanks

hey, we used the previous version of the code and it looks like the latest version of the code fixes the problem (please note, I didn't try the latest version of the code).

Very good environment, looking forward to your new work and cooperation.

@semitable I reviewed the problem and found that the code of PyPi is still an old version, please pay attention to update the code in PyPi.

Thanks for noticing @wwxFromTju
The newest version has been uploaded to PyPi now.