UBot ROSConventions Library
在蓝图里使用 ROS 专有的约定:相机光学系、builtin_interfaces/Time 的字段和 ROS 名字。对应 C++ 的 UBot::ROSConventions。ROS 用的 UE 与右手系轴向换算在 uBotCore 的坐标约定库里(类别 uBot|Conventions,节点 UE To Right-Handed …)。
Camera Link To Optical Rotation
Section titled “Camera Link To Optical Rotation”Camera Link To Optical RotationReturn Value
相机光学系(z 向前、x 向右、y 向下)相对相机 link 系的旋转,ROS 约定。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | Quat结构体 |
Get Optical Frame Suffix
Section titled “Get Optical Frame Suffix”Get Optical Frame SuffixReturn Value
接在相机 frame id 后面、组成光学系 frame id 的后缀 _optical。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Return Value | 输出 | String |
ROS Time To Seconds
Section titled “ROS Time To Seconds”ROS Time To SecondsSec0Nanosec0Return Value
把 builtin_interfaces/Time 的 sec 和 nanosec 换成秒。nanosec 为负数时按 0 处理。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| Sec | 输入 | Integer | 0 |
| Nanosec | 输入 | Integer | 0 |
| Return Value | 输出 | Float (double) |
Sanitize ROS Name
Section titled “Sanitize ROS Name”Sanitize ROS NameNameReturn Value
生成合法的 ROS 名字片段:只保留 A-Z、a-z、0-9 和下划线,连续下划线合并,首字符是数字时加前缀下划线,结果不会为空。
| 引脚 | 方向 | 类型 |
|---|---|---|
| Name | 输入 | String |
| Return Value | 输出 | String |
Seconds To ROS Time
Section titled “Seconds To ROS Time”Seconds To ROS TimeSeconds0.0SecNanosec
把秒换成 builtin_interfaces/Time 的 sec 和 nanosec。负数或非有限值得到 (0, 0)。
| 引脚 | 方向 | 类型 | 默认值 |
|---|---|---|---|
| Seconds | 输入 | Float (double) | 0.0 |
| Sec | 输出 | Integer | |
| Nanosec | 输出 | Integer |