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

Error for testing with visualize option #11

Open
vietanhle-hri opened this issue Aug 2, 2023 · 1 comment
Open

Error for testing with visualize option #11

vietanhle-hri opened this issue Aug 2, 2023 · 1 comment

Comments

@vietanhle-hri
Copy link

I tried to run the test.py script with visualize option python test.py --policy='sail' --circle --model_file=data/output/imitate-event-data-0.50-weight-2.0-horizon-4-temperature-0.20-nboundary-0/policy_net.pth --visualize and got an error below

Traceback (most recent call last):
  File "test.py", line 126, in <module>
    main()
  File "test.py", line 105, in main
    action = robot.act(ob)
  File "/home/vale/github/mpc-nav/social-nce/crowd_sim/envs/utils/robot.py", line 13, in act
    action = self.policy.predict(state)
  File "/home/vale/github/mpc-nav/social-nce/crowd_nav/policy/sail.py", line 122, in predict
    self.last_state = self.transform(state)
  File "/home/vale/github/mpc-nav/social-nce/crowd_nav/policy/sail.py", line 134, in transform
    num_human = len(state.human_states)
TypeError: object of type 'ObservableState' has no len()

Can anyone help me with that issue?

@YuejiangLIU
Copy link
Contributor

This is a bit surprising. Were you able to run the code without the --visualize option?

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