Skip to main content
The qrb_ros_system_monitor sample application has various ROS nodes that publish system status information, such as CPU loading, memory usage, and disk space.

Pipeline for qrb_ros_system_monitor

The figure shows the pipeline, which collects system information with the sysfs node and some system standard command tools, and then publishes these data with ROS messages.

Figure: qrb_ros_system_monitor pipeline

ROS nodes used in the qrb_ros_system_monitor pipeline

ROS topics used in the qrb_ros_system_monitor pipeline

ROS topicMessage typePublished/Subscribed byDescription
/cpuqrb_ros_system_monitor::CpuMonitorPublished by CpuMonitorPublishes the CPU loading information.
/memoryqrb_ros_system_monitor::MemoryMonitorPublished by MemoryMonitorPublishes the memory usage information.
/diskqrb_ros_system_monitor::DiskMonitorPublished by DiskMonitorPublishes the disk space information.
/swapqrb_ros_system_monitor::SwapMonitorPublished by SwapMonitorPublishes the swap space information.
/temperatureqrb_ros_system_monitor::TemperatureMonitorPublished by TemperatureMonitorPublishes the CPU temperature.
/batteryqrb_ros_system_monitor::BatteryMonitorPublished by BatteryMonitorPublishes the battery information.

ROS services used in the qrb_ros_system_monitor pipeline

ROS topicMessage typeServed byDescription
/system_info_serverqrb_ros_system_monitor::SystemInfoServerSystemInfoServerPublishes static system information, such as CPU count.

Prerequisites

You have Set up the device according to Set up the environment for running sample applications.

Run out-of-the-box qrb_ros_system_monitor

  1. Start two terminals, and run the following commands in each terminal to set up QIR SDK and ROS2 environment on the device.
  2. In terminal 1, run the system monitor ROS node.
  3. In terminal 2, check the system information with ROS topic.

Build and run qrb_ros_system_monitor

  1. Build qrb_ros_system_monitor provided by the QIR SDK on the host computer.
  2. Push qrb_ros_system_monitor to the device.
    NoteEnsure that the QIR SDK is installed on the device.
  3. Start two terminals, and run the following commands in each terminal to set up QIR SDK and ROS2 environment on the device.
  4. In terminal 1, run the system monitor ROS node.
  5. In terminal 2, get the system information.

Limitation

The sysfs node and Linux standard command-line tools collect the system information values. Therefore, if the sysfs path changes or the output format of command-line tools changes, those ROS nodes may not work as expected.