Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 18

Save msg content in variable cpp

$
0
0
Hi folks, i try to read and save the current content of a message in a cpp opject. I can continuously read the message with a callback, but i need the content in my main-function. My msg contains four integers (ident1 to ident3) and i tried to to grep the content with this: package_name::msg_name i; int idents[] = { i.ident0, i.ident1, i.ident2, i.ident3 } This compiles, with the right headers included, but without any succes - my array remains empty :( have you any hint for me please?

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>