CARLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FVehicleActor Class Reference

#include <CarlaActor.h>

+ Inheritance diagram for FVehicleActor:

Public Member Functions

virtual ECarlaServerResponse ApplyAckermannControllerSettings (const FAckermannControllerSettings &) final
 
virtual ECarlaServerResponse ApplyAckermannControlToVehicle (const FVehicleAckermannControl &, const EVehicleInputPriority &) final
 
virtual ECarlaServerResponse ApplyControlToVehicle (const FVehicleControl &, const EVehicleInputPriority &) final
 
virtual ECarlaServerResponse ApplyPhysicsControl (const FVehiclePhysicsControl &PhysicsControl) final
 
virtual ECarlaServerResponse CloseVehicleDoor (const EVehicleDoor DoorIdx) final
 
virtual ECarlaServerResponse DisableActorConstantAcceleration () final
 
virtual ECarlaServerResponse DisableActorConstantVelocity () final
 
virtual ECarlaServerResponse EnableActorConstantAcceleration (const FVector &Acceleration) final
 
virtual ECarlaServerResponse EnableActorConstantVelocity (const FVector &Velocity) final
 
virtual ECarlaServerResponse EnableCarSim (const FString &SimfilePath) final
 
virtual ECarlaServerResponse EnableChronoPhysics (uint64_t MaxSubsteps, float MaxSubstepDeltaTime, const FString &VehicleJSON, const FString &PowertrainJSON, const FString &TireJSON, const FString &BaseJSONPath) final
 
 FVehicleActor (IdType ActorId, AActor *Actor, TSharedPtr< const FActorInfo > Info, carla::rpc::ActorState InState, UWorld *World)
 
virtual ECarlaServerResponse GetAckermannControllerSettings (FAckermannControllerSettings &) final
 
virtual ECarlaServerResponse GetFailureState (carla::rpc::VehicleFailureState &) final
 
virtual ECarlaServerResponse GetPhysicsControl (FVehiclePhysicsControl &PhysicsControl) final
 
virtual ECarlaServerResponse GetVehicleAckermannControl (FVehicleAckermannControl &) final
 
virtual ECarlaServerResponse GetVehicleControl (FVehicleControl &) final
 
virtual ECarlaServerResponse GetVehicleLightState (FVehicleLightState &LightState) final
 
virtual ECarlaServerResponse GetVehicleTelemetryData (FVehicleTelemetryData &TelemetryData) final
 
virtual ECarlaServerResponse GetWheelPitchAngle (const EVehicleWheelLocation &WheelLocation, float &Angle) final
 
virtual ECarlaServerResponse GetWheelSteerAngle (const EVehicleWheelLocation &WheelLocation, float &Angle)
 
virtual ECarlaServerResponse GetWheelSuspensionOffset (const EVehicleWheelLocation &WheelLocation, float &Offset) final
 Offset in meters.
 
virtual ECarlaServerResponse OpenVehicleDoor (const EVehicleDoor DoorIdx) final
 
virtual ECarlaServerResponse SetActorAutopilot (bool bEnabled, bool bKeepState=false) final
 
virtual ECarlaServerResponse SetActorSimulatePhysics (bool bSimulatePhysics) final
 
virtual ECarlaServerResponse SetVehicleLightState (const FVehicleLightState &LightState) final
 
virtual ECarlaServerResponse SetWheelAnimationOverride (bool bEnabled) final
 
virtual ECarlaServerResponse SetWheelPitchAngle (const EVehicleWheelLocation &WheelLocation, float AngleInDeg) final
 
virtual ECarlaServerResponse SetWheelSteerDirection (const EVehicleWheelLocation &WheelLocation, float AngleInDeg) final
 
virtual ECarlaServerResponse SetWheelSuspensionOffset (const EVehicleWheelLocation &WheelLocation, float Offset) final
 Offset in meters.
 
virtual ECarlaServerResponse ShowVehicleDebugTelemetry (bool bEnabled) final
 
virtual ECarlaServerResponse UseCarSimRoad (bool bEnabled) final
 
- Public Member Functions inherited from FCarlaActor
ECarlaServerResponse AddActorAngularImpulse (const FVector &AngularInpulse)
 
ECarlaServerResponse AddActorForce (const FVector &Force)
 
ECarlaServerResponse AddActorForceAtLocation (const FVector &Force, const FVector &Location)
 
ECarlaServerResponse AddActorImpulse (const FVector &Impulse)
 
ECarlaServerResponse AddActorImpulseAtLocation (const FVector &Impulse, const FVector &Location)
 
ECarlaServerResponse AddActorTorque (const FVector &Torque)
 
void AddChildren (IdType ChildId)
 
virtual ECarlaServerResponse ApplyControlToWalker (const FWalkerControl &)
 
