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

Failure to add autonomous agents #20

Open
ericaweng opened this issue Mar 9, 2022 · 0 comments
Open

Failure to add autonomous agents #20

ericaweng opened this issue Mar 9, 2022 · 0 comments

Comments

@ericaweng
Copy link

ericaweng commented Mar 9, 2022

I change these two lines in episode_params_val.ini from:

agents_start=[] ; start pos_3's of the generated agent configs
agents_end=[] ; end pos_3's of the generated agent configs

to:

agents_start=[[5, 6, 1.5], [5, 7, 1.5]] ; start pos_3's of the generated agent configs
agents_end=[[12, 16.5, 1.2], [3, 5, 2.3]] ; end pos_3's of the generated agent configs

Running PYOPENGL_PLATFORM=egl PYTHONPATH='.' python3 tests/test_episodes.py,
I get this error:

Waiting for Joystick connection...
Robot <-- Joystick (receiver) connection established
Robot --> Joystick (sender) connection established


Starting episode "t_ETH1" in building "ETH"
Simulator running in synchronous mode, dt=0.050s
Render mode: Schematic view (TOPVIEW only)
Generating 2 autonomous human agents
Traceback (most recent call last):
  File "tests/test_episodes.py", line 110, in <module>
    test_episodes()
  File "tests/test_episodes.py", line 80, in test_episodes
    simulator.add_agents(new_humans)
  File "/home/eweng/SocNavBench/simulators/simulator.py", line 456, in add_agents
    self.add_agent(agent)
  File "/home/eweng/SocNavBench/simulators/simulator_helper.py", line 95, in add_agent
    keep_episode_running=self.params.keep_episode_running,
  File "/home/eweng/SocNavBench/agents/agent.py", line 50, in simulation_init
    Agent._init_fmm_map(self)
  File "/home/eweng/SocNavBench/agents/agent.py", line 289, in _init_fmm_map
    mask_grid_mn=obstacle_occupancy_grid,
  File "/home/eweng/SocNavBench/utils/fmm_map.py", line 122, in create_fmm_map_based_on_goal_position
    mask_grid_mn=mask_grid_mn)
  File "/home/eweng/SocNavBench/utils/fmm_map.py", line 42, in __init__
    self.compute_fmm_distance_and_angle()
  File "/home/eweng/SocNavBench/utils/fmm_map.py", line 58, in compute_fmm_distance_and_angle
    phi, dx=self.fmm_distance_map.map_scale * np.ones(2))
  File "/home/eweng/.anaconda3/envs/socnavbench/lib/python3.6/site-packages/skfmm/pfmm.py", line 111, in distance
    int(self_test), DISTANCE, order, narrow, periodic)
ValueError: the array phi contains no zero contour (no zero level set)

However, when I change it to these two lines:

agents_start=[[5, 6, 1.5], [5, 7, 1.5]] ; start pos_3's of the generated agent configs
agents_end=[[12, 16.5, 1.2], [13, 14.5, 1.2]] ; end pos_3's of the generated agent configs

It works fine.
Are there constraints on x / y / theta which make the second set of agent start / goal params work but not the first set?

All tests pass (PYTHONPATH='.' python3 tests/all_unit_tests.py, and PYOPENGL_PLATFORM=egl PYTHONPATH='.' python3 tests/test_socnav.py / python3 joystick/joystick_client.py).

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

1 participant