CARLA
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Private 属性 | 所有成员列表
carla::client::Vehicle类 参考

#include <Vehicle.h>

+ 类 carla::client::Vehicle 继承关系图:
+ carla::client::Vehicle 的协作图:

Public 类型

using AckermannControl = rpc::VehicleAckermannControl
 
using Control = rpc::VehicleControl
 
using LightState = rpc::VehicleLightState::LightState
 
using PhysicsControl = rpc::VehiclePhysicsControl
 
using TelemetryData = rpc::VehicleTelemetryData
 
using TM = traffic_manager::TrafficManager
 
using VehicleDoor = rpc::VehicleDoor
 
using WheelLocation = carla::rpc::VehicleWheelLocation
 

Public 成员函数

void ApplyAckermannControl (const AckermannControl &control)
 Apply control to this vehicle.
 
void ApplyAckermannControllerSettings (const rpc::AckermannControllerSettings &settings)
 Apply Ackermann control settings to this vehicle
 
void ApplyControl (const Control &control)
 Apply control to this vehicle.
 
void ApplyPhysicsControl (const PhysicsControl &physics_control)
 Apply physics control to this vehicle.
 
void CloseDoor (const VehicleDoor door_idx)
 Close a door in this vehicle
 
void EnableCarSim (std::string simfile_path)
 Enables CarSim simulation if it is availiable
 
void EnableChronoPhysics (uint64_t MaxSubsteps, float MaxSubstepDeltaTime, std::string VehicleJSON="", std::string PowertrainJSON="", std::string TireJSON="", std::string BaseJSONPath="")
 
rpc::AckermannControllerSettings GetAckermannControllerSettings () const
 Return the last Ackermann controller settings applied to this vehicle.
 
Control GetControl () const
 Return the control last applied to this vehicle.
 
rpc::VehicleFailureState GetFailureState () const
 Returns the failure state of the vehicle
 
LightState GetLightState () const
 Return the current open lights (LightState) of this vehicle.
 
PhysicsControl GetPhysicsControl () const
 Return the physics control last applied to this vehicle.
 
float GetSpeedLimit () const
 Return the speed limit currently affecting this vehicle.
 
TelemetryData GetTelemetryData () const
 Return the telemetry data for this vehicle.
 
SharedPtr< TrafficLightGetTrafficLight () const
 Retrieve the traffic light actor currently affecting this vehicle.
 
rpc::TrafficLightState GetTrafficLightState () const
 Return the state of the traffic light currently affecting this vehicle.
 
float GetWheelSteerAngle (WheelLocation wheel_location)
 Return a Rotation from a wheel of the vehicle
 
bool IsAtTrafficLight ()
 Return whether a traffic light is affecting this vehicle.
 
void OpenDoor (const VehicleDoor door_idx)
 Open a door in this vehicle
 
void RestorePhysXPhysics ()
 
void SetAutopilot (bool enabled=true, uint16_t tm_port=TM_DEFAULT_PORT)
 Switch on/off this vehicle's autopilot.
 
void SetLightState (const LightState &light_state)
 Sets a LightState to this vehicle.
 
void SetWheelSteerDirection (WheelLocation wheel_location, float angle_in_deg)
 Sets a Rotation to a wheel of the vehicle (affects the bone of the car skeleton, not the physics)
 
void ShowDebugTelemetry (bool enabled=true)
 Switch on/off this vehicle's autopilot.
 
void UseCarSimRoad (bool enabled)
 Enables the use of CarSim internal road definition instead of unreal's
 
 Vehicle (ActorInitializer init)
 
- Public 成员函数 继承自 carla::client::Actor
 Actor (ActorInitializer init)
 
void AddAngularImpulse (const geom::Vector3D &vector)
 Add angular impulse to the actor.
 
void AddForce (const geom::Vector3D &force)
 Add force to the actor at its center of mass.
 
void AddForce (const geom::Vector3D &force, const geom::Vector3D &location)
 Add force to the actor at certain location.
 
void AddImpulse (const geom::Vector3D &impulse, const geom::Vector3D &location)
 Add impulse to the actor at certain location.
 
void AddImpulse (const geom::Vector3D &vector)
 Add impulse to the actor at its center of mass.
 
void AddTorque (const geom::Vector3D &vector)
 Add a torque to the actor.
 
virtual bool Destroy ()
 Tell the simulator to destroy this Actor, and return whether the actor was successfully destroyed.
 
void DisableConstantVelocity ()
 Disable the constant velocity mode
 
void EnableConstantVelocity (const geom::Vector3D &vector)
 Enable a constant velocity mode
 
geom::Vector3D GetAcceleration () const
 Return the current 3D acceleration of the actor.
 
rpc::ActorState GetActorState () const
 
geom::Vector3D GetAngularVelocity () const
 Return the current 3D angular velocity of the actor.
 
std::vector< std::string > GetBoneNames () const
 
std::vector< geom::TransformGetBoneRelativeTransforms () const
 