virtual ECarlaServerResponse BlendPose (float Blend)
 
void BuildActorData ()
 
void ClearMirroredKinematics ()
 
 FCarlaActor ()=default
 
 FCarlaActor (IdType ActorId, AActor *Actor, TSharedPtr< const FActorInfo > Info, carla::rpc::ActorState InState, UWorld *World)
 
virtual ECarlaServerResponse FreezeTrafficLight (bool)
 
AActor * GetActor ()
 
const AActor * GetActor () const
 
FVector GetActorAngularVelocity () const
 
ECarlaServerResponse GetActorBoneNames (TArray< FString > &Names) const
 
ECarlaServerResponse GetActorBoneRelativeTransforms (TArray< FTransform > &Transforms) const
 
ECarlaServerResponse GetActorBoneWorldTransforms (TArray< FTransform > &Transforms) const
 
ECarlaServerResponse GetActorComponentNames (TArray< FString > &Names) const
 
ECarlaServerResponse GetActorComponentRelativeTransform (const FString &ComponentName, FTransform &Transform) const
 
ECarlaServerResponse GetActorComponentWorldTransform (const FString &ComponentName, FTransform &Transform) const
 
FActorData * GetActorData ()
 
template<typename T >
T * GetActorData ()
 
const FActorData * GetActorData () const
 
template<typename T >
const T * GetActorData () const
 
FVector GetActorGlobalLocation () const
 
FTransform GetActorGlobalTransform () const
 
IdType GetActorId () const
 
const FActorInfo * GetActorInfo () const
 
FVector GetActorLocalLocation () const
 
FTransform GetActorLocalTransform () const
 
ECarlaServerResponse GetActorRigSnapshot (FActorRigSnapshot &Rig) const
 
ECarlaServerResponse GetActorSocketNames (TArray< FString > &Names) const
 
ECarlaServerResponse GetActorSocketRelativeTransforms (TArray< FTransform > &Transforms) const
 
ECarlaServerResponse GetActorSocketWorldTransforms (TArray< FTransform > &Transforms) const
 
carla::rpc::ActorState GetActorState () const
 
ActorType GetActorType () const
 
virtual FVector GetActorVelocity () const
 
carla::rpc::AttachmentType GetAttachmentType () const
 
virtual ECarlaServerResponse GetBonesTransform (FWalkerBoneControlOut &)
 
const TArray< IdType > & GetChildren () const
 
FVector GetMirroredAngularVelocityInRadians () const
 
uint64 GetMirroredKinematicsFrame () const
 
IdType GetParent () const
 
virtual ECarlaServerResponse GetPoseFromAnimation ()
 
IdType GetPrimaryActorId () const
 The id clients know this actor by: the primary's for a mirror on a Multi-GPU secondary, this actor's own id everywhere else.
 
virtual UTrafficLightController * GetTrafficLightController ()
 
virtual ETrafficLightState GetTrafficLightState () const
 
virtual ECarlaServerResponse GetWalkerControl (FWalkerControl &)
 
bool HasMirroredKinematics () const
 
bool IsActive () const
 
bool IsAlive () const
 
bool IsDormant () const
 
bool IsInValid () const
 
bool IsPendingKill () const
 
void PutActorToSleep (UCarlaEpisode *CarlaEpisode)
 
void RemoveChildren (IdType ChildId)
 
virtual ECarlaServerResponse ResetTrafficLightGroup ()
 
virtual ECarlaServerResponse SetActorCollisions (bool bEnabled)
 
virtual ECarlaServerResponse SetActorDead ()
 
virtual ECarlaServerResponse SetActorEnableGravity (bool bEnabled)
 
void SetActorGlobalLocation (const FVector &Location, ETeleportType Teleport=ETeleportType::TeleportPhysics)
 
void SetActorGlobalTransform (const FTransform &Transform, ETeleportType Teleport=ETeleportType::TeleportPhysics)
 
void SetActorLocalLocation (const FVector &Location, ETeleportType Teleport=ETeleportType::TeleportPhysics)
 
void SetActorLocalTransform (const FTransform &Transform, ETeleportType Teleport=ETeleportType::TeleportPhysics)
 
void SetActorState (carla::rpc::ActorState InState)
 
ECarlaServerResponse SetActorTargetAngularVelocity (const FVector &AngularVelocity)
 
ECarlaServerResponse SetActorTargetVelocity (const FVector &Velocity)
 
void SetAttachmentType (carla::rpc::AttachmentType InAttachmentType)
 
virtual ECarlaServerResponse SetBonesTransform (const FWalkerBoneControlIn &)
 
virtual ECarlaServerResponse SetLightGreenTime (float)
 
