Shuijing725 / CrowdNav_DSRNN

[ICRA 2021] Decentralized Structural-RNN for Robot Crowd Navigation with Deep Reinforcement Learning
https://sites.google.com/illinois.edu/crowdnav-dsrnn/home
MIT License
97 stars 23 forks source link

plot trajectory #9

Open mostafanorouzi opened 2 years ago

mostafanorouzi commented 2 years ago

Hi In the code crowdnav in the evaluation section, there is a trajectory display of people's movements, but in your code, this section has been removed and you have also used it in your article. How can we show a trajectory?

Thanks

Shuijing725 commented 2 years ago

Hi @mostafanorouzi,

First, we added a variable in the crowd_sim environment to store the x and y positions of all agents from the beginning of an episode. Then, when done is True, we interpolated the trajectory of each agent, and generated a new plot with the interpolated lines and the stored x-y positions. Finally, save the plot to the computer.

Does it help?

mostafanorouzi commented 2 years ago

Hi @mostafanorouzi,

First, we added a variable in the crowd_sim environment to store the x and y positions of all agents from the beginning of an episode. Then, when done is True, we interpolated the trajectory of each agent, and generated a new plot with the interpolated lines and the stored x-y positions. Finally, save the plot to the computer.

Does it help?

Thanks for the explanation But I could not implement this in your code. In the previous code, it is possible to save the trajectory and video in the render function, but in your code, this part has been removed. Is it possible to add this part to the code? ‌

Shuijing725 commented 2 years ago

No problem, we need to clean the code and will release this feature in a few weeks.