0
$\begingroup$

Rosanswers logo

I am subscribing to various topics and I wish to print them into a .csv log file, but I am not able to print any one of them outside their own callback function.

You can see the code at Click for Code and it will be great if you could let me know what I am doing wrong?

Thank you.


Originally posted by argahsuknesib on ROS Answers with karma: 1 on 2021-07-15

Post score: 0


Original comments

Comment by gvdhoorn on 2021-07-16:
Isn't this something you'd want to do with rosbag? Especially because you want to convert the data to .csv?

Comment by argahsuknesib on 2021-07-16:
Yes, I am trying to do that. But I was not successful in doing the conversion to csv, will you please tell me a working rosabg_to_csv convertor?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You could just create the subscriber inside a class and use a member variable to save them in the correct order or use the time as a key and then create a table when you desire.

Or if the data is synchronized you could try to take a look at http://wiki.ros.org/message_filters.

In any case, take a look at the message filters package.


Originally posted by Teo Cardoso with karma: 378 on 2021-07-15

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by argahsuknesib on 2021-07-15:
Thank you so much, I will look into it. Have a good day

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.