Software
ros2_cheese
From github.com/HowardWhile/ros2_cheese (opens in a new tab)
- Perception
- Tool
- MIT
A ROS 2 package that saves camera images on demand: a trigger service captures the latest valid frame from an image topic and writes it to disk.
Facts
- GitHub stars
- 0read on 29 Nov 2026
- Last update
- 2 Oct 2026Newest commit on develop
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Beginner
Checked on GitHub on 29 Nov 2026.
Licenses
- Code
- MIT (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit e955acd (opens in a new tab), on 16 Oct 2026.
- Commercial use
- Yes
At a glance
- What it is
- Subscribes to a configurable image topic and saves a .jpg when a trigger service is called.
- Offers a standard std_srvs Trigger service and a string-trigger service that adds a filename suffix.
- Accepts both raw Image and CompressedImage messages, switching between them if one source stops supplying frames.
- Publishes a status topic once per second describing the image stream.
- Limits stored captures by file count and total storage size, with zero meaning unlimited.
- Provides a launch file with arguments for topic, output directory, node name, namespace, and limits.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- MIT. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Active, last commit on 2 Oct 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/HowardWhile/ros2_cheese (opens in a new tab)
- The version Robotheca reade955acd (opens in a new tab)
- Latest release0.1.1 (25 Aug 2026)
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by @HowardWhile, at commit e955acd, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
ros2_cheese
English | 繁體中文 (opens in a new tab)
A trigger-based image capture package for ROS 2.
Packages
| Package | Description |
|---|---|
cheese | Trigger-based image capture and storage |
cheese_interfaces | Custom service interfaces for Cheese |
Nodes
| Node | Description |
|---|---|
cheese | Subscribes to an image topic and saves an image when triggered |
Launch files
| Launch file | Description |
|---|---|
cheese.launch.py | Starts the Cheese image capture service |
Usage
Start the Cheese node:
ros2 run cheese cheese
In another terminal, call the standard ROS 2 service to capture an image:
ros2 service call /cheese/trigger std_srvs/srv/Trigger "{}"
You can also provide a string to use as the filename suffix:
ros2 service call /cheese/string_trigger cheese_interfaces/srv/StringTrigger "{message: test}"
The default output directory is:
/tmp/ros2_cheese
Services
| Service | Type | Description |
|---|---|---|
/cheese/trigger | std_srvs/srv/Trigger | Captures and saves an image |
/cheese/string_trigger | cheese_interfaces/srv/StringTrigger (opens in a new tab) | Captures an image and uses message as the filename suffix |
Topics
| Topic | Type | Description |
|---|---|---|
/cheese/status (opens in a new tab) | std_msgs/msg/String | Publishes image stream status once per second |
Parameters
Node parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
image_topic | string | /camera/color/image_raw | Image topic to subscribe to |
capture_dir | string | /tmp/ros2_cheese | Directory where captured images are stored |
max_files | integer | 1000 | Maximum number of images to retain; 0 means unlimited |
max_mb | integer | 1024 | Maximum storage size in MB; 0 means unlimited |
Launch arguments
| Argument | Type | Default | Description |
|---|---|---|---|
image_topic | string | /camera/color/image_raw | Value passed to the image_topic node parameter |
capture_dir | string | /tmp/ros2_cheese | Value passed to the capture_dir node parameter |
max_files | integer | 1000 | Value passed to the max_files node parameter |
max_mb | integer | 1024 | Value passed to the max_mb node parameter |
node_name | string | cheese | Name assigned to the node |
namespace | string | Empty | Namespace assigned to the node |
Advanced usage
Start the Cheese node with its launch file:
ros2 launch cheese cheese.launch.py
Specify an image topic:
ros2 launch cheese cheese.launch.py image_topic:=/camera/color/image_raw
Specify an output directory:
ros2 launch cheese cheese.launch.py capture_dir:=/tmp/ros2_cheese
Specify a node name:
ros2 launch cheese cheese.launch.py node_name:=camera_cheese
Specify a namespace:
ros2 launch cheese cheese.launch.py namespace:=camera node_name:=cheese
Set file count and storage limits:
ros2 launch cheese cheese.launch.py max_files:=1000 max_mb:=1024
Output
Successful captures are saved as .jpg files. The suffix is omitted when
message is empty:
/tmp/ros2_cheese/YYYYMMDD-HHMMSS-mmm-<message>.jpg
The service request's message is used as the filename suffix. Characters
that are unsuitable for filenames are replaced with _. The response's
message contains the full path of the saved image.
Notes
image_topic supports these ROS 2 message types:
sensor_msgs/msg/Image
sensor_msgs/msg/CompressedImage
Cheese detects image types from publishers and keeps the currently selected source while it supplies valid images. If both types are available initially, Image takes priority. If the selected type loses all publishers or supplies no valid image for 3 seconds, Cheese switches to the other available type. A new subscription is observed for at least 3 seconds before another timeout switch. Subscription creation failures are retried every second; invalid images are logged and discarded.
Both capture services return success: false before the first valid image,
while waiting for an image after a source switch, or when the last valid image
is more than 3 seconds old. Valid incoming images automatically restore capture.
Set max_files or max_mb to 0 to disable the corresponding limit.
Developer documentation
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.