Storing service response into a variable

asked 2016-11-23 15:31:57 -0500

215 gravatar image

How do i store a service response into a variable..

I made a custom service which service response is a string.

.srv is defined as such:

---
string response

How do make store that response into a variable in c++, such that i process the string?..

Basically..

how do i

std::string received =  X.response

Or is possible to process each character in the X.response somehow?

edit retag flag offensive close merge delete

Comments

2

Have you taken a look at this http://wiki.ros.org/ROS/Tutorials/Wri... Section 2.1

DavidN gravatar imageDavidN ( 2016-11-23 21:27:48 -0500 )edit