TrafficLights spawned now are added to the episode
This commit is contained in:
parent
1fb733c085
commit
38d4c8d551
|
@ -166,7 +166,7 @@ static carla::Buffer FWorldObserver_Serialize(
|
|||
auto size = sizeof(Serializer::Header) + sizeof(ActorDynamicState) * Registry.Num();
|
||||
|
||||
// Set up buffer for writing.
|
||||
buffer.reset(size * 3);
|
||||
buffer.reset(size);
|
||||
auto begin = buffer.begin();
|
||||
auto write_data = [&begin, &buffer, &size](const auto &data)
|
||||
{
|
||||
|
@ -203,9 +203,10 @@ static carla::Buffer FWorldObserver_Serialize(
|
|||
FWorldObserver_GetActorComponentsState(View, Registry, ComponentsState);
|
||||
info.num_components = ComponentsState.Num();
|
||||
|
||||
carla::log_warning("Actor", TCHAR_TO_UTF8(*View.GetActor()->GetName()), info.num_components);
|
||||
|
||||
write_data(info);
|
||||
|
||||
/*
|
||||
if(info.num_components > 0) {
|
||||
size += info.num_components * sizeof(ComponentDynamicState);
|
||||
carla::log_warning("Num Components =", info.num_components,"(", size,")");
|
||||
|
@ -216,7 +217,6 @@ static carla::Buffer FWorldObserver_Serialize(
|
|||
write_data(CompState);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// Shrink buffer
|
||||
|
|
|
@ -103,6 +103,7 @@ void ATrafficLightManager::GenerateTrafficLights()
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& Signals = GetMap()->GetSignals();
|
||||
for(const auto& ControllerPair : GetMap()->GetControllers())
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "TrafficLightComponent.h"
|
||||
#include "TrafficLightGroup.h"
|
||||
#include "TrafficSignBase.h"
|
||||
#include "Game/CarlaGameModeBase.h"
|
||||
#include "Carla/OpenDrive/OpenDrive.h"
|
||||
#include "TrafficLightManager.generated.h"
|
||||
|
@ -63,7 +64,7 @@ private:
|
|||
TMap<FString, UTrafficLightComponent *> TrafficLights;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category= "Traffic Light Manager")
|
||||
TSubclassOf<AActor> TrafficLightModel;
|
||||
TSubclassOf<ATrafficSignBase> TrafficLightModel;
|
||||
|
||||
UPROPERTY(Category = "Traffic Light Manager", VisibleDefaultsOnly, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
|
||||
USceneComponent *SceneComponent;
|
||||
|
|
Loading…
Reference in New Issue