Skip to main content

v2n-ros2-som-temperature

The smallest useful Alp SDK + ROS 2 node. It calls the portable temperature API in <alp/temperature.h> and republishes the values as sensor_msgs/Temperature: the SoC die temperature on /alp/soc_temperature and the on-module sensor on /alp/som_temperature. Runs on the Cortex-A55 under Yocto with ROS 2 Humble.

Source: examples/v2n/v2n-ros2-som-temperature/. New in alp-sdk v0.17.0.

warning
[UNTESTED]

It builds against a Yocto SDK that has ROS 2 Humble and the alp-sdk runtime. It is not built in CI and has not run on silicon; its HIL spec is not bench-verified.

alp_temperature_read_die_milli_c() --> /alp/soc_temperature
alp_temperature_read_milli_c() --> /alp/som_temperature
(portable Alp SDK API) sensor_msgs/Temperature [degC]

What it shows​

  • ROS 2 on the Cortex-A55 / Yocto side, with data from the portable API only — no chip driver, no vendor header, no SoM #ifdef. The same source runs on any E1M SoM that carries Linux.
  • Graceful degradation by status code: ALP_OK publishes, ALP_ERR_NOSUPPORT logs once and stays quiet, transient errors retry.
  • Parameters: period_ms (default 1000) and frame_id (default som).

Coverage today​

alp_temperature_read_die_milli_c() has a Linux backend (the cpu-thermal* thermal zones), so /alp/soc_temperature carries data on V2N / V2M. alp_temperature_read_milli_c() — the on-module sensor — is implemented on the Zephyr AEN backend only; on V2N / V2M it returns ALP_ERR_NOSUPPORT, so the node logs one notice and /alp/som_temperature stays silent until a Linux backend lands. The node source will not change when it does. For a V2N node that reads real sensors today, see v2n-m1-ros-perception.

board.yaml​

som:
sku: E1M-V2N101

preset: e1m-x-evk

cores:
a55_cluster:
app: ./src
recipe: alp-ros2-temperature # meta-alp-sdk/dynamic-layers/ros2-humble-layer/

diagnostics:
log_level: info

The ROS 2 stack is not a libraries: entry — it arrives with the image (IMAGE_FEATURES alp-ros, ALP_ENABLE_ROS2).

Build​

Two ways, from the same CMakeLists.txt:

  1. Yocto image — MACHINE=e1m-v2n101-a55 bitbake alp-image-edge with meta-ros2-humble in bblayers.conf. The node recipe alp-ros2-temperature is not in packagegroup-alp-ros yet; build it with bitbake alp-ros2-temperature.
  2. colcon in the Yocto SDK (bitbake alp-image-edge -c populate_sdk):
source /opt/<distro>/environment-setup-cortexa55-<distro>-linux
mkdir -p ~/ros_ws/src && cd ~/ros_ws/src
ln -s <alp-sdk>/examples/v2n/v2n-ros2-som-temperature alp_som_temperature
cd .. && colcon build --packages-select alp_som_temperature

Run​

ros2 run alp_som_temperature som_temperature_node
ros2 topic echo /alp/soc_temperature

See also​

Questions about this page? Email contact@alplab.ai