Agrarsense
|
#include <AgrarsenseGameModeBase.h>
Public Member Functions | |
AAgrarsenseGameModeBase (const FObjectInitializer &ObjectInitializer) | |
ALidarManager * | GetLidarManager () |
UROSHandler * | GetROSHandle () |
ASimulationLevelManager * | GetSimulationLevelManager () |
AInstancedRenderer * | GetInstancedRenderer () |
AWeather * | GetWeatherActor () |
ASpectator * | GetSpectator () |
UROSCommands * | GetROSCommands () |
Public Attributes | |
TSubclassOf< ALidarManager > | LidarManagerClass |
TSubclassOf< UUserWidget > | DeveloperTools |
TSubclassOf< ASimulationLevelManager > | SimulationLevelManagerClass |
Protected Member Functions | |
void | InitGame (const FString &MapName, const FString &Options, FString &ErrorMessage) override |
void | BeginPlay () override |
void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
Private Member Functions | |
void | ParseMapChangeLaunchArgument () |
void | SpawnNeededActorsInitGame () |
void | SpawnNeededActorsBeginPlay () |
Private Attributes | |
ALidarManager * | LidarManager = nullptr |
UROSHandler * | ROSHandle = nullptr |
ASimulationLevelManager * | SimulationLevelManager = nullptr |
AInstancedRenderer * | InstancedRenderer = nullptr |
AWeather * | Weather = nullptr |
UROSCommands * | ROSCommands = nullptr |
ASpectator * | Spectator = nullptr |
ATagger * | Tagger = nullptr |
Static Private Attributes | |
static bool | AttemptToLaunchROSBridge = true |
static bool | StartMessageLogged = false |
static bool | MapChanged = false |
Definition at line 28 of file AgrarsenseGameModeBase.h.
AAgrarsenseGameModeBase::AAgrarsenseGameModeBase | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 31 of file AgrarsenseGameModeBase.cpp.
|
overrideprotected |
Entry point to the simulation after InitGame.
Definition at line 43 of file AgrarsenseGameModeBase.cpp.
References ParseMapChangeLaunchArgument(), and SpawnNeededActorsBeginPlay().
|
overrideprotected |
Called when simulation ends.
Definition at line 52 of file AgrarsenseGameModeBase.cpp.
References UInfoTopic::Destroy(), UROSCommands::Destroy(), SimulatorLog::Log(), ROSCommands, and SimulatorLog::Shutdown().
|
inline |
Get Instanced Renderer pointer.
Definition at line 72 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetInstancedRenderer().
|
inline |
Get the Lidar Manager instance
Definition at line 42 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetLidarManager().
|
inline |
Get UROSCommands pointer.
Definition at line 102 of file AgrarsenseGameModeBase.h.
|
inline |
Get the ROS Handler instance
Definition at line 52 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetROSHandle().
|
inline |
Get simulation level's manager
Definition at line 62 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetSimulationLevelManager().
|
inline |
Get ASpectator pointer.
Definition at line 92 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetSpectator().
|
inline |
Get AWeather pointer.
Definition at line 82 of file AgrarsenseGameModeBase.h.
Referenced by UAgrarsenseStatics::GetWeatherActor().
|
overrideprotected |
Entry point to the simulation. InitGame is called before BeginPlay
Definition at line 36 of file AgrarsenseGameModeBase.cpp.
References SpawnNeededActorsInitGame().
|
private |
Parse launch arguments after begin play.
Definition at line 92 of file AgrarsenseGameModeBase.cpp.
References MapChanged.
Referenced by BeginPlay().
|
private |
Spawn needed Actors or UObjects that should always exist in the level in BeginPlay. This is the Simulator second entry point.
Definition at line 219 of file AgrarsenseGameModeBase.cpp.
References DeveloperTools, UInfoTopic::Init(), UROSCommands::Init(), ROSCommands, Spectator, and Tagger.
Referenced by BeginPlay().
|
private |
Spawn needed Actors or UObjects that should always exist in the level in InitGame. This is the Simulator entry point.
Definition at line 120 of file AgrarsenseGameModeBase.cpp.
References AttemptToLaunchROSBridge, SimulatorLog::Create(), UAgrarsenseSettings::GetAgrarsenseSettings(), InstancedRenderer, UROSHandler::LaunchROSBridge(), LidarManager, LidarManagerClass, SimulatorLog::Log(), ROSHandle, UROSHandler::Setup(), UAgrarsenseSettings::Setup(), SimulationLevelManager, SimulationLevelManagerClass, StartMessageLogged, and Weather.
Referenced by InitGame().
|
staticprivate |
Definition at line 168 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
TSubclassOf<UUserWidget> AAgrarsenseGameModeBase::DeveloperTools |
DeveloperTools widget. Created when simulation starts. This must be setup in AgrarsenseGameMode in Unreal editor.
Definition at line 119 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsBeginPlay().
|
private |
Definition at line 182 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
|
private |
Definition at line 173 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
TSubclassOf<ALidarManager> AAgrarsenseGameModeBase::LidarManagerClass |
LidarManager class. Spawned when simulation starts. This must be setup in AgrarsenseGameMode in Unreal editor.
Definition at line 112 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
|
staticprivate |
Definition at line 170 of file AgrarsenseGameModeBase.h.
Referenced by ParseMapChangeLaunchArgument().
|
private |
Definition at line 188 of file AgrarsenseGameModeBase.h.
Referenced by EndPlay(), and SpawnNeededActorsBeginPlay().
|
private |
Definition at line 176 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
|
private |
Definition at line 179 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
TSubclassOf<ASimulationLevelManager> AAgrarsenseGameModeBase::SimulationLevelManagerClass |
Simulation level manager class. Spawned when simulation starts. This must be setup in AgrarsenseGameMode in Unreal editor.
Definition at line 126 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
|
private |
Definition at line 191 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsBeginPlay().
|
staticprivate |
Definition at line 169 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().
|
private |
Definition at line 194 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsBeginPlay().
|
private |
Definition at line 185 of file AgrarsenseGameModeBase.h.
Referenced by SpawnNeededActorsInitGame().