Review fixes.
This commit is contained in:
parent
ad2f05673c
commit
b10ee61808
|
@ -97,9 +97,6 @@ void ACarlaGameModeBase::InitGame(
|
||||||
Episode->SetRecorder(Recorder);
|
Episode->SetRecorder(Recorder);
|
||||||
|
|
||||||
ParseOpenDrive(MapName);
|
ParseOpenDrive(MapName);
|
||||||
|
|
||||||
SpawnSignals();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACarlaGameModeBase::RestartPlayer(AController *NewPlayer)
|
void ACarlaGameModeBase::RestartPlayer(AController *NewPlayer)
|
||||||
|
@ -196,37 +193,6 @@ void ACarlaGameModeBase::ParseOpenDrive(const FString &MapName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACarlaGameModeBase::SpawnSignals()
|
|
||||||
{
|
|
||||||
|
|
||||||
//const std::unordered_map<carla::road::SignId, std::unique_ptr<carla::road::Signal>>
|
|
||||||
const auto& Signals = Map->GetSignals();
|
|
||||||
const auto& Controllers = Map->GetControllers();
|
|
||||||
|
|
||||||
UE_LOG(LogCarla, Warning, TEXT("Num of signals = %d"), Signals.size());
|
|
||||||
UE_LOG(LogCarla, Warning, TEXT("Num of controllers = %d"), Controllers.size());
|
|
||||||
|
|
||||||
for(const auto& controller : Controllers) {
|
|
||||||
const auto& signals = controller.second->GetSignals();
|
|
||||||
const auto& junctions = controller.second->GetJunctions();
|
|
||||||
|
|
||||||
UE_LOG(LogCarla, Warning, TEXT("ContID = %s - Num of signals %d - Num of junctions %d"),
|
|
||||||
*FString(controller.first.c_str()),
|
|
||||||
signals.size(),
|
|
||||||
junctions.size());
|
|
||||||
|
|
||||||
for(const auto& signal : signals) {
|
|
||||||
UE_LOG(LogCarla, Warning, TEXT("Signal = %s"), *FString(signal.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(const auto& junction : junctions) {
|
|
||||||
UE_LOG(LogCarla, Warning, TEXT("Junction = %d"), junction);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ACarlaGameModeBase::DebugShowSignals(bool enable)
|
void ACarlaGameModeBase::DebugShowSignals(bool enable)
|
||||||
{
|
{
|
||||||
auto World = GetWorld();
|
auto World = GetWorld();
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
return Map;
|
return Map;
|
||||||
}
|
}
|
||||||
|
|
||||||
UFUNCTION(Exec, CallInEditor)
|
UFUNCTION(Exec, CallInEditor, DevelopmentOnly)
|
||||||
void DebugShowSignals(bool enable);
|
void DebugShowSignals(bool enable);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -65,8 +65,6 @@ private:
|
||||||
|
|
||||||
void ParseOpenDrive(const FString &MapName);
|
void ParseOpenDrive(const FString &MapName);
|
||||||
|
|
||||||
void SpawnSignals();
|
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
UCarlaGameInstance *GameInstance = nullptr;
|
UCarlaGameInstance *GameInstance = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,4 @@ const FString& USignComponent::GetSignId() const
|
||||||
|
|
||||||
void USignComponent::SetSignId(const FString &Id) {
|
void USignComponent::SetSignId(const FString &Id) {
|
||||||
SignId = Id;
|
SignId = Id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,4 +170,4 @@ UTrafficLightComponent* ATrafficLightManager::GetTrafficLight(FString SignId)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return TrafficLights[SignId];
|
return TrafficLights[SignId];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue