Ask Your Question
0

How to use C++ subscribe to a custom msg array published by Python

asked 2019-05-30 06:00:25 -0600

ffzj gravatar image

updated 2019-05-30 06:02:19 -0600

gvdhoorn gravatar image

I use python publish a msg like this:

InfoData.msg
    int32 Num
    string color
    string name
 InfoDataArray.msg
   InfoData[] Infos

Now I want to use C++ subscribe the InfoDataArray.mag and store in the Structure. how to do this ?

edit retag flag offensive close merge delete

Comments

1

Please tell us what you've tried yourself already.

We're here to help, but not to write your code for you.

Susbcribers and publishers are language agnostic. It doesn't matter whether you "publish in Python" or "subscribe in C++". The data will arrive.

gvdhoorn gravatar imagegvdhoorn ( 2019-05-30 06:03:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-30 07:55:35 -0600

First place to start would be: https://raw.githubusercontent.com/ros... (from ROS Wiki Tutorial). The callback is where you will handle the parsing of the message and subsequent storing into your array I think.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-05-30 06:00:25 -0600

Seen: 46 times

Last updated: May 30