Added large map funcionality for the ackermann controller
This commit is contained in:
parent
67e12c34ac
commit
a8497162ab
|
@ -106,6 +106,7 @@ void FVehicleData::RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* Carla
|
|||
Control = Vehicle->GetVehicleControl();
|
||||
AckermannControl = Vehicle->GetVehicleAckermannControl();
|
||||
bAckermannControlActive = Vehicle->IsAckermannControlActive();
|
||||
AckermannControllerSettings = Vehicle->GetAckermannControllerSettings();
|
||||
LightState = Vehicle->GetVehicleLightState();
|
||||
auto Controller = Cast<AWheeledVehicleAIController>(Vehicle->GetController());
|
||||
if (Controller)
|
||||
|
@ -124,6 +125,7 @@ void FVehicleData::RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* Carl
|
|||
{
|
||||
Vehicle->ApplyVehiclePhysicsControl(PhysicsControl);
|
||||
}
|
||||
Vehicle->ApplyAckermannControllerSettings(AckermannControllerSettings);
|
||||
if (!bAckermannControlActive)
|
||||
{
|
||||
Vehicle->ApplyVehicleControl(Control, EVehicleInputPriority::Client);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Math/DVector.h"
|
||||
#include "Carla/Vehicle/AckermannControllerSettings.h"
|
||||
#include "Carla/Vehicle/VehicleAckermannControl.h"
|
||||
#include "Carla/Vehicle/VehicleControl.h"
|
||||
#include "Carla/Vehicle/VehicleLightState.h"
|
||||
|
@ -62,6 +63,8 @@ public:
|
|||
|
||||
bool bAckermannControlActive = false;
|
||||
|
||||
FAckermannControllerSettings AckermannControllerSettings;
|
||||
|
||||
FVehicleLightState LightState;
|
||||
|
||||
float SpeedLimit = 30;
|
||||
|
|
|
@ -879,8 +879,8 @@ ECarlaServerResponse FVehicleActor::GetAckermannControllerSettings(
|
|||
{
|
||||
if (IsDormant())
|
||||
{
|
||||
//FVehicleData* ActorData = GetActorData<FVehicleData>();
|
||||
//PhysicsControl = ActorData->PhysicsControl;
|
||||
FVehicleData* ActorData = GetActorData<FVehicleData>();
|
||||
AckermannSettings = ActorData->AckermannControllerSettings;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -899,8 +899,8 @@ ECarlaServerResponse FVehicleActor::ApplyAckermannControllerSettings(
|
|||
{
|
||||
if (IsDormant())
|
||||
{
|
||||
// FVehicleData* ActorData = GetActorData<FVehicleData>();
|
||||
// ActorData->PhysicsControl = PhysicsControl;
|
||||
FVehicleData* ActorData = GetActorData<FVehicleData>();
|
||||
ActorData->AckermannControllerSettings = AckermannSettings;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue