sisl / ngsim_env

Learning human driver models from NGSIM data with imitation learning.
https://arxiv.org/abs/1803.01044
MIT License
172 stars 80 forks source link

singleAgentMakeVideo.py getindex error #12

Open andyehrenberg opened 5 years ago

andyehrenberg commented 5 years ago

Have have successfully trained a model, and run validate.py. Now I am trying to create a visualization, and received an error stemming from rendering the environment. The error message includes:

RuntimeError: Julia exception: MethodError: no method matching getindex(::Records.Frame{Records.Entity{AutomotiveDrivingModels.VehicleState,AutomotiveDrivingModels.VehicleDef,Int64}}, ::Nothing) Closest candidates are: getindex(::Records.Frame, !Matched::Int64) at /home/fei960922/.julia/packages/Records/q2nsF/src/frames.jl:20

Full traceback: Traceback (most recent call last): File "singleAgentMakeVideo.py", line 220, in <module> n_vehs=1) File "singleAgentMakeVideo.py", line 176, in do_it_all_once render_map = create_render_map(model_labels, model_args_filepaths, model_params_filepaths, multi,rand, n_vehs=n_vehs, remove_ngsim=remove_ngsim) File "singleAgentMakeVideo.py", line 154, in create_render_map render_kwargs=render_kwargs File "singleAgentMakeVideo.py", line 72, in mutliagent_simulate img = env.render(**render_kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/ngsim_env/python/julia_env/julia_env.py", line 32, in render return self.j.render(self.env, *args, **kwargs)Traceback (most recent call last): File "singleAgentMakeVideo.py", line 220, in <module> n_vehs=1) File "singleAgentMakeVideo.py", line 176, in do_it_all_once render_map = create_render_map(model_labels, model_args_filepaths, model_params_filepaths, multi,rand, n_vehs=n_vehs, remove_ngsim=remove_ngsim) File "singleAgentMakeVideo.py", line 154, in create_render_map render_kwargs=render_kwargs File "singleAgentMakeVideo.py", line 72, in mutliagent_simulate img = env.render(**render_kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/ngsim_env/python/julia_env/julia_env.py", line 32, in render return self.j.render(self.env, *args, **kwargs)Traceback (most recent call last): File "singleAgentMakeVideo.py", line 220, in <module> n_vehs=1) File "singleAgentMakeVideo.py", line 176, in do_it_all_once render_map = create_render_map(model_labels, model_args_filepaths, model_params_filepaths, multi,rand, n_vehs=n_vehs, remove_ngsim=remove_ngsim) File "singleAgentMakeVideo.py", line 154, in create_render_map render_kwargs=render_kwargs File "singleAgentMakeVideo.py", line 72, in mutliagent_simulate img = env.render(**render_kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/rllab/rllab/envs/proxy_env.py", line 29, in render return self._wrapped_env.render(*args, **kwargs) File "/home/fei960922/Documents/Andy/ngsim_env/python/julia_env/julia_env.py", line 32, in render return self.j.render(self.env, *args, **kwargs)

Has anyone encountered this? Does it relate to using the wrong version of AutoViz?

djp42 commented 5 years ago

Hi Andy,

Thanks for the question. On first read I also thought it might be related to versions. However, it seems like it is just trying to get the index for nothing. Have you gotten any videos to show up? Also, is this on Julia 1.1 and the v0.7fixes_in_progress branch?

andyehrenberg commented 5 years ago

I haven't gotten any videos to show, and yes, I'm on the 0.7 branch running Julia 1.1. Perhaps I can switch to the older version and just run by trained weights on that?

On Tue, May 7, 2019, 8:03 AM Derek notifications@github.com wrote:

Hi Andy,

Thanks for the question. On first read I also thought it might be related to versions. However, it seems like it is just trying to get the index for nothing. Have you gotten any videos to show up? Also, is this on Julia 1.1 and the v0.7fixes_in_progress branch?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sisl/ngsim_env/issues/12#issuecomment-490118836, or mute the thread https://github.com/notifications/unsubscribe-auth/AH2D6NMYACAHC3ZZ2NK76S3PUGK4LANCNFSM4HKHPNBA .

raunakbh92 commented 5 years ago

Could you please try multiAgentMakeVideo.py with AutoViz v0.7.1? I was able to create a video using those.