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

merged splitted bagfiles?

asked 2015-04-08 05:38:09 -0600

pmarinplaza gravatar image

updated 2015-04-08 05:47:25 -0600

Is there a way to merged splitted bagfiles?

I have:

data0.bagfile

data1.bagfile

data2.bagfile

...

And all of them are from the same recordbag with the option --split --duration=30

each of them are 30 seconds of duration and I want to create an only one bagfile to get all the data information into a .csv file in order to process and analyce the whole recordbag with matlab and do graphs.

Thanks in advance.

Best regards.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2015-04-11 09:51:46 -0600

pmarinplaza gravatar image

updated 2015-04-11 09:52:32 -0600

The easiest way to do that is open rqt_bag and then open all bag files you want to merge. If there are all in sequence, you will wacht them all together one after other. Then you only have to save as in the place you want and you will have your merged bagfile.

In order to analyce with matlab I do the next steps:

rostopic echo "topic_name" -b "bag_name" -p > "file.csv"

This will create a csv, then import the data in matlab.

If you want to know only the time lapse and not the final value of time

VarName1 (wich is the current time sec+nsec)

time = VarName1 / 10⁹
time = time - time[0] --> this is the first element in the time array in seconds.

Then you have your time variable in lapse time and not in total amount format.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-04-08 05:38:09 -0600

Seen: 3,141 times

Last updated: Apr 11 '15