ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to time-indexed the ros output txt file

asked 2012-10-16 20:54:48 -0500

Astronaut gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-04-10 07:14:03 -0500

Zargol gravatar image

rostopic echo /data > data.txt

edit flag offensive delete link more
2

answered 2012-10-16 23:32:10 -0500

updated 2012-10-16 23:34:45 -0500

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.

edit flag offensive delete link more

Comments

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?

Astronaut gravatar image Astronaut  ( 2012-10-17 00:14:09 -0500 )edit

You can use the same. Just record the textual program output instead of a bag.

dornhege gravatar image dornhege  ( 2012-10-17 00:23:40 -0500 )edit

So I record the textual program using rosbag record/ output.txt. Yes?

Astronaut gravatar image Astronaut  ( 2012-10-17 00:27:22 -0500 )edit

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.

dornhege gravatar image dornhege  ( 2012-10-17 01:57:11 -0500 )edit

and how to play back the output data with timestamps provided?

Astronaut gravatar image Astronaut  ( 2012-10-17 02:15:47 -0500 )edit

In that case you need a logfile.

dornhege gravatar image dornhege  ( 2012-10-17 03:08:42 -0500 )edit

So will use the ros logging mechanism??

Astronaut gravatar image Astronaut  ( 2012-10-17 13:40:31 -0500 )edit

Question Tools

Stats

Asked: 2012-10-16 20:54:48 -0500

Seen: 583 times

Last updated: Apr 10 '14