Open SeasonedLeo opened 10 months ago
Maybe the cleanest would be to add a new ActionType to
Something like
class NoAction(ActionType):
def space(self) -> spaces.Space:
"""One action that does nothing."""
return spaces.Discrete(1)
@property
def vehicle_class(self) -> Callable:
"""The vehicle is an IDMVehicle, such that it executes IDM/MOBIL actions on its own."""
return IDMVehicle
def act(self, action: Action) -> None:
"""Does nothing, the IDMVehicle actions will be followed automatically."""
pass
Then add it to the action_factory()
here:
And configure your env to use it:
gym.makes(env_id, config={'action': {'type': 'NoAction'}})
That should do the trick :)
Hi @eleurent First of all , thanks for making this available for everybody to use , it has been very helpful .
I am trying to use this environment for my offline RL class project. I would like to run EGO vehicle using IDM and MOBIL , I understand in some of the previous posts you mentioned it will make env run like a simulator and this exactly what I want . Could you help me How to process , I have been trying to make it work but totally not getting what all needs to chnage .. Your advise will be extremely helpful .
Thanks