carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.29k stars 3.65k forks source link

How to add a custom ColorPalette #6205

Open ullriche opened 1 year ago

ullriche commented 1 year ago

Hello, I'm working with CARLA 0.9.14 build from source.

I have 2 semantic segmentation cameras in my scene. The first schould output the typical colored image, where every object gets the color based on its tag. That works fine. For that second semantic segmentation camera I want a different coloring. I want that every object gets the color BLACK, except for Vegetation, which should get WHITE. My idea was to create an additional ColorPalette and use it instead of CityScapesPalette, when calling "convert" on the output image.

I did the following:

But when calling convert(carla.ColorConverter.VegetationPalette) on the image of the second semantic camera, i get the error: AttributeError: type object 'ColorConverter' has no attribute 'VegetationPalette'

Where do I have to register the new function or struct, so that I can use it in the Python API? Is that even possible?

Thanks for you answers!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.