virtual ECarlaServerResponse SetLightRedTime (float)
 
virtual ECarlaServerResponse SetLightYellowTime (float)
 
void SetMirroredKinematics (const FVector &Velocity, const FVector &AngularVelocityRadians, uint64 Frame)
 Multi-GPU secondary: the primary's velocities of the actor this one mirrors, in the world frame (cm/s and rad/s), of primary frame Frame.
 
void SetParent (IdType InParentId)
 
void SetPrimaryActorId (IdType InPrimaryActorId)
 Multi-GPU secondary: the id the primary gave the actor this one mirrors.
 
virtual ECarlaServerResponse SetTrafficLightState (const ETrafficLightState &)
 
virtual ECarlaServerResponse SetWalkerState (const FTransform &Transform, carla::rpc::WalkerControl WalkerControl)
 
ECarlaServerResponse ToWorld (const TArray< FTransform > &Relative, TArray< FTransform > &Transforms) const
 
void WakeActorUp (UCarlaEpisode *CarlaEpisode)
 
virtual ~FCarlaActor ()
 

Additional Inherited Members

- Public Types inherited from FCarlaActor
enum class  ActorType : uint8 {
  Other , Vehicle , Walker , TrafficLight ,
  TrafficSign , Sensor , INVALID
}
 
using IdType = uint32
 
- Static Public Member Functions inherited from FCarlaActor
static TSharedPtr< FCarlaActor > ConstructCarlaActor (IdType ActorId, AActor *Actor, TSharedPtr< const FActorInfo > Info, ActorType Type, carla::rpc::ActorState InState, UWorld *World)
 
- Protected Attributes inherited from FCarlaActor
TSharedPtr< FActorData > ActorData = nullptr
 
bool bHasMirroredKinematics = false
 
FVector MirroredAngularVelocity = FVector::ZeroVector
 
uint64 MirroredKinematicsFrame = 0u
 
FVector MirroredVelocity = FVector::ZeroVector
 
ActorType Type = ActorType::INVALID
 
UWorld * World = nullptr
 

Detailed Description

Definition at line 605 of file CarlaActor.h.

Constructor & Destructor Documentation

◆ FVehicleActor()

FVehicleActor::FVehicleActor ( IdType  ActorId,
AActor *  Actor,
TSharedPtr< const FActorInfo >  Info,
carla::rpc::ActorState  InState,
UWorld *  World 
)

Definition at line 57 of file CarlaActor.cpp.

References FCarlaActor::ActorData, FCarlaActor::Type, and FCarlaActor::Vehicle.

Member Function Documentation

◆ ApplyAckermannControllerSettings()

ECarlaServerResponse FVehicleActor::ApplyAckermannControllerSettings ( const FAckermannControllerSettings &  AckermannSettings)
finalvirtual

◆ ApplyAckermannControlToVehicle()

ECarlaServerResponse FVehicleActor::ApplyAckermannControlToVehicle ( const FVehicleAckermannControl &  AckermannControl,
const EVehicleInputPriority &  Priority 
)
finalvirtual

◆ ApplyControlToVehicle()

ECarlaServerResponse FVehicleActor::ApplyControlToVehicle ( const FVehicleControl &  Control,
const EVehicleInputPriority &  Priority 
)
finalvirtual

◆ ApplyPhysicsControl()

ECarlaServerResponse FVehicleActor::ApplyPhysicsControl ( const FVehiclePhysicsControl &  PhysicsControl)
finalvirtual

◆ CloseVehicleDoor()

ECarlaServerResponse FVehicleActor::CloseVehicleDoor ( const EVehicleDoor  DoorIdx)
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 949 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NotAVehicle, Success, and FCarlaActor::Vehicle.

◆ DisableActorConstantAcceleration()

ECarlaServerResponse FVehicleActor::DisableActorConstantAcceleration ( )
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 845 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NullActor, and Success.

◆ DisableActorConstantVelocity()

ECarlaServerResponse FVehicleActor::DisableActorConstantVelocity ( )
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 811 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NullActor, and Success.

◆ EnableActorConstantAcceleration()

ECarlaServerResponse FVehicleActor::EnableActorConstantAcceleration ( const FVector &  Acceleration)
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 828 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NullActor, and Success.

◆ EnableActorConstantVelocity()

ECarlaServerResponse FVehicleActor::EnableActorConstantVelocity ( const FVector &  Velocity)
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 794 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NullActor, and Success.

◆ EnableCarSim()

ECarlaServerResponse FVehicleActor::EnableCarSim ( const FString &  SimfilePath)
finalvirtual

◆ EnableChronoPhysics()

ECarlaServerResponse FVehicleActor::EnableChronoPhysics ( uint64_t  MaxSubsteps,
float  MaxSubstepDeltaTime,
const FString &  VehicleJSON,
const FString &  PowertrainJSON,
const FString &  TireJSON,
const FString &  BaseJSONPath 
)
finalvirtual

◆ GetAckermannControllerSettings()

ECarlaServerResponse FVehicleActor::GetAckermannControllerSettings ( FAckermannControllerSettings &  AckermannSettings)
finalvirtual

◆ GetFailureState()

ECarlaServerResponse FVehicleActor::GetFailureState ( carla::rpc::VehicleFailureState &  FailureState)
finalvirtual

◆ GetPhysicsControl()

ECarlaServerResponse FVehicleActor::GetPhysicsControl ( FVehiclePhysicsControl &  PhysicsControl)
finalvirtual

◆ GetVehicleAckermannControl()

ECarlaServerResponse FVehicleActor::GetVehicleAckermannControl ( FVehicleAckermannControl &  VehicleAckermannControl)
finalvirtual

◆ GetVehicleControl()

ECarlaServerResponse FVehicleActor::GetVehicleControl ( FVehicleControl &  VehicleControl)
finalvirtual

◆ GetVehicleLightState()

ECarlaServerResponse FVehicleActor::GetVehicleLightState ( FVehicleLightState &  LightState)
finalvirtual

◆ GetVehicleTelemetryData()

ECarlaServerResponse FVehicleActor::GetVehicleTelemetryData ( FVehicleTelemetryData &  TelemetryData)
finalvirtual

◆ GetWheelPitchAngle()

ECarlaServerResponse FVehicleActor::GetWheelPitchAngle ( const EVehicleWheelLocation &  WheelLocation,
float &  Angle 
)
finalvirtual

◆ GetWheelSteerAngle()

ECarlaServerResponse FVehicleActor::GetWheelSteerAngle ( const EVehicleWheelLocation &  WheelLocation,
float &  Angle 
)
virtual

◆ GetWheelSuspensionOffset()

ECarlaServerResponse FVehicleActor::GetWheelSuspensionOffset ( const EVehicleWheelLocation &  WheelLocation,
float &  Offset 
)
finalvirtual

Offset in meters.

Reimplemented from FCarlaActor.

Definition at line 1124 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NotAVehicle, Success, FCarlaActor::Vehicle, and WheelNotFound.

◆ OpenVehicleDoor()

ECarlaServerResponse FVehicleActor::OpenVehicleDoor ( const EVehicleDoor  DoorIdx)
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 935 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NotAVehicle, Success, and FCarlaActor::Vehicle.

◆ SetActorAutopilot()

ECarlaServerResponse FVehicleActor::SetActorAutopilot ( bool  bEnabled,
bool  bKeepState = false 
)
finalvirtual

◆ SetActorSimulatePhysics()

ECarlaServerResponse FVehicleActor::SetActorSimulatePhysics ( bool  bSimulatePhysics)
finalvirtual

◆ SetVehicleLightState()

ECarlaServerResponse FVehicleActor::SetVehicleLightState ( const FVehicleLightState &  LightState)
finalvirtual

◆ SetWheelAnimationOverride()

ECarlaServerResponse FVehicleActor::SetWheelAnimationOverride ( bool  bEnabled)
finalvirtual

◆ SetWheelPitchAngle()

ECarlaServerResponse FVehicleActor::SetWheelPitchAngle ( const EVehicleWheelLocation &  WheelLocation,
float  AngleInDeg 
)
finalvirtual

◆ SetWheelSteerDirection()

ECarlaServerResponse FVehicleActor::SetWheelSteerDirection ( const EVehicleWheelLocation &  WheelLocation,
float  AngleInDeg 
)
finalvirtual

◆ SetWheelSuspensionOffset()

ECarlaServerResponse FVehicleActor::SetWheelSuspensionOffset ( const EVehicleWheelLocation &  WheelLocation,
float  Offset 
)
finalvirtual

Offset in meters.

Reimplemented from FCarlaActor.

Definition at line 1104 of file CarlaActor.cpp.

References CanSetWheelPose(), FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NotAVehicle, Success, and FCarlaActor::Vehicle.

◆ ShowVehicleDebugTelemetry()

ECarlaServerResponse FVehicleActor::ShowVehicleDebugTelemetry ( bool  bEnabled)
finalvirtual

Reimplemented from FCarlaActor.

Definition at line 1323 of file CarlaActor.cpp.

References FCarlaActor::GetActor(), FCarlaActor::IsDormant(), NotAVehicle, Success, and FCarlaActor::Vehicle.

◆ UseCarSimRoad()

ECarlaServerResponse FVehicleActor::UseCarSimRoad ( bool  bEnabled)
finalvirtual

The documentation for this class was generated from the following files: