Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Ant never sending the done signal #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sash-a
Copy link
Owner

@sash-a sash-a commented Apr 1, 2021

Noticed this when I was trying to find a fix for this issue. The bug seems to be with these two lines:

https://github.com/benelot/pybullet-gym/blob/bc68201c8101c4e30dde95f425647a0709ee2f29/pybulletgym/envs/mujoco/robots/locomotors/ant.py#L29

and

https://github.com/benelot/pybullet-gym/blob/bc68201c8101c4e30dde95f425647a0709ee2f29/pybulletgym/envs/mujoco/envs/locomotion/walker_base_env.py#L59-L60

I'm not sure if it should be changed in Ant or in WalkerBaseMuJoCoEnv not sure if other envs could benefit from this too? I made the change in Ant so as not to affect other envs.

Steps to reproduce the bug, simply run:

env = gym.make('AntMuJoCoEnv-v0')
env.render()
env.reset()
done = False
step = 0
while not done:
    _, _, done, _ = env.step([0] * 8)
    step += 1

print(step)

It should print 1000 indicating that the Ant run for the max number of steps, but its torso should have been touching the ground the whole time, which is undesired behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant