Agrarsense
|
#include <ROSHandler.h>
Public Member Functions | |
void | Setup (bool RosIsConnected) |
void | LaunchROSBridge () |
void | StopROSBridge () |
void | RestartROSBridge () |
bool | IsROSConnected () |
EROSState | GetROSState () |
Public Attributes | |
FROSDelegate_ROState | OnROSStateChanged |
Private Member Functions | |
void | OnROSBridgeChanged (EROSState newRosState) |
Private Attributes | |
EROSState | ROSState = EROSState::Disconnected |
FProcHandle | ROSProcessHandle |
FProcHandle | ROSBridgeHandle |
bool | ROSConnected = false |
This class handles launching ROS bridge when the Simulator starts. On Windows this tries to start ROS Bridge through wsl, On Linux we simply start another terminal window and attempt to launch ROS bridge.
Definition at line 27 of file ROSHandler.h.
|
inline |
|
inline |
Is simulation connected to ROS Bridge at the moment.
Definition at line 61 of file ROSHandler.h.
void UROSHandler::LaunchROSBridge | ( | ) |
Attempt to launch ROS Bridge. BlueprintCallable.
Definition at line 21 of file ROSHandler.cpp.
References ROSBridgeHandle, ROSConnected, and ROSProcessHandle.
Referenced by RestartROSBridge(), and AAgrarsenseGameModeBase::SpawnNeededActorsInitGame().
|
private |
Definition at line 117 of file ROSHandler.cpp.
References Connected, ROSConnected, and ROSState.
Referenced by Setup().
void UROSHandler::RestartROSBridge | ( | ) |
Shutdown ROS Bridge and then attempt to launch it again. BlueprintCallable.
Definition at line 111 of file ROSHandler.cpp.
References LaunchROSBridge(), and StopROSBridge().
void UROSHandler::Setup | ( | bool | RosIsConnected | ) |
Setup ROSHandler. Should only be called From AgrarsenseGameModeBase.
Definition at line 11 of file ROSHandler.cpp.
References Connected, Disconnected, OnROSBridgeChanged(), OnROSStateChanged, ROSConnected, and ROSState.
Referenced by AAgrarsenseGameModeBase::SpawnNeededActorsInitGame().
void UROSHandler::StopROSBridge | ( | ) |
Shutdown ROS Bridge. BlueprintCallable.
Definition at line 69 of file ROSHandler.cpp.
References ROSBridgeHandle, ROSConnected, and ROSProcessHandle.
Referenced by RestartROSBridge().
FROSDelegate_ROState UROSHandler::OnROSStateChanged |
On ROS State changed event
Definition at line 81 of file ROSHandler.h.
Referenced by ASensor::BeginPlay(), AWeather::BeginPlay(), ASensor::EndPlay(), AWeather::EndPlay(), UROSCommands::Init(), UAgrarsenseGameInstance::ROSBridgeConnected(), UAgrarsenseGameInstance::ROSBridgeDisconnected(), UInfoTopic::Setup(), and Setup().
|
private |
Definition at line 92 of file ROSHandler.h.
Referenced by LaunchROSBridge(), and StopROSBridge().
|
private |
Definition at line 94 of file ROSHandler.h.
Referenced by LaunchROSBridge(), OnROSBridgeChanged(), Setup(), and StopROSBridge().
|
private |
Definition at line 90 of file ROSHandler.h.
Referenced by LaunchROSBridge(), and StopROSBridge().
|
private |
Definition at line 88 of file ROSHandler.h.
Referenced by OnROSBridgeChanged(), and Setup().