Giter Site home page Giter Site logo

gym-lgsvl's Introduction

gym-lgsvl's People

Contributors

bshin-lge avatar daviduhm avatar haditab avatar lokesku avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gym-lgsvl's Issues

ModuleNotFoundError: No module named 'spinup'

The installation instruction don't mention to install spinningup. I just commented it out in random_agent.py, since it is only used for logging, to get the agent running. But I think either should it be mentioned in the instructions or replaced by some more "light weight" logging mechanism.

gym.error.UnregisteredEnv: No registered env with id: gym_lgsvl:lgsvl-v0

When i run ./random_agent.py, it throws an error:

gym.error.UnregisteredEnv: No registered env with id: gym_lgsvl:lgsvl-v0

Here are the traceback:

Traceback (most recent call last):
File "/home/bob/anaconda3/lib/python3.5/site-packages/gym/envs/registration.py", line 143, in spec
return self.env_specs[id]
KeyError: 'gym_lgsvl:lgsvl-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./random_agent.py", line 6, in
env = gym.make('gym_lgsvl:lgsvl-v0')
File "/home/bob/anaconda3/lib/python3.5/site-packages/gym/envs/registration.py", line 167, in make
return registry.make(id)
File "/home/bob/anaconda3/lib/python3.5/site-packages/gym/envs/registration.py", line 118, in make
spec = self.spec(id)
File "/home/bob/anaconda3/lib/python3.5/site-packages/gym/envs/registration.py", line 153, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: gym_lgsvl:lgsvl-v0

Running this on Ubuntu 16.04.

Rewardfunction Lanefollowing Waypointtargeting

Dear LGSVL Team,

Currently we are developing an lanefollowing reward function. It will reward our agent when it stays in its lane. For this we target the waypoints on the lanesegment "segment.TargetLocalPosition". We calculate the distance between the ego position and the nearest waypoint on the lane with regard to the agent in world coordinates. But we have a problem evaluating the correct waypoint which is beeing targeted in the UnitySimulator. Because the transform.position of the waypoints in the inspector of the UnitySimulator shows only LocalPosition.

We are thinking about spawning an object at the position of the currentTarget for visualization in game scene. Is there a better and easier solution you would consider evaluating the correct target of the agent?

Best Regards,
qsengshu

OpenAI /Gym : No registered env with id: BanditTenArmedGaussian-v0

Hi,

I have windows 10 (64x), Jupyter Notebook and Python 3.

I downloaded gym_bandits from here

git clone https://github.com/JKCooper2/gym-bandits.git
cd gym-bandits
pip install -e .

My code :

import gym
import gym_bandits
import numpy as np
import math
import random
env = gym.make("BanditTenArmedGaussian-v0")

And I have a error I don't understand why and this package is not widely use so I can't find any other report to help me to fix it.
That's why I'm here.

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
c:\windows\system32\gym\gym\envs\registration.py in spec(self, path)
    120         try:
--> 121             return self.env_specs[id]
    122         except KeyError:

KeyError: 'BanditTenArmedGaussian-v0'

During handling of the above exception, another exception occurred:

UnregisteredEnv                           Traceback (most recent call last)
<ipython-input-15-ec95f73807de> in <module>
      4 import math
      5 import random
----> 6 env = gym.make("BanditTenArmedGaussian-v0")

c:\windows\system32\gym\gym\envs\registration.py in make(id, **kwargs)
    143 
    144 def make(id, **kwargs):
--> 145     return registry.make(id, **kwargs)
    146 
    147 def spec(id):

c:\windows\system32\gym\gym\envs\registration.py in make(self, path, **kwargs)
     87         else:
     88             logger.info('Making new env: %s', path)
---> 89         spec = self.spec(path)
     90         env = spec.make(**kwargs)
     91         # We used to have people override _reset/_step rather than

c:\windows\system32\gym\gym\envs\registration.py in spec(self, path)
    129                 raise error.DeprecatedEnv('Env {} not found (valid versions include {})'.format(id, matching_envs))
    130             else:
--> 131                 raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
    132 
    133     def register(self, id, **kwargs):

UnregisteredEnv: No registered env with id: BanditTenArmedGaussian-v0

AttributeError: 'LgsvlEnv' object has no attribute 'camera'

Hi,
I have tried to execute gym-lgsvl.
When I have execute the following command
python -m baselines.run --alg=a2c --env=gym_lgsvl:lgsvl-v0 --num_timesteps=1e5
I got an Attribute Error
AttributeError: 'LgsvlEnv' object has no attribute 'camera'
(check the screenshot)
Day8_4
Please help me to solve this

Thanks in Advance
Malathi K

Target directory should be created

Right now, random_agent.py expects a directory ~/gym-lgsvl to be existing to save the tmp.png to.
I put my gym in a different directory and consequently got a confusing error message until I changed the target directory.

cv2.error: OpenCV(4.1.0) /io/opencv/modules/imgproc/src/resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

I'd suggest that either the target directory should be created by the script or, even better, the image should be written to /tmp.

cant add additional sensors

hey,
when im loading an agent through _setup_ego function, which I provide a configuration id as the below example:
def _setup_ego(self, name = "30387e1f-4d7f-4b6e-98aa-d721a16c4e75", spawn_index = 0, random_spawn = False):

while the name argument is the configuration ID set on web UI, which loaded with several sensors.
but when I am printing all the available sensors, not all of them are exist in the jason file, alltough the simulator itself can show me all the sensors

I'm printing them using the below code:

def _setup_ego(self, name = "30387e1f-4d7f-4b6e-98aa-d721a16c4e75", spawn_index = 0, random_spawn = False):

    state = lgsvl.AgentState()
    if (random_spawn):
      state.transform = self.spawns[random.randint(0, len(self.spawns) - 1)]
    else:
      state.transform = self.spawns[spawn_index]
    
    self.ego = self.env.add_agent(name, lgsvl.AgentType.EGO, state)
    self.vehicles[self.ego] = "EGO"
    self._occupied.append(state.transform.position)
    self.sensors = self.ego.get_sensors()
    for s in self.sensors:
      print("(_setup_ego) sensor: " ,s.name)
      if (s.name == "Color Camera Sensor"):
        self.camera = s
        break
    self.ego_position = state.transform.position

for example,
I've added the lane sensor, and it does not print it as a sensor, while on the simulator UI i can see the lane sensor

Setup Python API and running on Server

The page linked to set up the python API is missing. Can u give an effective one?
Another question is that can we use this lgsvl environment on server which doesn't have any GUI?

Thanks.

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.