---json {"name": "Thermal camera in RViz"} --- ====== AMG8833 thermal camera in RViz ====== {{ :axiom:ros2:ros2-thermal-rviz.jpg?nolink&760 |RViz thermal heatmap and pixel temperatures}} {{ :axiom:ros2:ros2-thermal-graph-7e5bec9.png?760&nolink |ThermalGrid through the thermal visualiser to RViz markers and labels}} Complete the [[:axiom:ros2:getting_started|host-driver setup]], using a supported AMG8833 profile and a working USB or Wi-Fi connection. This example uses board key ''%%axiom%%'' and namespace ''%%/axiom%%''; substitute another configured namespace throughout if needed. Use the automatic startup defaults; remove explicit false overrides for ''%%auto_connect%%'', ''%%auto_reconnect%%'' and ''%%autosub%%'' in this walkthrough. Attach the camera. If updating from older topic names, first [[:axiom:ros2:sensors_and_boards#updating_an_existing_installation|migrate local settings and rebuild]]. The diagram uses illustrative model/bus/address values; copy your actual camera path from discovery. The core build includes ''%%axiom_thermal_viz%%'' and its RViz configuration. The scenarios dashboard is optional. Run RViz in a graphical desktop session. If rebuilding or changing configuration, stop acquisition, disconnect and stop affected processes first. Rebuild from the repository root and reload the workspace: source scripts/setup_env.sh rosdep install --from-paths src --ignore-src -r -y colcon build --base-paths src --symlink-install source scripts/setup_env.sh Use the [[:axiom:ros2:getting_started#use_tmux_for_the_ros_consoles|four-pane tmux helper]], or prepare four Bash terminals at the checkout with ''%%source scripts/setup_env.sh%%''. Reused panes need that refresh after a rebuild. If retaining an existing connected/acquiring driver, continue at topic inspection rather than starting a second driver. ===== Terminal 1: driver ===== ros2 launch axiom_driver axiom.launch.py Leave it running. ===== Terminal 2: inspect ===== ros2 topic list -t --no-daemon Discovery connects and starts acquisition automatically. Find the exact ''grid'' topic, for example ''/axiom/amg8833_b1_169/grid'', of type ''%%axiom_interfaces/msg/ThermalGrid%%'' and replace the placeholder: THERMAL_TOPIC='PASTE_DISCOVERED_THERMAL_GRID_TOPIC_HERE' ros2 topic echo "$THERMAL_TOPIC" axiom_interfaces/msg/ThermalGrid \ --qos-reliability best_effort --once Expect width/height 8, 64 ''%%temperature_c%%'' values and a nonempty ''%%header.frame_id%%''. The prompt returns after one frame. Resolve missing data before continuing. The delivery request does not set the camera's sampling rate; actual frame rate depends on its sampling configuration. No thermal alias is required for the canonical sensor topic. Select ''grid'' for this Marker visualiser; the standard ''image'' output is for an Image viewer such as Foxglove. ===== Terminal 3: heatmap adapter ===== Variables belong to the terminal where they are set. Put the same discovered topic in this terminal, then start the visualiser: THERMAL_TOPIC='PASTE_DISCOVERED_THERMAL_GRID_TOPIC_HERE' ros2 run axiom_thermal_viz thermal_heatmap --ros-args \ -r __ns:=/sensing -p input_topic:="$THERMAL_TOPIC" \ -p output_topic:=thermal_heatmap -p use_dynamic_range:=false \ -p min_temperature:=15.0 -p max_temperature:=40.0 Leave it running. It publishes ''%%/sensing/thermal_heatmap%%'' markers and ''%%/sensing/thermal_heatmap_labels%%'' temperature labels, with a fixed 15–40 °C scale. Pixel order is retained rather than corrected for physical mounting. ===== Terminal 4: frame and RViz ===== Set the same camera topic in this terminal and read a live frame ID: THERMAL_TOPIC='PASTE_DISCOVERED_THERMAL_GRID_TOPIC_HERE' THERMAL_FRAME="$(ros2 topic echo "$THERMAL_TOPIC" \ axiom_interfaces/msg/ThermalGrid --field header.frame_id \ --qos-reliability best_effort --once | sed -n '1p')" printf '%s\n' "$THERMAL_FRAME" ros2 run rviz2 rviz2 \ -d "$(ros2 pkg prefix --share axiom_thermal_viz)/config/thermal.rviz" \ -f "${THERMAL_FRAME:?No camera frame received}" Run the frame and RViz commands in the same terminal. The display uses a Marker heatmap and MarkerArray pixel labels. Move a hand near the camera to see changing temperatures. Cell size is a display layout, not measured object size or position. For an empty display, check the raw grid, exact input topic, marker publisher and Fixed Frame. The heatmap can render in its own sensor frame without another TF node, though RViz can still report no global TF data. A robot-relative display needs the camera's actual mounting transform. Adjust the colour limits if temperatures are outside 15–40 °C. The standard thermal Image and grid outputs are unchanged by the scalar-message support. Pixel arrays are not flattened into automatic Float64 topics. Optional descriptor mappings support scalar inputs and does not replace this grid/Image adapter. See [[:axiom:ros2:standard_messages|Standard messages and mappings]] for other sensor quantities and availability. ===== Finish ===== Stop RViz and the adapter with Ctrl+C. In Terminal 2, use the board namespace from ''/axiom_discovery/boards'' (the board portion of your camera's path): BOARD_NS='PASTE_DISCOVERED_BOARD_NAMESPACE_HERE' ros2 service call "$BOARD_NS/publish_data_subscription" \ axiom_interfaces/srv/PublishedDataSubscription '{rate_hz: 0.0}' ros2 service call "$BOARD_NS/disconnect" axiom_interfaces/srv/Disconnect '{}' Then stop the driver. See [[https://github.com/robotical/axiom-ros2/blob/main/src/axiom_thermal_viz/README.md|visualiser parameters]] or the [[:axiom:ros2:foxglove#thermal_camera_on_one_axiom|Foxglove Image alternative]]. Published walkthrough: [[https://userguides.robotical.io/axiom/ros2/thermal_camera|Thermal camera in RViz]].