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

表示模拟中的一个行为体(Actor)。 更多...

#include <Actor.h>

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

Public 成员函数

 Actor (ActorInitializer init)
 
void AddAngularImpulse (const geom::Vector3D &vector)
 对行为体施加角冲量。
 
void AddForce (const geom::Vector3D &force)
 在行为体的质心施加力。
 
void AddForce (const geom::Vector3D &force, const geom::Vector3D &location)
 在某个位置对行为体施加力。
 
void AddImpulse (const geom::Vector3D &impulse, const geom::Vector3D &location)
 在某个位置对行为体施加冲量。
 
void AddImpulse (const geom::Vector3D &vector)
 在行为体的质心施加冲量。
 
void AddTorque (const geom::Vector3D &vector)
 对行为体施加扭矩。
 
virtual bool Destroy ()
 告诉模拟器销毁该行为体,并返回行为体是否成功被销毁的结果。
 
void DisableConstantVelocity ()
 禁用恒定速度模式。
 
void EnableConstantVelocity (const geom::Vector3D &vector)
 启用恒定速度模式。
 
geom::Vector3D GetAcceleration () const
 返回行为体的当前3D加速度。
 
rpc::ActorState GetActorState () const
 
geom::Vector3D GetAngularVelocity () const
 返回行为体的当前3D角速度。
 
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
 获取指定组件相对于Actor的相对坐标变换。 这个函数返回一个包含位置、旋转和平移信息的Transform对象, 表示指定组件相对于Actor原点的位置和方向。
 
geom::Transform GetComponentWorldTransform (const std::string componentName) const
 获取指定组件的世界坐标变换。 这个函数返回一个包含位置、旋转和平移信息的Transform对象, 表示指定组件在世界坐标系中的位置和方向。
 
geom::Location GetLocation () const
 返回行为体的当前位置。
 
std::vector< std::string > GetSocketNames () const
 
std::vector< geom::TransformGetSocketRelativeTransforms () const
 
std::vector< geom::TransformGetSocketWorldTransforms () const
 
geom::Transform GetTransform () const
 返回行为体的当前变换(位置和方向)。
 
geom::Vector3D GetVelocity () const
 返回行为体的当前3D速度。
 
bool IsActive () const
 
bool IsAlive () const
 
bool IsDormant () const
 
const auto & Serialize () const
 
void SetActorDead ()
 将行为体标记为已死亡并开始其生命周期。
 
void SetCollisions (bool enabled=true)
 启用或禁用该行为体的碰撞。
 
void SetEnableGravity (bool enabled=true)
 启用或禁用该行为体的重力。
 
void SetLocation (const geom::Location &location)
 将行为体传送到 location。
 
void SetSimulatePhysics (bool enabled=true)
 启用或禁用该行为体的物理模拟。
 
void SetTargetAngularVelocity (const geom::Vector3D &vector)
 在应用物理之前设置行为体的角速度。
 
void SetTargetVelocity (const geom::Vector3D &vector)
 在应用物理之前设置行为体的速度。
 
void SetTransform (const geom::Transform &transform)
 将行为体传送并旋转到 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 类型

using Super = detail::ActorState
 

额外继承的成员函数

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

详细描述

表示模拟中的一个行为体(Actor)。

在文件 client/Actor.h18 行定义.

成员类型定义说明

◆ Super

using carla::client::Actor::Super = detail::ActorState
private

在文件 client/Actor.h22 行定义.

构造及析构函数说明

◆ Actor()

carla::client::Actor::Actor ( ActorInitializer init)
inlineexplicit

在文件 client/Actor.h25 行定义.

◆ ~Actor()

virtual carla::client::Actor::~Actor ( )
virtualdefault

成员函数说明

◆ AddAngularImpulse()

void carla::client::Actor::AddAngularImpulse ( const geom::Vector3D & vector)

对行为体施加角冲量。

◆ AddForce() [1/2]

void carla::client::Actor::AddForce ( const geom::Vector3D & force)

在行为体的质心施加力。

◆ AddForce() [2/2]

void carla::client::Actor::AddForce ( const geom::Vector3D & force,
const geom::Vector3D & location )

在某个位置对行为体施加力。

◆ AddImpulse() [1/2]

void carla::client::Actor::AddImpulse ( const geom::Vector3D & impulse,
const geom::Vector3D & location )

在某个位置对行为体施加冲量。

◆ AddImpulse() [2/2]

void carla::client::Actor::AddImpulse ( const geom::Vector3D & vector)

在行为体的质心施加冲量。

◆ AddTorque()

void carla::client::Actor::AddTorque ( const geom::Vector3D & vector)

对行为体施加扭矩。

◆ Destroy()

virtual bool carla::client::Actor::Destroy ( )
virtual

告诉模拟器销毁该行为体,并返回行为体是否成功被销毁的结果。

注解
如果行为体已经成功销毁,则该函数没有效果。
警告
此函数会阻塞,直到模拟器完成销毁操作。

carla::client::ServerSideSensor 重载.

◆ DisableConstantVelocity()

void carla::client::Actor::DisableConstantVelocity ( )

禁用恒定速度模式。

◆ EnableConstantVelocity()

void carla::client::Actor::EnableConstantVelocity ( const geom::Vector3D & vector)

启用恒定速度模式。

◆ GetAcceleration()

geom::Vector3D carla::client::Actor::GetAcceleration ( ) const

返回行为体的当前3D加速度。

注解
该函数不会调用模拟器,而是返回根据行为体的速度计算的加速度。

◆ GetActorState()

rpc::ActorState carla::client::Actor::GetActorState ( ) const

被这些函数引用 IsActive(), IsAlive() , 以及 IsDormant().

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

◆ GetAngularVelocity()

geom::Vector3D carla::client::Actor::GetAngularVelocity ( ) const

返回行为体的当前3D角速度。

注解
该函数不会调用模拟器,而是返回上一个时刻接收到的角速度。

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

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

◆ GetBoneNames()

std::vector< std::string > carla::client::Actor::GetBoneNames ( ) const

◆ GetBoneRelativeTransforms()

std::vector< geom::Transform > carla::client::Actor::GetBoneRelativeTransforms ( ) const

◆ GetBoneWorldTransforms()

std::vector< geom::Transform > carla::client::Actor::GetBoneWorldTransforms ( ) const

◆ GetComponentNames()

std::vector< std::string > carla::client::Actor::GetComponentNames ( ) const

◆ GetComponentRelativeTransform()

geom::Transform carla::client::Actor::GetComponentRelativeTransform ( const std::string componentName) const

获取指定组件相对于Actor的相对坐标变换。 这个函数返回一个包含位置、旋转和平移信息的Transform对象, 表示指定组件相对于Actor原点的位置和方向。

参数
componentName要获取变换的组件名称。
返回
组件的相对坐标变换。

◆ GetComponentWorldTransform()

geom::Transform carla::client::Actor::GetComponentWorldTransform ( const std::string componentName) const

获取指定组件的世界坐标变换。 这个函数返回一个包含位置、旋转和平移信息的Transform对象, 表示指定组件在世界坐标系中的位置和方向。

参数
componentName要获取变换的组件名称。
返回
组件的世界坐标变换。

◆ GetLocation()

geom::Location carla::client::Actor::GetLocation ( ) const

返回行为体的当前位置。

注解
该函数不会调用模拟器,而是返回上一个时刻接收到的位置。

◆ GetSocketNames()

std::vector< std::string > carla::client::Actor::GetSocketNames ( ) const

◆ GetSocketRelativeTransforms()

std::vector< geom::Transform > carla::client::Actor::GetSocketRelativeTransforms ( ) const

◆ GetSocketWorldTransforms()

std::vector< geom::Transform > carla::client::Actor::GetSocketWorldTransforms ( ) const

◆ GetTransform()

geom::Transform carla::client::Actor::GetTransform ( ) const

返回行为体的当前变换(位置和方向)。

注解
该函数不会调用模拟器,而是返回上一个时刻接收到的变换。

被这些函数引用 carla::rss::RssCheck::GetSpeed(), carla::client::TrafficLight::GetStopWaypoints() , 以及 carla::client::RssSensor::TickRssSensorThreadLocked().

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

◆ GetVelocity()

geom::Vector3D carla::client::Actor::GetVelocity ( ) const

返回行为体的当前3D速度。

注解
该函数不会调用模拟器,而是返回上一个时刻接收到的速度。

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

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

◆ IsActive()

bool carla::client::Actor::IsActive ( ) const
inline

在文件 client/Actor.h146 行定义.

引用了 carla::rpc::Active, GetActorState(), carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid().

+ 函数调用图:

◆ IsAlive()

bool carla::client::Actor::IsAlive ( ) const
inline

在文件 client/Actor.h138 行定义.

引用了 GetActorState(), carla::client::detail::ActorState::GetEpisode(), carla::rpc::Invalid, carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid() , 以及 carla::rpc::PendingKill.

被这些函数引用 carla::client::ServerSideSensor::~ServerSideSensor().

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

◆ IsDormant()

bool carla::client::Actor::IsDormant ( ) const
inline

在文件 client/Actor.h142 行定义.

引用了 carla::rpc::Dormant, GetActorState(), carla::client::detail::ActorState::GetEpisode() , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::IsValid().

+ 函数调用图:

◆ Serialize()

const auto & carla::client::Actor::Serialize ( ) const
inline

在文件 client/Actor.h157 行定义.

引用了 carla::client::detail::ActorState::GetActorDescription().

+ 函数调用图:

◆ SetActorDead()

void carla::client::Actor::SetActorDead ( )

将行为体标记为已死亡并开始其生命周期。

◆ SetCollisions()

void carla::client::Actor::SetCollisions ( bool enabled = true)

启用或禁用该行为体的碰撞。

◆ SetEnableGravity()

void carla::client::Actor::SetEnableGravity ( bool enabled = true)

启用或禁用该行为体的重力。

◆ SetLocation()

void carla::client::Actor::SetLocation ( const geom::Location & location)

将行为体传送到 location。

◆ SetSimulatePhysics()

void carla::client::Actor::SetSimulatePhysics ( bool enabled = true)

启用或禁用该行为体的物理模拟。

◆ SetTargetAngularVelocity()

void carla::client::Actor::SetTargetAngularVelocity ( const geom::Vector3D & vector)

在应用物理之前设置行为体的角速度。

◆ SetTargetVelocity()

void carla::client::Actor::SetTargetVelocity ( const geom::Vector3D & vector)

在应用物理之前设置行为体的速度。

◆ SetTransform()

void carla::client::Actor::SetTransform ( const geom::Transform & transform)

将行为体传送并旋转到 transform。


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