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

Sampler for this object is not defined #5

Closed
AizazSharif opened this issue Sep 30, 2020 · 8 comments
Closed

Sampler for this object is not defined #5

AizazSharif opened this issue Sep 30, 2020 · 8 comments

Comments

@AizazSharif
Copy link

AizazSharif commented Sep 30, 2020

Hi,

I am trying to run the current repo for example in pedestrians crosswalk. After installing all the packages, I am getting this error.

error

The issue has been raised before but is closed now. Any help would be appreciated
Thanks.

@mossr
Copy link
Member

mossr commented Sep 30, 2020

This seems to be an issue with Scene not being sampleable, where initialstate(mdp) returns a Scene and the history recorder will try to sample an initial state.

A quick fix would be to add the following to the top of the "ped_crosswalk_with_blindspot.jl" file:

using Random
Base.rand(rng::AbstractRNG, s::Scene) = rand(rng, s.entities)

or

using Random
Base.rand(rng::AbstractRNG, s::Scene) = s

if it shouldn't sample an entity, but deterministically return the Scene (semi-hack at the moment).

But @ancorso should comment on whether this is a fix that should live in AdversarialDriving.jl or AutomotiveSimulator.jl.

@AizazSharif
Copy link
Author

AizazSharif commented Sep 30, 2020

using Random
Base.rand(rng::AbstractRNG, s::Scene) = s

This was only working as one of the fixes you have mentioned above. The output is now:

output

I wanted to ask if there is any other script to run for visualization of the crosswalk scenario.

@mossr
Copy link
Member

mossr commented Sep 30, 2020

I think running that file creates a "blindspot.gif" file, no?

@AizazSharif
Copy link
Author

Yes, it does (my bad).

Thanks a lot for the help. Looking forward to contributing to this great work :)

@mossr
Copy link
Member

mossr commented Sep 30, 2020

No worries! Happy to help :)

@mossr
Copy link
Member

mossr commented Sep 30, 2020

I'll leave it open so we can resolve it for everyone else

@mossr mossr reopened this Sep 30, 2020
@ancorso
Copy link
Collaborator

ancorso commented Sep 30, 2020

Thanks for tracking the issue down @mossr.

It looks like this new requirement stems from a POMDPs.jl v0.9, where initialstate(mdp) should return a distribution. I'll make the needed change.

@ancorso
Copy link
Collaborator

ancorso commented Oct 22, 2020

Fixed by #6

@ancorso ancorso closed this as completed Oct 22, 2020
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

No branches or pull requests

3 participants