Skip to main content
qrb_ros_battery 包通过 DBus 与电池服务通信。电池服务通过访问 sys 节点获取当前电池状态。

qrb_ros_battery 的管道流程

下图展示了 qrb_ros_battery 的管道流程。
QRB ROS Battery node wrapping the battery package, collecting voltage, temperature, current, charge, and capacity, and publishing /battery_stats.

qrb_ros_battery 管道。

qrb_ros_battery 管道中使用的 ROS 节点

下表列出了 qrb_ros_battery 管道中使用的 ROS 节点,并说明每个节点的功能。

qrb_ros_battery 管道中使用的 ROS 话题

下表列出了 qrb_ros_battery 管道中使用的 ROS 话题,以及每个话题的消息类型和说明。

前提条件

你已根据安装 QIR SDK完成设备设置,并在设备上安装了 ROS2 Jazzy 和 Qualcomm Intelligent Robotics (QIR) SDK。

开箱即用运行 qrb_ros_battery

1

运行电池节点

Run the battery node
2

获取该节点的话题

List the ROS topics
3

回显电池信息

Echo the battery topic

示例输出

下图展示了 ros2 topic echo /battery_stats 的终端输出。
Terminal output of the battery_stats topic listing voltage, temperature, current, charge, capacity, percentage, power supply status, and serial number.