Hey there,
I’m working with CARLA, an open source Simulator for autonomous driving based on Unreal Engine 4.
I’m not sure what exactly it is, but when I’m building it from source I get a Unreal Engine 4 Project With the Carla Plugin installed.
To my Problem:
I’ve created a C++ class via the Unreal Engine Editor. The Menu point for creating a C++ class doesn’t show when I’m right-clicking in the Content Browser, so I had to create one via the File Drowdown menu.
I only can created it in the following folder carla\Unreal\CarlaUE4\Source\CarlaUE4
, with “carla” beeing the root folder of the Project.
There I created 2 files, TrackLayouter.cpp
and TrackLayouter.h
, a class derived from the AActor
Class.
I got it to work, I can spawn it into the world and works like I want it to.
Carla works with Sensors (RGB Camera, Depth Camera, etc…) and there is an official Documentation Entry explaining how to create your own custom Sensor.
https://carla.readthedocs.io/en/latest/tuto_D_create_sensor/
When following that, you have to create a C++ class (named ARailwayInvasionCamera
) inside following folder:
carla\Unreal\CarlaUE4\Plugins\Carla\Source\Carla\Sensor
.
Inside that class I need to get a reference to my TrackLayouter class.
I tried including ../../../../../Source/CarlaUE4/RailwayLayouter.h
in the header file of RailwayInvasionCamera.h
, but I get the error:
“D:\BAI\carla\Unreal\CarlaUE4\Plugins\Carla\Source\Carla\Sensor\../../../../../Source/CarlaUE4/RailwayLayouter.h(16): fatal error C1083: Cannot open include file: 'RailwayLayouter.generated.h': No such file or directory
”
I tried to declare class ARailwayLayouter;
in the beginning of the RailwayInvasionCamera.h
and including RailwayLayouter.h
in the cpp file, but I get the same error.
Does anyone know what I’m doing wrong?
I tried rebuilding it with the make rebuild
command of Carla and tried to delete the .vs
, Binaries
and Intermediate
folders and the .sln
and generating the Visual Studio Project files, but the error stays.
Hopefully somone knows how to fix that!
Thanks!