# Suggestions for std\_srvs

**URL:** <https://discourse.openrobotics.org/t/suggestions-for-std-srvs/1079>\
**Category:** ROS General\
**Created:** [January 9, 2017, 2:23pm UTC](https://discourse.openrobotics.org/t/suggestions-for-std-srvs/1079 "2017-01-09T14:23:30Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![wjwwood](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wjwwood/32/13715_2.png) [@wjwwood](https://discourse.openrobotics.org/u/wjwwood)\
**Post date:** [January 11, 2017, 9:17pm UTC](https://discourse.openrobotics.org/t/suggestions-for-std-srvs/1079/17 "2017-01-11T21:17:31Z")

</div>

There are some predefined services already:

- `Empty`: [ros\_comm\_msgs/std\_srvs/srv/Empty.srv at indigo-devel · ros/ros\_comm\_msgs · GitHub](https://github.com/ros/ros_comm_msgs/blob/indigo-devel/std_srvs/srv/Empty.srv)
- `SetBool`: [ros\_comm\_msgs/std\_srvs/srv/SetBool.srv at indigo-devel · ros/ros\_comm\_msgs · GitHub](https://github.com/ros/ros_comm_msgs/blob/indigo-devel/std_srvs/srv/SetBool.srv)
- `Trigger`: [ros\_comm\_msgs/std\_srvs/srv/Trigger.srv at indigo-devel · ros/ros\_comm\_msgs · GitHub](https://github.com/ros/ros_comm_msgs/blob/indigo-devel/std_srvs/srv/Trigger.srv)

From the list proposed, I could see enough grey area to allow `GetBool`, but the others I don’t think are good ideas. With bool, as @fmauch pointed out, you know what the valid inputs are (true and false). If only one of those, or neither, were valid, then you would use `Empty` or `Trigger` instead.

With the get/set of the other types, I think the possible values are not clear and would benefit from a more specific type. String is on the fence for me, but int and float I feel pretty strongly should have constants or units attached to them by using a custom Service type with comments. For example, using `SetFloat32` for a service called `/set_desired_temp` is the kind of abuse of these types we want to avoid. In the case of string, I could see cases where using just a set/get string service type would be ok, but most all of them would benefit from, if not require, further clarification in a custom service type.

---

_[View the full topic](https://discourse.openrobotics.org/t/suggestions-for-std-srvs/1079)._