std::vector< geom::TransformGetBoneWorldTransforms () const
 
std::vector< std::string > GetComponentNames () const
 
geom::Transform GetComponentRelativeTransform (const std::string componentName) const
 
geom::Transform GetComponentWorldTransform (const std::string componentName) const
 
geom::Location GetLocation () const
 Return the current location of the actor.
 
std::vector< std::string > GetSocketNames () const
 
std::vector< geom::TransformGetSocketRelativeTransforms () const
 
std::vector< geom::TransformGetSocketWorldTransforms () const
 
geom::Transform GetTransform () const
 Return the current transform of the actor.
 
geom::Vector3D GetVelocity () const
 Return the current 3D velocity of the actor.
 
bool IsActive () const
 
bool IsAlive () const
 
bool IsDormant () const
 
const auto & Serialize () const
 
void SetActorDead ()
 Set actor as dead and starts his life span
 
void SetCollisions (bool enabled=true)
 Enable or disable collisions on this actor.
 
void SetEnableGravity (bool enabled=true)
 Enable or disable gravity on this actor.
 
void SetLocation (const geom::Location &location)
 Teleport the actor to location.
 
void SetSimulatePhysics (bool enabled=true)
 Enable or disable physics simulation on this actor.
 
void SetTargetAngularVelocity (const geom::Vector3D &vector)
 Set the angular velocity of the actor before applying physics.
 
void SetTargetVelocity (const geom::Vector3D &vector)
 Set the actor velocity before applying physics.
 
void SetTransform (const geom::Transform &transform)
 Teleport and rotate the actor to transform.
 
virtual ~Actor ()=default
 
- Public 成员函数 继承自 carla::client::detail::ActorState
const std::vector< ActorAttributeValue > & GetAttributes () const
 
const std::string & GetDisplayId () const
 
ActorId GetId () const
 
SharedPtr< ActorGetParent () const
 
ActorId GetParentId () const
 
const std::vector< uint8_t > & GetSemanticTags () const
 
const std::string & GetTypeId () const
 
World GetWorld () const
 

Private 属性

Control _control
 
const bool _is_control_sticky
 

额外继承的成员函数

- Protected 成员函数 继承自 carla::client::detail::ActorState
 ActorState (rpc::Actor description, EpisodeProxy episode)
 
const rpc::ActorGetActorDescription () const
 
const geom::BoundingBoxGetBoundingBox () const
 
EpisodeProxyGetEpisode ()
 
const EpisodeProxyGetEpisode () const
 

详细描述

在文件 Vehicle.h33 行定义.

成员类型定义说明

◆ AckermannControl

在文件 Vehicle.h37 行定义.

◆ Control

在文件 Vehicle.h36 行定义.

◆ LightState

在文件 Vehicle.h40 行定义.

◆ PhysicsControl

在文件 Vehicle.h38 行定义.

◆ TelemetryData

在文件 Vehicle.h39 行定义.

◆ TM

在文件 Vehicle.h41 行定义.

◆ VehicleDoor

在文件 Vehicle.h42 行定义.

◆ WheelLocation

在文件 Vehicle.h43 行定义.

构造及析构函数说明

◆ Vehicle()

carla::client::Vehicle::Vehicle ( ActorInitializer init)
explicit

在文件 Vehicle.cpp34 行定义.

成员函数说明

◆ ApplyAckermannControl()

void carla::client::Vehicle::ApplyAckermannControl ( const AckermannControl & control)

Apply control to this vehicle.

在文件 Vehicle.cpp62 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ ApplyAckermannControllerSettings()

void carla::client::Vehicle::ApplyAckermannControllerSettings ( const rpc::AckermannControllerSettings & settings)

Apply Ackermann control settings to this vehicle

在文件 Vehicle.cpp70 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ ApplyControl()

void carla::client::Vehicle::ApplyControl ( const Control & control)

Apply control to this vehicle.

在文件 Vehicle.cpp55 行定义.

引用了 _control, _is_control_sticky, carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ ApplyPhysicsControl()

void carla::client::Vehicle::ApplyPhysicsControl ( const PhysicsControl & physics_control)

Apply physics control to this vehicle.

在文件 Vehicle.cpp74 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ CloseDoor()

void carla::client::Vehicle::CloseDoor ( const VehicleDoor door_idx)

Close a door in this vehicle

在文件 Vehicle.cpp82 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ EnableCarSim()

void carla::client::Vehicle::EnableCarSim ( std::string simfile_path)

Enables CarSim simulation if it is availiable

在文件 Vehicle.cpp127 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ EnableChronoPhysics()

void carla::client::Vehicle::EnableChronoPhysics ( uint64_t MaxSubsteps,
float MaxSubstepDeltaTime,
std::string VehicleJSON = "",
std::string PowertrainJSON = "",
std::string TireJSON = "",
std::string BaseJSONPath = "" )

在文件 Vehicle.cpp135 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetAckermannControllerSettings()

rpc::AckermannControllerSettings carla::client::Vehicle::GetAckermannControllerSettings ( ) const

