Open Lilyoung2000 opened 9 months ago
Sorry about that. Can you copy-paste the following codes into line 236 in crowd_sim_pred_real_gst.py (right before plt.pause(0.1))?
# save plot for slide show
if self.config.save_slides:
import os
folder_path = os.path.join(self.config.save_path, str(self.episode_k))
if not os.path.isdir(folder_path):
os.makedirs(folder_path, exist_ok = True)
plt.savefig(os.path.join(folder_path, str(self.step_counter)+'.png'), dpi=300)
Also, in test.py
, you need to set both --visualize
and --save_slides
to True
.
Thanks for the quick reply, that works. But I still have the following three questions
Sorry about that. Can you copy-paste the following codes into line 236 in crowd_sim_pred_real_gst.py (right before plt.pause(0.1))?
# save plot for slide show if self.config.save_slides: import os folder_path = os.path.join(self.config.save_path, str(self.episode_k)) if not os.path.isdir(folder_path): os.makedirs(folder_path, exist_ok = True) plt.savefig(os.path.join(folder_path, str(self.step_counter)+'.png'), dpi=300)
Also, in
test.py
, you need to set both--visualize
and--save_slides
toTrue
.
The code for saving slides is added in save_slides branch. The output figures are saved in your_model_path/social_eval/
folder. Please let me know if you have any issues.
Awesome, everything you said is correct! What should I do if I want to change the visualization style? Specifically, I want to add a dotted line on the path where the robot moves, so that the trajectory of the robot is more intuitive.
To achieve this, you can use some data structure to save all positions of the robot before the episode ends, then draw a line between every pair of adjacent positions.
Thank you! But where is the script for the visualization file
The code is in another repo. I just added you as a collaborator. The code is in trajectory_graphing
branch (check the latest few commits in this branch). Note that the code is not cleaned, and please don't overwrite anything.
Thanks for your support, I found the visualization files in that branch.
But why can crowd++ visualize without this script, so I have some questions, how to modify the visualization of crowd++
Sorry, I thought we were talking about another paper. I just added you to the correct repo. I believe the code is in "adds saving episode trajectory plot capability" commit in "render_traj" branch. And again, please don't overwrite anything in the repo.
I'm still a little confused, I think we're talking about the Intention Aware Robot Crowd Navigation with Attention-Based Interaction Graph article, and its repository. Your previous work is great and I know about it, but what I want to modify is this visualization.
I think the submission of adds saving episode trajectory plot capability may not be the key.
I think the visualization file in the CrowdNav_Prediction_AttnGraph project may be in crowd_sim.py. But it doesn't work when I make simple changes to the visualization, like when I change the color on line 758
Sorry about the late reply. The CrowdNav_Prediction repo is indeed the development version of our ICRA 2023 paper, not ICRA 2021 paper. It's easier for me to help you if you can give me the error trace or output figure and what changes you made to which file(s).
Hello, do you still remember me? I still have some issues with the test.py, when I set save_slides=True, the folder trained_models/GST_predictor_rand/social_eval/41665 where the results are saved is empty. There is also a problem with the --test_case parameter setting. When I set any other positive number, the test will still run for 500 episodes. I'm confused and made some modifications to evaluation.py but it doesn't work. Do you have any suggestions? Maybe the uploaded file is incomplete