Agrarsense
|
#include <ROSCommands.h>
Public Member Functions | |
void | TryExecuteCommand (const FString &Command) |
Private Member Functions | |
void | Init () |
void | Destroy () |
UWorld * | GetGameWorld () |
UAgrarsenseSettings * | GetSettings () |
void | AddCommands () |
void | SetupROSCommandTopic () |
void | DestroyROSTopic () |
void | ParseIncomingMessage (const FString Message) |
void | ROSBridgeStateChanged (EROSState state) |
bool | TryParseBoolean (const FString &String, bool &OutBool) |
void | HandlePrintAvailableCommands (const FString &Variable) |
void | HandleQuit (const FString &Variable) |
void | HandlePauseSimulator (const FString &Variable) |
void | HandleUnPauseSimulator (const FString &Variable) |
void | HandleAdvanceOneFrame (const FString &Variable) |
void | HandleAdvanceFrames (const FString &Variable) |
void | HandleAdvanceTime (const FString &Variable) |
void | HandleChangeMap (const FString &Variable) |
void | HandleUnrealCommand (const FString &Variable) |
void | HandleTeleportSpectator (const FString &Variable) |
void | HandleTeleportActorByID (const FString &Variable) |
void | HandleTryDestroyObjectByID (const FString &Variable) |
void | HandleDestroyAllSensors (const FString &Variable) |
void | HandleDestroyAllWalkers (const FString &Variable) |
void | HandleDestroyAllVehicles (const FString &Variable) |
void | HandlePrintMaps (const FString &Variable) |
void | HandlePrintAllSensors (const FString &Variable) |
void | HandlePrintAllVehicles (const FString &Variable) |
void | HandlePrintAllWalkers (const FString &Variable) |
void | PrintActorInformation (const FString &Variable, UClass *ActorClass, const FString &ActorTypeName) |
void | HandlePrintIds (const FString &Variable) |
void | HandleSetGlobalTargetFrameRate (const FString &Variable) |
void | HandleSetGlobalTimeDilation (const FString &Variable) |
void | HandleSetQualityLevel (const FString &Variable) |
void | HandleSetWorldRendering (const FString &Variable) |
void | HandleSetSaveCombinedPointcloudToDisk (const FString &Variable) |
void | HandleSpawnObjects (const FString &Variable) |
void | HandleExportAll (const FString &Variable) |
void | HandleExportWeather (const FString &Variable) |
void | HandleExportWalkers (const FString &Variable) |
void | HandleExportVehicles (const FString &Variable) |
void | HandleExportSensors (const FString &Variable) |
void | HandleExportFoliage (const FString &Variable) |
void | HandleExportProps (const FString &Variable) |
void | HandleVisualizeOverlapSensorsBounds (const FString &Variable) |
void | HandleChangeOverlapSensorBounds (const FString &Variable) |
void | HandleChangeOverlapSensorPosition (const FString &Variable) |
void | HandleMoveWalkerToAndDestroy (const FString &Variable) |
void | HandleMoveWalkerToAndStop (const FString &Variable) |
void | HandleMoveWalkerTo (const FString &Variable, EWalkerEndAction EndAction) |
void | HandleStopWalker (const FString &Variable) |
void | HandleResumeWalker (const FString &Variable) |
void | HandleSetWalkerMovement (const FString &Variable, bool IsPaused) |
void | HandleMoveDroneTo (const FString &Variable, EDroneEndAction EndAction) |
void | HandleMoveDroneToAndStop (const FString &Variable) |
void | HandleSetAllSensorsEnabled (const FString &Variable) |
void | HandleEnableAllSensors (const FString &Variable) |
void | HandleDisableAllSensors (const FString &Variable) |
void | HandleSetSensorEnabled (const FString &Variable) |
void | HandleSetWPO (const FString &Variable) |
void | HandleSetNaniteMaxPixelsPerEdge (const FString &Variable) |
void | HandleDestroyTreesArea (const FString &Variable) |
void | HandleDestroyActorsArea (const FString &Variable) |
void | HandleDestroyActors (const FString &Variable, bool OnlyTrees) |
Private Attributes | |
UTopic * | CommandTopic = nullptr |
UROSIntegrationGameInstance * | RosInstance = nullptr |
Static Private Attributes | |
static TMap< FString, FCommand > | CommandHandlers |
Friends | |
class | AAgrarsenseGameModeBase |
Definition at line 46 of file ROSCommands.h.
|
private |
Definition at line 84 of file ROSCommands.cpp.
References CommandHandlers, HandleAdvanceFrames(), HandleAdvanceOneFrame(), HandleAdvanceTime(), HandleChangeMap(), HandleChangeOverlapSensorBounds(), HandleChangeOverlapSensorPosition(), HandleDestroyActorsArea(), HandleDestroyAllSensors(), HandleDestroyAllVehicles(), HandleDestroyAllWalkers(), HandleDestroyTreesArea(), HandleDisableAllSensors(), HandleEnableAllSensors(), HandleExportAll(), HandleExportFoliage(), HandleExportProps(), HandleExportSensors(), HandleExportVehicles(), HandleExportWalkers(), HandleExportWeather(), HandleMoveDroneToAndStop(), HandleMoveWalkerToAndDestroy(), HandleMoveWalkerToAndStop(), HandlePauseSimulator(), HandlePrintAllSensors(), HandlePrintAllVehicles(), HandlePrintAvailableCommands(), HandlePrintIds(), HandlePrintMaps(), HandleQuit(), HandleResumeWalker(), HandleSetAllSensorsEnabled(), HandleSetGlobalTargetFrameRate(), HandleSetGlobalTimeDilation(), HandleSetNaniteMaxPixelsPerEdge(), HandleSetQualityLevel(), HandleSetSaveCombinedPointcloudToDisk(), HandleSetSensorEnabled(), HandleSetWorldRendering(), HandleSetWPO(), HandleSpawnObjects(), HandleStopWalker(), HandleTeleportActorByID(), HandleTeleportSpectator(), HandleTryDestroyObjectByID(), HandleUnPauseSimulator(), HandleUnrealCommand(), and HandleVisualizeOverlapSensorsBounds().
Referenced by Init().
|
private |
Definition at line 59 of file ROSCommands.cpp.
References DestroyROSTopic().
Referenced by AAgrarsenseGameModeBase::EndPlay().
|
private |
Definition at line 193 of file ROSCommands.cpp.
References CommandTopic.
Referenced by Destroy(), and ROSBridgeStateChanged().
|
private |
Definition at line 69 of file ROSCommands.cpp.
Referenced by HandleDestroyActors(), HandleDestroyAllSensors(), HandleDestroyAllVehicles(), HandleDisableAllSensors(), HandleEnableAllSensors(), HandleExportSensors(), HandleExportWeather(), HandleQuit(), HandleSetAllSensorsEnabled(), HandleSetSaveCombinedPointcloudToDisk(), HandleTeleportSpectator(), HandleUnrealCommand(), HandleVisualizeOverlapSensorsBounds(), Init(), PrintActorInformation(), and SetupROSCommandTopic().
|
private |
Definition at line 79 of file ROSCommands.cpp.
References UAgrarsenseStatics::GetAgrarsenseSettings().
Referenced by HandleAdvanceFrames(), HandleAdvanceOneFrame(), HandleAdvanceTime(), HandleChangeMap(), HandlePauseSimulator(), HandlePrintMaps(), HandleSetGlobalTargetFrameRate(), HandleSetGlobalTimeDilation(), HandleSetNaniteMaxPixelsPerEdge(), HandleSetQualityLevel(), HandleSetWorldRendering(), HandleSetWPO(), and HandleUnPauseSimulator().
|
private |
Definition at line 376 of file ROSCommands.cpp.
References UAgrarsenseSettings::AdvanceFrameCount(), and GetSettings().
Referenced by AddCommands().
|
private |
Definition at line 367 of file ROSCommands.cpp.
References UAgrarsenseSettings::AdvanceFrameCount(), and GetSettings().
Referenced by AddCommands().
|
private |
Definition at line 395 of file ROSCommands.cpp.
References UAgrarsenseSettings::AdvanceTime(), and GetSettings().
Referenced by AddCommands().
|
private |
Definition at line 414 of file ROSCommands.cpp.
References UAgrarsenseSettings::ChangeMapByName(), and GetSettings().
Referenced by AddCommands().
|
private |
Definition at line 875 of file ROSCommands.cpp.
References IActorInformation::GetActorByID(), and AOverlapSensor::SetOverlapBounds().
Referenced by AddCommands().
|
private |
Definition at line 911 of file ROSCommands.cpp.
References IActorInformation::GetActorByID(), and AOverlapSensor::SetOverlapRelativePosition().
Referenced by AddCommands().
|
private |
Definition at line 1248 of file ROSCommands.cpp.
References ADeletionVolume::ChangeOverlapBounds(), ADeletionVolume::DestroyOverlappingActors(), and GetGameWorld().
Referenced by HandleDestroyActorsArea(), and HandleDestroyTreesArea().
|
private |
Definition at line 1243 of file ROSCommands.cpp.
References HandleDestroyActors().
Referenced by AddCommands().
|
private |
Definition at line 575 of file ROSCommands.cpp.
References USensorUtilities::DestroyAllSensors(), and GetGameWorld().
Referenced by AddCommands().
|
private |
Definition at line 585 of file ROSCommands.cpp.
References GetGameWorld(), and Vehicle.
Referenced by AddCommands().
|
private |
Definition at line 580 of file ROSCommands.cpp.
References UAssetLibrary::DestroyAllWalkers().
Referenced by AddCommands().
|
private |
Definition at line 1238 of file ROSCommands.cpp.
References HandleDestroyActors().
Referenced by AddCommands().
|
private |
Definition at line 1171 of file ROSCommands.cpp.
References USensorUtilities::DisableAllSensors(), and GetGameWorld().
Referenced by AddCommands().
|
private |
Definition at line 1166 of file ROSCommands.cpp.
References USensorUtilities::EnableAllSensors(), and GetGameWorld().
Referenced by AddCommands().
|
private |
Definition at line 754 of file ROSCommands.cpp.
References HandleExportFoliage(), HandleExportProps(), HandleExportSensors(), HandleExportWalkers(), and HandleExportWeather().
Referenced by AddCommands().
|
private |
Definition at line 837 of file ROSCommands.cpp.
References USimulatorJsonExporter::ExportInstancedActorsToJSON(), and UAssetLibrary::GetAllAddedFoliageActors().
Referenced by AddCommands(), and HandleExportAll().
|
private |
Definition at line 843 of file ROSCommands.cpp.
References USimulatorJsonExporter::ExportInstancedActorsToJSON(), and UAssetLibrary::GetAllAddedPropActors().
Referenced by AddCommands(), and HandleExportAll().
|
private |
Definition at line 804 of file ROSCommands.cpp.
References ASensor::ExportToJsonFile(), AVehicle::ExportToJsonFile(), GetGameWorld(), and Sensors.
Referenced by AddCommands(), and HandleExportAll().
|
private |
Definition at line 791 of file ROSCommands.cpp.
References AVehicle::ExportToJsonFile(), and UAssetLibrary::GetSpawnedVehicles().
Referenced by AddCommands().
|
private |
Definition at line 779 of file ROSCommands.cpp.
References UAssetLibrary::GetAllWalkers(), and Walker.
Referenced by AddCommands(), and HandleExportAll().
|
private |
Definition at line 770 of file ROSCommands.cpp.
References AWeather::ExportToJSON(), GetGameWorld(), and UAgrarsenseStatics::GetWeatherActor().
Referenced by AddCommands(), and HandleExportAll().
|
private |
Definition at line 1068 of file ROSCommands.cpp.
References Drone, FDroneParameters::DroneAction, FDroneParameters::DroneEndAction, IActorInformation::GetActorByID(), Roaming, and Transform.
Referenced by HandleMoveDroneToAndStop().
|
private |
Definition at line 957 of file ROSCommands.cpp.
References HandleMoveDroneTo(), and Stop.
Referenced by AddCommands().
|
private |
Definition at line 962 of file ROSCommands.cpp.
References FollowPath, IActorInformation::GetActorByID(), FWalkerParameters::Points, Transform, Walker, FWalkerParameters::WalkerAction, and FWalkerParameters::WalkerEndAction.
Referenced by HandleMoveWalkerToAndDestroy(), and HandleMoveWalkerToAndStop().
|
private |
Definition at line 947 of file ROSCommands.cpp.
References Destroy, and HandleMoveWalkerTo().
Referenced by AddCommands().
|
private |
Definition at line 952 of file ROSCommands.cpp.
References HandleMoveWalkerTo(), and Stop.
Referenced by AddCommands().
|
private |
Definition at line 349 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::PauseSimulationEndOfThisFrame().
Referenced by AddCommands().
|
private |
Definition at line 623 of file ROSCommands.cpp.
References PrintActorInformation().
Referenced by AddCommands().
|
private |
Definition at line 628 of file ROSCommands.cpp.
References PrintActorInformation().
Referenced by AddCommands().
|
private |
Definition at line 633 of file ROSCommands.cpp.
References PrintActorInformation().
|
private |
Definition at line 314 of file ROSCommands.cpp.
References CommandHandlers, CommandTopic, FCommand::DefaultValue, and SimulatorLog::Log().
Referenced by AddCommands().
|
private |
Definition at line 677 of file ROSCommands.cpp.
References IActorInformation::PrintAllIds().
Referenced by AddCommands().
|
private |
Definition at line 605 of file ROSCommands.cpp.
References UAgrarsenseSettings::GetMapNames(), GetSettings(), and SimulatorLog::Log().
Referenced by AddCommands().
|
private |
Definition at line 340 of file ROSCommands.cpp.
References GetGameWorld().
Referenced by AddCommands().
|
private |
Definition at line 1044 of file ROSCommands.cpp.
References HandleSetWalkerMovement().
Referenced by AddCommands().
|
private |
Definition at line 1147 of file ROSCommands.cpp.
References USensorUtilities::DisableAllSensors(), USensorUtilities::EnableAllSensors(), GetGameWorld(), and TryParseBoolean().
Referenced by AddCommands().
|
private |
Definition at line 682 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::SetGlobalTargetFrameRate().
Referenced by AddCommands().
|
private |
Definition at line 695 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::SetGlobalTimeDilation().
Referenced by AddCommands().
|
private |
Definition at line 1225 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::SetNaniteMaxPixelsPerEdge().
Referenced by AddCommands().
|
private |
Definition at line 708 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::SetQualityLevelFromString().
Referenced by AddCommands().
|
private |
Definition at line 733 of file ROSCommands.cpp.
References GetGameWorld(), UAgrarsenseStatics::GetLidarManager(), ALidarManager::SetSaveCombinedCloudToDisk(), and TryParseBoolean().
Referenced by AddCommands().
|
private |
Definition at line 1176 of file ROSCommands.cpp.
References IActorInformation::GetActorByID(), ASensor::SetSimulateSensor(), and TryParseBoolean().
Referenced by AddCommands().
|
private |
Definition at line 1049 of file ROSCommands.cpp.
References IActorInformation::GetActorByID(), and Walker.
Referenced by HandleResumeWalker(), and HandleStopWalker().
|
private |
Definition at line 717 of file ROSCommands.cpp.
References GetSettings(), UAgrarsenseSettings::SetWorldRendering(), and TryParseBoolean().
Referenced by AddCommands().
|
private |
Definition at line 1212 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::SetWorldPositionOffsetRenderDistance().
Referenced by AddCommands().
|
private |
Definition at line 749 of file ROSCommands.cpp.
References USimulatorJsonParser::ParseAndOperateJSONFile().
Referenced by AddCommands().
|
private |
Definition at line 1039 of file ROSCommands.cpp.
References HandleSetWalkerMovement().
Referenced by AddCommands().
|
private |
Definition at line 476 of file ROSCommands.cpp.
References IActorInformation::GetActorByID(), AVehicle::TogglePhysics(), and Transform.
Referenced by AddCommands().
|
private |
Definition at line 432 of file ROSCommands.cpp.
References GetGameWorld(), UAgrarsenseStatics::GetSpectator(), ASpectator::TeleportSpectator(), and Transform.
Referenced by AddCommands().
|
private |
Definition at line 558 of file ROSCommands.cpp.
References IActorInformation::DestroyActorByID(), and SimulatorLog::Log().
Referenced by AddCommands().
|
private |
Definition at line 358 of file ROSCommands.cpp.
References GetSettings(), and UAgrarsenseSettings::UnPauseSimulation().
Referenced by AddCommands().
|
private |
Definition at line 423 of file ROSCommands.cpp.
References GetGameWorld().
Referenced by AddCommands().
|
private |
Definition at line 849 of file ROSCommands.cpp.
References GetGameWorld(), AOverlapSensor::SetVisualizeOverlapArea(), and TryParseBoolean().
Referenced by AddCommands().
|
private |
Definition at line 46 of file ROSCommands.cpp.
References AddCommands(), GetGameWorld(), UAgrarsenseStatics::GetROSHandle(), UROSHandler::OnROSStateChanged, ROSBridgeStateChanged(), and SetupROSCommandTopic().
Referenced by AAgrarsenseGameModeBase::SpawnNeededActorsBeginPlay().
|
private |
Definition at line 241 of file ROSCommands.cpp.
References CommandHandlers, FCommand::CooldownTime, FCommand::Handler, FCommand::LastExecutionTime, and SimulatorLog::Log().
Referenced by SetupROSCommandTopic(), and TryExecuteCommand().
|
private |
Definition at line 638 of file ROSCommands.cpp.
References GetGameWorld(), and SimulatorLog::Log().
Referenced by HandlePrintAllSensors(), HandlePrintAllVehicles(), and HandlePrintAllWalkers().
|
private |
Definition at line 179 of file ROSCommands.cpp.
References Connected, DestroyROSTopic(), Disconnected, and SetupROSCommandTopic().
Referenced by Init().
|
private |
Definition at line 205 of file ROSCommands.cpp.
References CommandTopic, GetGameWorld(), UAgrarsenseStatics::GetROSGameInstance(), ParseIncomingMessage(), and RosInstance.
Referenced by Init(), and ROSBridgeStateChanged().
void UROSCommands::TryExecuteCommand | ( | const FString & | Command | ) |
Definition at line 64 of file ROSCommands.cpp.
References ParseIncomingMessage().
|
private |
Attempts to parse a string into a boolean value.
String | The string to parse into a boolean value. |
OutBool | A reference to a boolean where the result will be stored if the parsing is successful. |
Definition at line 295 of file ROSCommands.cpp.
Referenced by HandleSetAllSensorsEnabled(), HandleSetSaveCombinedPointcloudToDisk(), HandleSetSensorEnabled(), HandleSetWorldRendering(), and HandleVisualizeOverlapSensorsBounds().
|
friend |
Definition at line 62 of file ROSCommands.h.
|
staticprivate |
Definition at line 73 of file ROSCommands.h.
Referenced by AddCommands(), HandlePrintAvailableCommands(), and ParseIncomingMessage().
|
private |
Definition at line 102 of file ROSCommands.h.
Referenced by DestroyROSTopic(), HandlePrintAvailableCommands(), and SetupROSCommandTopic().
|
private |
Definition at line 105 of file ROSCommands.h.
Referenced by SetupROSCommandTopic().