Return the last Ackermann controller settings applied to this vehicle.

警告
This function does call the simulator.

在文件 Vehicle.cpp66 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetControl()

Vehicle::Control carla::client::Vehicle::GetControl ( ) const

Return the control last applied to this vehicle.

注解
This function does not call the simulator, it returns the data received in the last tick.

在文件 Vehicle.cpp98 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

被这些函数引用 carla::rss::RssCheck::GetSteeringAngle().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ GetFailureState()

rpc::VehicleFailureState carla::client::Vehicle::GetFailureState ( ) const

Returns the failure state of the vehicle

在文件 Vehicle.cpp155 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetLightState()

Vehicle::LightState carla::client::Vehicle::GetLightState ( ) const

Return the current open lights (LightState) of this vehicle.

注解
This function does not call the simulator, it returns the data received in the last tick.

在文件 Vehicle.cpp106 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetPhysicsControl()

Vehicle::PhysicsControl carla::client::Vehicle::GetPhysicsControl ( ) const

Return the physics control last applied to this vehicle.

警告
This function does call the simulator.

在文件 Vehicle.cpp102 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetSpeedLimit()

float carla::client::Vehicle::GetSpeedLimit ( ) const

Return the speed limit currently affecting this vehicle.

注解
This function does not call the simulator, it returns the data received in the last tick.

在文件 Vehicle.cpp110 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetTelemetryData()

Vehicle::TelemetryData carla::client::Vehicle::GetTelemetryData ( ) const

Return the telemetry data for this vehicle.

警告
This function does call the simulator.

在文件 Vehicle.cpp47 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetTrafficLight()

SharedPtr< TrafficLight > carla::client::Vehicle::GetTrafficLight ( ) const

Retrieve the traffic light actor currently affecting this vehicle.

在文件 Vehicle.cpp122 行定义.

引用了 carla::client::detail::ActorState::GetEpisode(), carla::client::detail::ActorState::GetWorld() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetTrafficLightState()

rpc::TrafficLightState carla::client::Vehicle::GetTrafficLightState ( ) const

Return the state of the traffic light currently affecting this vehicle.

返回
Green If no traffic light is affecting the vehicle.
注解
This function does not call the simulator, it returns the data received in the last tick.

在文件 Vehicle.cpp114 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ GetWheelSteerAngle()

float carla::client::Vehicle::GetWheelSteerAngle ( WheelLocation wheel_location)

Return a Rotation from a wheel of the vehicle

注解
The function returns the rotation of the vehicle based on the it's physics

在文件 Vehicle.cpp94 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ IsAtTrafficLight()

bool carla::client::Vehicle::IsAtTrafficLight ( )

Return whether a traffic light is affecting this vehicle.

注解
This function does not call the simulator, it returns the data received in the last tick.

在文件 Vehicle.cpp118 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ OpenDoor()

void carla::client::Vehicle::OpenDoor ( const VehicleDoor door_idx)

Open a door in this vehicle

在文件 Vehicle.cpp78 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ RestorePhysXPhysics()

void carla::client::Vehicle::RestorePhysXPhysics ( )

在文件 Vehicle.cpp151 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ SetAutopilot()

void carla::client::Vehicle::SetAutopilot ( bool enabled = true,
uint16_t tm_port = TM_DEFAULT_PORT )

Switch on/off this vehicle's autopilot.

在文件 Vehicle.cpp38 行定义.

引用了 carla::client::detail::ActorState::GetEpisode(), carla::traffic_manager::TrafficManager::RegisterVehicles() , 以及 carla::traffic_manager::TrafficManager::UnregisterVehicles().

+ 函数调用图:

◆ SetLightState()

void carla::client::Vehicle::SetLightState ( const LightState & light_state)

Sets a LightState to this vehicle.

在文件 Vehicle.cpp86 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ SetWheelSteerDirection()

void carla::client::Vehicle::SetWheelSteerDirection ( WheelLocation wheel_location,
float angle_in_deg )

Sets a Rotation to a wheel of the vehicle (affects the bone of the car skeleton, not the physics)

在文件 Vehicle.cpp90 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ ShowDebugTelemetry()

void carla::client::Vehicle::ShowDebugTelemetry ( bool enabled = true)

Switch on/off this vehicle's autopilot.

在文件 Vehicle.cpp51 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

◆ UseCarSimRoad()

void carla::client::Vehicle::UseCarSimRoad ( bool enabled)

Enables the use of CarSim internal road definition instead of unreal's

在文件 Vehicle.cpp131 行定义.

引用了 carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

+ 函数调用图:

类成员变量说明

◆ _control

Control carla::client::Vehicle::_control
private

在文件 Vehicle.h156 行定义.

被这些函数引用 ApplyControl().

◆ _is_control_sticky

const bool carla::client::Vehicle::_is_control_sticky
private

在文件 Vehicle.h154 行定义.

被这些函数引用 ApplyControl().


该类的文档由以下文件生成: