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

行人角色类,继承自Actor类。 更多...

#include <Walker.h>

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

Public 类型

using BoneControlIn = rpc::WalkerBoneControlIn
 行人骨骼控制输入的类型别名,对应rpc::WalkerBoneControlIn。 更多...
 
using BoneControlOut = rpc::WalkerBoneControlOut
 行人骨骼控制输出的类型别名,对应rpc::WalkerBoneControlOut。 更多...
 
using Control = rpc::WalkerControl
 行人控制指令的类型别名,对应rpc::WalkerControl。 更多...
 

Public 成员函数

void ApplyControl (const Control &control)
 应用控制指令给这个行人。 更多...
 
void BlendPose (float blend)
 混合姿态,通过给定的混合因子调整当前姿态和动画姿态之间的比例。 更多...
 
BoneControlOut GetBonesTransform ()
 获取行人骨骼的变换信息。 更多...
 
void GetPoseFromAnimation ()
 从动画中获取姿态。 更多...
 
Control GetWalkerControl () const
 获取最后应用给Walker对象的控制指令。 更多...
 
void HidePose ()
 隐藏动画姿态。 更多...
 
void SetBonesTransform (const BoneControlIn &bones)
 设置行人骨骼的变换信息。 更多...
 
void ShowPose ()
 显示动画姿态。 更多...
 
 Walker (ActorInitializer init)
 构造函数,使用ActorInitializer初始化Walker对象。 更多...
 
- Public 成员函数 继承自 carla::client::Actor
 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 属性

Control _control
 最后应用给Walker对象的控制指令。 更多...
 

额外继承的成员函数

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

详细描述

行人角色类,继承自Actor类。

Walker类代表CARLA模拟器中的一个行人角色,可以通过该类控制行人的行为和动作。

在文件 Walker.h22 行定义.

成员类型定义说明

◆ BoneControlIn

行人骨骼控制输入的类型别名,对应rpc::WalkerBoneControlIn。

在文件 Walker.h33 行定义.

◆ BoneControlOut

行人骨骼控制输出的类型别名,对应rpc::WalkerBoneControlOut。

在文件 Walker.h38 行定义.

◆ Control

行人控制指令的类型别名,对应rpc::WalkerControl。

在文件 Walker.h28 行定义.

构造及析构函数说明

◆ Walker()

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

构造函数,使用ActorInitializer初始化Walker对象。

参数
initActorInitializer对象,用于初始化Walker对象。

在文件 Walker.h44 行定义.

成员函数说明

◆ ApplyControl()

void carla::client::Walker::ApplyControl ( const Control control)

应用控制指令给这个行人。

参数
control控制指令,类型为Control。

在文件 Walker.cpp15 行定义.

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

+ 函数调用图:

◆ BlendPose()

void carla::client::Walker::BlendPose ( float  blend)

混合姿态,通过给定的混合因子调整当前姿态和动画姿态之间的比例。

参数
blend混合因子,范围在0.0到1.0之间。0.0表示完全隐藏动画姿态,1.0表示完全显示动画姿态。

在文件 Walker.cpp44 行定义.

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

被这些函数引用 HidePose() , 以及 ShowPose().

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

◆ GetBonesTransform()

Walker::BoneControlOut carla::client::Walker::GetBonesTransform ( )

获取行人骨骼的变换信息。

返回
返回行人骨骼的变换信息,类型为BoneControlOut。

在文件 Walker.cpp32 行定义.

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

+ 函数调用图:

◆ GetPoseFromAnimation()

void carla::client::Walker::GetPoseFromAnimation ( )

从动画中获取姿态。

这个函数会更新行人的姿态以匹配当前动画的状态。

在文件 Walker.cpp50 行定义.

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

+ 函数调用图:

◆ GetWalkerControl()

Walker::Control carla::client::Walker::GetWalkerControl ( ) const

获取最后应用给Walker对象的控制指令。

注解
这个函数不会调用模拟器,它返回的是在上一个节拍接收到的控制指令数据。
返回
返回最后应用的控制指令,类型为Control。

在文件 Walker.cpp26 行定义.

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

+ 函数调用图:

◆ HidePose()

void carla::client::Walker::HidePose ( )
inline

隐藏动画姿态。

这是一个便捷函数,等价于BlendPose(0.0f)。

在文件 Walker.h88 行定义.

引用了 BlendPose().

+ 函数调用图:

◆ SetBonesTransform()

void carla::client::Walker::SetBonesTransform ( const BoneControlIn bones)

设置行人骨骼的变换信息。

参数
bones行人骨骼的变换信息,类型为BoneControlIn。

在文件 Walker.cpp38 行定义.

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

+ 函数调用图:

◆ ShowPose()

void carla::client::Walker::ShowPose ( )
inline

显示动画姿态。

这是一个便捷函数,等价于BlendPose(1.0f)。

在文件 Walker.h82 行定义.

引用了 BlendPose().

+ 函数调用图:

类成员变量说明

◆ _control

Control carla::client::Walker::_control
private

最后应用给Walker对象的控制指令。

在文件 Walker.h101 行定义.

被这些函数引用 ApplyControl().


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