CPU Interface

This package provides an interface for CPU temperature monitoring.

CPU Interface Node (Only for development and debugging)

This ROS Node is used to run the CPU interface in standalone.

CPU Interface Core

It is instantiated by the Niryo Robot Hardware Interface node.

It is responsible to monitor CPU temperature of the Raspberry Pi and automatically shutdown the Raspberry Pi if it reaches a critical threshold. Two thresholds can be defined via parameters: a warning threshold and a shutdown threshold.

The CPU temperature is read from the Ubuntu system file /sys/class/thermal/thermal_zone0/temp.

In simulation, the CPU temperature of the computer running the simulation is used, but the threshold are deactivated (no shutdown in case of high temperature).

It belongs to the ROS namespace: /cpu_interface.

Configuration

The configuration for the CPU interface node is defined in the default.yaml config file.

1read_rpi_diagnostics_frequency : 0.25
2temperature_warn_threshold: 75
3temperature_shutdown_threshold: 85

Package Documentation

For more informations about ROS topics, services and parameters, check the Niryo robot hardware interface documentation.

ROS Parameters

Parameter Name

Default value

Simulation value

Unit

Description

/niryo_robot_hardware_interface/cpu_interface/read_rpi_diagnostics_frequency

0.25

N/A

Hz

Frequency at which the Raspberry Pi diagnostics are read

/niryo_robot_hardware_interface/cpu_interface/simulation_mode

True

N/A

bool

Whether the CPU interface is in simulation mode or not

/niryo_robot_hardware_interface/cpu_interface/temperature_shutdown_threshold

85

N/A

°C

CPU Temperature threshold at which the robot should shutdown

/niryo_robot_hardware_interface/cpu_interface/temperature_warn_threshold

75

N/A

°C

CPU Temperature threshold at which the robot should warn the user

ROS Action

Namespace: None