Ask Your Question
0

When an intended exit occurs, rosbag status problem.

asked 2019-06-28 02:24:05 -0500

Han Gyu-dong gravatar image

Hi, all

I am using rosbag to record some data automatically with systemd service in ubuntu.

When an intended exit occurs, the rosbag file is not completed status as *.bag.active.

I tried the bellow commands to restore the file.

rosbag reindex

rosbag fix

but it was not restored as unknown some problem.

Just It is possible to properly save using rosnode kill "node_name". But it is not automatic system...

I want to know that a rosbag file will be saved properly when it terminates abnormally.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-28 07:09:50 -0500

It sounds as though you're sending a kill signal to the rosbag node so it's shutting down instantly and not cleaning up the .bag.active file. If you can send a sig int to shut it down instead then it should correctly close the bag file it's recording.

How is the rosbag node being killed? If you can tell us exactly how this is happening then we can suggest a method that should close out the bag file correctly. If you're doing it from a bash script you could use

kill -INT <rosbag PID>

to shut it down as if ctrl+c has been pressed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-06-28 02:24:05 -0500

Seen: 15 times

Last updated: Jun 28