跳转到内容

uBot Identity

C++
UUBotIdentityComponent
父类
UActorComponent
类型
组件 · 可在 Components 面板添加
模块
UBotCore · UBotCore 0.1.2
头文件
Source/UBotCore/Public/UBotIdentityComponent.h

给机器人命名,供 ROS 桥等 uBot 使用方读取。所有字段都可以留空,带 Resolved 的节点按规则回退。名字取自 AActor::GetName(),不是编辑器里的标签,打包后结果不变。

纯函数 · UUBotIdentityComponent.GetBaseComponent

返回指定的场景组件;没有时返回所属 Actor 的根组件,也可能为空。

引脚方向类型
Return Value输出Scene Component对象引用

纯函数 · UUBotIdentityComponent.GetBaseFrameId

返回 Base Frame Id;留空时返回 base_link。

引脚方向类型
Return Value输出String

纯函数 · UUBotIdentityComponent.GetResolvedNamespace

返回 Namespace;留空时返回净化后的机器人 ID。

引脚方向类型
Return Value输出String

纯函数 · UUBotIdentityComponent.GetResolvedRobotId

返回 Robot Id;留空时返回所属 Actor 的名字,没有所属 Actor 时为空。

引脚方向类型
Return Value输出String

未特别标注的属性:蓝图里只读,Details 面板里可以编辑。

属性类型默认值说明
Base ComponentBaseComponent · uBot|IdentityComponent Reference结构体()作为机器人基座的场景组件。留空、解析不到或不是场景组件时,用所属 Actor 的根组件。
Base Frame IdBaseFrameId · uBot|IdentityStringbase_link机器人基座的 TF frame id。留空时用 base_link。
NamespaceNamespace · uBot|IdentityString""ROS 命名空间。留空时用净化后的机器人 ID;首尾的空白和 / 会被去掉。
Robot IdRobotId · uBot|IdentityString""机器人 ID。留空时用所属 Actor 的名字;首尾的空白会被去掉。