vita-epfl / CrowdNav

[ICRA19] Crowd-aware Robot Navigation with Attention-based Deep Reinforcement Learning
MIT License
599 stars 171 forks source link

drawing issue #38

Open hurong971013 opened 3 years ago

hurong971013 commented 3 years ago

Sorry to bother you. Could you please teach me how to draw a picture like this?(Trajectory comparison in an invisible test case in your paper's figure 5) image

ChanganVR commented 3 years ago

@hurong971013, the trajectory visualization code is here: https://github.com/vita-epfl/CrowdNav/blob/24be7ad39fed0658c5631c0820c67f9105e457bc/crowd_sim/envs/crowd_sim.py#L444-L484

and in the test.py, there are options to visualize the trajectory as well, which use the code above.

705603621 commented 3 years ago

So how do we save this trajectory?I'm trying to type in python test.py --policy sarl --model_dir data/output --phase test --visualize --test_case 0 --traj. But I couldn't find the saved file.

ChanganVR commented 3 years ago

This fucntion currently directly plots the figure in a pop-up window, you need to add a line of code to save the figure to the desired location.