robocin / rSoccer

🎳 Environments for Reinforcement Learning
MIT License
46 stars 19 forks source link

Fixing the README.md #46

Closed Alexsandr0x closed 3 years ago

Alexsandr0x commented 3 years ago

I was testing with the library using the readme.md as guide but notice some issues in the example code.

import numpy as np
from gym.spaces import Box
from rc_gym.Entities import Ball, Frame, Robot
from rc_gym.ssl.ssl_gym_base import SSLBaseEnv

"""
rc_gym doesn`t work, this works:
"""
from rsoccer_gym.Entities import Ball, Frame, Robot
from rsoccer_gym.ssl.ssl_gym_base import SSLBaseEnv
def _frame_to_observations(self):
    ball, robot = self.frame.ball, self.frame.robots_blue[0]
    return np.array([ball.x, ball.y, rbt.x, rbt.y]) # , robot.x, robot.y])
Alexsandr0x commented 3 years ago

I created a PR to solve this issues: https://github.com/robocin/rSoccer/pull/47

FelipeMartins96 commented 3 years ago

Thank you for the contribution, sorry for the error! We will work on improving our documentation