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

Some issues in test with square and mixed scenario #6

Open
LynAlpha opened this issue Dec 7, 2021 · 2 comments
Open

Some issues in test with square and mixed scenario #6

LynAlpha opened this issue Dec 7, 2021 · 2 comments

Comments

@LynAlpha
Copy link

LynAlpha commented Dec 7, 2021

Hello, me and my team are trying to analyze your works(both of crowdnav and social-nce) as term project.
While I run test.py I face two problems.
1st. In square scenario, there is too large decreasing of performance. WHY?

!python test.py --policy='sail' --square --model_file=data/output/imitate-event-data-0.50-weight-2.0-horizon-4-temperature-0.20-nboundary-0/policy_net.pth
(skip)
2021-12-05 08:55:59, INFO: TEST success: 0.58, collision: 0.41, nav time: 10.43, reward: 0.1095 +- 0.2644
2021-12-05 08:55:59, INFO: Frequency of being in danger: 1.23

2nd. In mixed scenario, (I add argument in parser), error is occur
Traceback (most recent call last):

File "test.py", line 129, in
main()
File "test.py", line 126, in main
explorer.run_k_episodes(env.case_size[args.phase], args.phase, print_failure=False)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/utils/explorer.py", line 60, in run_k_episodes
action = self.robot.act(ob)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_sim/envs/utils/robot.py", line 13, in act
action = self.policy.predict(state)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/policy/sail.py", line 123, in predict
action = self.model(self.last_state[0], self.last_state[1])[0].squeeze()
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/policy/sail.py", line 73, in forward
human_state = self.transform.transform_frame(crowd_obsv)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/utils/transform.py", line 14, in transform_frame
state = torch.cat([frame, relative], axis=2)
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 1 but got size 5 for tensor number 1 in the list.

If you already have knew about those problem, please share the answers. Thank you for reading

@LynAlpha
Copy link
Author

LynAlpha commented Dec 7, 2021

Plus, I am trying to make video output but there is error

Traceback (most recent call last):
File "test.py", line 129, in
main()
File "test.py", line 108, in main
action = robot.act(ob)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_sim/envs/utils/robot.py", line 13, in act
action = self.policy.predict(state)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/policy/sail.py", line 121, in predict
self.last_state = self.transform(state)
File "/content/drive/My Drive/ColabFiles/robotvision/social-nce/crowd_nav/policy/sail.py", line 133, in transform
num_human = len(state.human_states)
TypeError: object of type 'ObservableState' has no len()

@YuejiangLIU
Copy link
Contributor

YuejiangLIU commented Dec 9, 2021

Thanks for your interest.

Regarding the first question, did you train the model using the square scenarios? If the model is trained only in the circle crossing, it can hardly generalize to the square right away.

Regarding the second question (errors in mixed and video), I actually did not use them in the social-nce project and was not aware of that before. Will fix them once I have more time. Nevertheless, these issues should not affect the training and evaluation described in the paper.

Please feel free to let me know if you need anything else.

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

2 participants