Closed vinay06vinay closed 1 month ago
A dirty fix that worked for me was to append the local repo to the python search path within the file _highwayenv/envs/__init__.py like that:
import sys
sys.path.append('path/to/the/folder/containing/your/env')
from your_env_file import *
Yes, you should do add it to highway_env/init.py and then do
import highway_env
highway_env.register_highway_envs()
And for highway_env to be importable, it needs to be in your path, so if it's not already:
import sys
sys.path.append('path/to/the/folder/containing/highway_env')
I'll update the docs, they are outdated.
EDIT: the docs were actually up to date, so you can just follow that.
Hello,
I have a query about creating a new custom environment and registering it. The current documentation is not clear
Firstly, the "register( id='your-env-v0', entry_point='highway_env.envs:YourEnv', )" should be inside highway_env/init.py file as other environments
Secondly, I am not able to understand how to make my custom-created environment (created inside envs) in my local workspace be registered with Gymansium and use it. Does only pull requests work to make our custom environments work? Cant we make an environment locally and test ? I tried "import highway_env highway_env.register_highway_envs()"
but I think its not considering my local repo instead use the highway_env library installed
Could you please assist or update documentation on creating an environment locally