Added call on the server side to retrieve the BBs
This commit is contained in:
parent
1855d34c56
commit
33700bd6e3
|
@ -275,7 +275,6 @@ void FCarlaServer::FPimpl::BindActions()
|
|||
return Result;
|
||||
};
|
||||
|
||||
|
||||
BIND_SYNC(get_episode_settings) << [this]() -> R<cr::EpisodeSettings>
|
||||
{
|
||||
REQUIRE_CARLA_EPISODE();
|
||||
|
@ -307,6 +306,19 @@ void FCarlaServer::FPimpl::BindActions()
|
|||
return Episode->SerializeActor(ActorView);
|
||||
};
|
||||
|
||||
BIND_SYNC(get_all_level_BBs) << [this]() -> R<std::vector<cg::BoundingBox>>
|
||||
{
|
||||
REQUIRE_CARLA_EPISODE();
|
||||
TArray<FBoundingBox> Result;
|
||||
ACarlaGameModeBase* GameMode = UCarlaStatics::GetGameMode(Episode->GetWorld());
|
||||
if (!GameMode)
|
||||
{
|
||||
RESPOND_ERROR("unable to find CARLA game mode");
|
||||
}
|
||||
Result = GameMode->GetAllBBsOfLevel();
|
||||
return MakeVectorFromTArray<cg::BoundingBox>(Result);
|
||||
};
|
||||
|
||||
// ~~ Weather ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
BIND_SYNC(get_weather_parameters) << [this]() -> R<cr::WeatherParameters>
|
||||
|
|
Loading…
Reference in New Issue