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

Cannot generate networks for CARLA dataset #2

Open
kumarrah2002 opened this issue Nov 14, 2023 · 1 comment
Open

Cannot generate networks for CARLA dataset #2

kumarrah2002 opened this issue Nov 14, 2023 · 1 comment

Comments

@kumarrah2002
Copy link

kumarrah2002 commented Nov 14, 2023

I have cloned this repo and am trying to generate networks for the CARLA dataset. However, when I try to run this command, I get the following error:

After running
bash generate_network_driving-carla.sh

I get:


File "rkumar/fadnet/graph_utils/generate_networks.py", line 151, in <module>
    cycle_time = get_matcha_cycle_time(underlay.copy(), connectivity_graph.copy(),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "rkumar/fadnet/graph_utils/utils/utils.py", line 271, in get_matcha_cycle_time
  topology_generator = RandomTopologyGenerator(underlay.copy(),
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "rkumar/fadnet/graph_utils/utils/matcha.py", line 32, in __init__
  self.matching_list, self.laplacian_matrices = matching_decomposition(self.network)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "rkumar/fadnet/graph_utils/utils/matching_decomposition.py", line 26, in matching_decomposition
  laplacian_matrices = [nx.laplacian_matrix(matching, nodelist=graph.nodes(), weight=None).toarray()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "rkumar/fadnet/graph_utils/utils/matching_decomposition.py", line 26, in <listcomp>
    laplacian_matrices = [nx.laplacian_matrix(matching, nodelist=graph.nodes(), weight=None).toarray()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "rkumar/.local/lib/python3.11/site-packages/networkx/utils/decorators.py", line 816, in func
    return argmap._lazy_compile(__wrapper)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<class 'networkx.utils.decorators.argmap'> compilation 36", line 4, in argmap_laplacian_matrix_33
  File "rkumar/.local/lib/python3.11/site-packages/networkx/linalg/laplacianmatrix.py", line 54, in laplacian_matrix
    A = nx.to_scipy_sparse_array(G, nodelist=nodelist, weight=weight, format="csr")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "rkumar/.local/lib/python3.11/site-packages/networkx/convert_matrix.py", line 891, in to_scipy_sparse_array
    raise nx.NetworkXError(f"Node {n} in nodelist is not in G")
networkx.exception.NetworkXError: Node Denver in nodelist is not in G

I am not sure how to debug, thanks.

@salman-bokhari
Copy link

I am getting same error

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