Proposal: Add SetString.srv to std_srvs
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 393
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Proposal: Add SetString.srv to std_srvs
Summary
I would like to propose adding a simple SetString.srv definition to the std_srvs package, similar in spirit to the existing SetBool.srv.
Motivation
std_srvs/SetBool provides a minimal and widely reusable pattern for simple command-style services:
bool data
---
bool success
string message
In practice, many systems require a similar pattern but with a string payload instead of a bool. A common example is mode switching, command dispatching, or passing standardized string-based instructions (e.g., from external protocols or industrial specifications).
Currently, developers must repeatedly define custom services such as:
string data
---
bool success
string message
across multiple packages and projects. This leads to unnecessary duplication of identical interface definitions and reduces interoperability.
Use Cases
Typical use cases include:
- Setting a mode by name (e.g.,
"AUTO","MANUAL","PAUSE") - Forwarding externally defined string commands
- Bridging industrial communication standards that rely on string-based command semantics
- Rapid prototyping and testing via CLI tools
In many real-world integrations (especially when ROS 2 is used as an interface layer rather than a full application framework), a generic SetString service would reduce friction and boilerplate.
Proposed Definition
string data
---
bool success
string message
This mirrors the structure and philosophy of SetBool, maintaining consistency within std_srvs.
I appreciate any feedback from maintainers and the community.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the proposed SetString.srv definition with the existing SetBool.srv service in std_srvs. Done means the new service exposes string data and returns bool success plus a string message, consistently with the stated proposal.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100