How to pass number as a string to a rosservice?
I have a rosservice that takes a string as an argument. That string may be an integer (or rather, the string representation of an integer). However, when I try to call the service with the number, it tries to pass it as a number, which fails. I've tried putting the number in quotes, but that doesn't change anything. I think it has to do with the rosservice command line utility using yaml to parse the command.
Is there any good solution or workaround?
$ rosservice call /config_set gnss 1
ERROR: Unable to send request. One of the fields has an incorrect type:
field configuration must be of type str
srv file:
string device
string configuration
---
bool successful
bool reboot_required
string message
The srv file, if needed:
# Set a configuration setting
string device # The device whose configuration is being set, either a name or a number
string configuration # The new configuration option for the device, either a name or a number
---
bool successful
bool reboot_required
string message # Either an error message or more specific response. May be from rosflight_io or from the firmware