Right sintax to call a service that receives a string as param

Hi,

I’ve struggled with this issue, too. Double quotes on the outside and single quotes inside worked for me.

Try the following syntax:
ros2 service call /my_srv custom_interfaces/srv/MyServiceMessage “data: ‘Turn right’”

Good luck!

3 Likes