ROS Service Client C++

asked 2018-05-02 17:35:32 -0500

Deba gravatar image

updated 2018-05-02 17:37:11 -0500

Hi,

Can anybody please suggest how I could publish matrix data values from a ros client? My srv declaration has float64[] as the response data type.

Not sure how I could write the client.call(srv) block.

Thanks in advance!

edit retag flag offensive close merge delete

Comments

You're question title mentions 'service client', then your question text talks about 'publishing'. That is confusing. Can you perhaps clarify a bit what it is that you're exactly trying to do?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-03 05:17:46 -0500 )edit
1

And 'matrix' doesn't exist as a msg type. Either use a list, an array or a vector. Or MultiArray. But all of this seems to lead to loss of semantics, so it might not be the best way to approach this.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-03 05:18:34 -0500 )edit

Hi, sorry, you are correct, my question is incorrectly worded. I implied, the response of the service, would be a matrix. Thank you for suggesting MultiArray, I will look into it.

Deba gravatar image Deba  ( 2018-05-03 10:31:01 -0500 )edit