Skip to content

Error when trying to re-generate scenarios for the updated room-64-64-16 map #2

@eli-b

Description

@eli-b

The room-64-64-16.map file was recently updated, necessitating regeneration of the scenarios.
I ran create_problems_for_map(r'D:\mapf\maps\room-64-64-16.map', 2, 300) and ran into the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-5181f86f5750> in <module>
----> 1 create_problems_for_map(r'D:\mapf\maps\room-64-64-16.map', 2, 300)

D:\mapf-selection\src\utils\mapf_graph_generator.py in create_problems_for_map(map_path, n_instances, n_agents)
    157                 additional_info = "-" + start_side + '-to-' + goal_side
    158                 if problem_type == 'cross-sides':
--> 159                     graph.create_sided_problem(n_agents, start_side, instanceid, swap_sides=False)
    160                 elif problem_type == 'swap-sides':
    161                     graph.create_sided_problem(n_agents, start_side, instanceid, swap_sides=True)

D:\mapf-selection\src\utils\mapf_graph_generator.py in create_sided_problem(self, n_agents, start_side, instanceid, swap_sides)
    100             if start is None:
    101                 break
--> 102             self.add_agent_to_graph(start, goal)
    103
    104     # When outside_in = True, creates the agents start location far from center

D:\mapf-selection\src\utils\mapfgraph.py in add_agent_to_graph(self, start, goal, color)
    141         self.G.nodes[start_1d]['type'] = 'agent_start'
    142
--> 143         self.G.node[goal_1d]['color'] = goal_color
    144         self.G.node[goal_1d]['size'] = 1
    145         self.G.nodes[goal_1d]['type'] = 'agent_goal'

AttributeError: 'DiGraph' object has no attribute 'node'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions