Carla: IndexError

Created on 20 May 2019  路  5Comments  路  Source: carla-simulator/carla

Carla 0.9.5
Windows 7
Python 3.7.3

Built carla from scratch, packaged the project with CarlaGameModeBase. Ran
CarlaUE4.exe -carla-port=2030
image

The set ports are opened.

image

Now running manual_control.py gives the following error which means the blueprints are not fetched from the server.

How do i solve this?

image

````

(caarla) C:\carla\PythonAPI\examples>python spawn_npc.py -n 80

destroying 0 actors

done.
Traceback (most recent call last):
File "spawn_npc.py", line 129, in
main()
File "spawn_npc.py", line 102, in main
blueprint = random.choice(blueprints)
File "C:\Users\TEXVNQA\AppData\Local\Continuum\anaconda3\envs\caarla\lib\rando
m.py", line 261, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

All 5 comments

Hi @vishal-prgmr,

You should use the "CarlaGameMode" blueprint instead of the "CarlaGameModeBase", and make sure there are actor factories registered
image

Go to edit the "CarlaGameMode" blueprint, under details you'll find that menu, simply adding items to that list works. But by default you should have those 4 factories already registered.

Packaging the project with this Mode just gives a blank screen after packaging.

Edit: The server screen is blank. However the APIs work. _/_
Any idea why the server doesnt work?

No idea, have you modified something else, like the default pawn?

@nsubiron , you are right. The default pawn class was not set to default. Thank you :)
Thank you for those crucial changes to the game mode.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NYJiaxing picture NYJiaxing  路  3Comments

mhusseinsh picture mhusseinsh  路  3Comments

cstamatiadis picture cstamatiadis  路  3Comments

robertnishihara picture robertnishihara  路  4Comments

kartikye picture kartikye  路  3Comments