0
$\begingroup$

Rosanswers logo

Hello

Im using ROS Fuerte and Ubuntu 10.4. Would like to have some outputs of my nodes as a text file. Is there any option to time indexed those outputs?

Thanks


Originally posted by Astronaut on ROS Answers with karma: 330 on 2012-10-16

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

rostopic echo /data > data.txt


Originally posted by Zargol with karma: 206 on 2014-04-10

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

You can use the ROS Logging mechanism for that. Just output what you're interested in using the ROS_INFO or ROS_DEBUG mechanisms and record /rosout using rosbag, e.g.

rosbag record /rosout

you can then later play back all data with timestamps provided, and view them for example using rxconsole.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-10-16

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by Astronaut on 2012-10-17:
But I meaned something else. I have some outputs like velocitiy and diestance saves in txt file. So using my file option and my file open can the ouptuts parameters like velocity and distance saved in a txt file. My question is hot to time-indexed that output txt file. Understand?

Comment by dornhege on 2012-10-17:
You can use the same. Just record the textual program output instead of a bag.

Comment by Astronaut on 2012-10-17:
So I record the textual program using rosbag record/ output.txt. Yes?

Comment by dornhege on 2012-10-17:
rosbag record records the messages in binary format. Just record your binaries raw text output as you would with any non-ros program, i.e. my_node > output.txt.

Comment by Astronaut on 2012-10-17:
and how to play back the output data with timestamps provided?

Comment by dornhege on 2012-10-17:
In that case you need a logfile.

Comment by Astronaut on 2012-10-17:
So will use the ros logging mechanism??

$\endgroup$

Your Answer

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