CAS-LRJ / ISS

Intelligent Self-driving System
51 stars 15 forks source link

TypeError: 'Boost.Python.class' object is not iterable #25

Open shiliashili opened 5 months ago

shiliashili commented 5 months ago

Hello, I've encountered an issue when trying to run run_carla.py. The script fails with the following error message: Traceback (most recent call last): File "run_carla.py", line 10, in from ISS.algorithms.sensors.carla_actor_tree import CarlaActorTree File "ISS/algorithms/sensors/carla_actor_tree.pyx", line 5, in init ISS.algorithms.sensors.carla_actor_tree from ISS.algorithms.sensors.carla_actor_factory import CarlaActorFactory, CarlaNode File "ISS/algorithms/sensors/carla_actor_factory.pyx", line 12, in init ISS.algorithms.sensors.carla_actor_factory from ISS.algorithms.utils.sensorutils.transform import transform_to_carla_transform File "ISS/algorithms/utils/sensorutils/transform.pyx", line 172, in init ISS.algorithms.utils.sensorutils.transform def vertices_to_carla_bbox(vertices: list(carla.Location)): TypeError: 'Boost.Python.class' object is not iterable

I'm not sure what's causing this issue, and I would appreciate any guidance on how to resolve it.

System Information: Operating System: [Ubuntu 22.04] Python Version: [Python 3.8.18(conda virtual environment)] CARLA Version: [CARLA 0.9.13(binary distribution)]

shiliashili commented 5 months ago

This line was causing a TypeError because carla.Location is not iterable, and thus cannot be used with list.

To resolve this issue, I changed the line to: def vertices_to_carla_bbox(vertices: dir(carla.Location)): Then run the command: python setup.py build_ext --inplace to rebuild the Cython extensions.