Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2 bag can't be shut down with ctrl + c when the bag is paused #1000

Closed
Kaju-Bubanja opened this issue May 4, 2022 · 15 comments · Fixed by #1002
Closed

ros2 bag can't be shut down with ctrl + c when the bag is paused #1000

Kaju-Bubanja opened this issue May 4, 2022 · 15 comments · Fixed by #1002
Assignees
Labels
bug Something isn't working

Comments

@Kaju-Bubanja
Copy link
Contributor

Description

ros2 bag can't be shut down with ctrl + c when the bag is paused, but it can also not be resumed after sending ctrl + c once. It enters a frozen state where only ctrl + z helps.

Expected Behavior

Clean shutdown like when the bag is not paused

Actual Behavior

The program freezes

To Reproduce

  1. Play a bag
  2. Pause bag
  3. Press ctrl + c
  4. Observe that it doesn't shut down
  5. Press ctrl + z
  6. Observe that it shuts down

System (please complete the following information)

  • OS: Ubuntu 22.04
  • ROS 2 Distro: Ros rolling
  • Version: master(built from source)
@Kaju-Bubanja Kaju-Bubanja added the bug Something isn't working label May 4, 2022
@MichaelOrlov
Copy link
Contributor

@Kaju-Bubanja I confirm this issue. I came across on it recently too.
Thinking how to better fix it.

@MichaelOrlov MichaelOrlov self-assigned this May 5, 2022
@Kaju-Bubanja
Copy link
Contributor Author

@MichaelOrlov While I have your attention :P May I ask you to have a look at this issue: #966 ? The ctrl + c or z issue is a minor cosmetic thing, but the issue 966 is really a blocker for me right now, because I can't play back a large bag file which is split. The issue seems orphaned but easy to fix(I assume, could always turn out very hard ofc), if you know more about the rosbag2 internals.

@MichaelOrlov
Copy link
Contributor

MichaelOrlov commented May 6, 2022

@Kaju-Bubanja After some analysis I can say that fix for this particular issue is going to be in one line and most probably will need to add one more regression test.
Although for #966 it is quite more complicated and entire feature for splitting bags need more "love".
We have multiple issues with splitting bags #936, #866 and #647. One of them is the high probability to lose messages in some cases.
Please refer to the #647 for details.

Giving that I wouldn't would recommend to avoid using splitting bag feature for a while.

@Kaju-Bubanja
Copy link
Contributor Author

I see, unfortunate because I have a weeks worth of data which I can't analyse. I guess I will dig into the code to see what I can do.
I guess wouldn't is a typo and should be would?

@MichaelOrlov
Copy link
Contributor

You can try to put correct start time in metadata.yaml file manually. Just need to figure out the correct one.
To do this you can open up .db3 file in some SQLite3 db manager and see timestamp in first message.

@Kaju-Bubanja
Copy link
Contributor Author

The thing is the times are correct everywhere, that's what confused me. They are correct in the metadata.yaml and in the individual bags. I think the reader is somehow broken.

@audrow
Copy link
Member

audrow commented May 6, 2022

Hey @MichaelOrlov, for the Humble release, do you think we should say in the release documentation that splitting bags is an experimental feature?

@MichaelOrlov
Copy link
Contributor

@audrow Not sure that it's a good wording to say that it's experimental since it's already exists for a while, more than year or so.
May be better way to refer to the known #647 and #966 issues?

@Kaju-Bubanja
Copy link
Contributor Author

Maybe the best would be to have a warning where the doc is on how to use it. Because for me it was quite a surprise, the rest of rosbag2 works good, so i expected the split feature to work too and didnt test playback first before collecting data. This just in case the humble release happens before the fix. Better be warned then surprised later.

@audrow
Copy link
Member

audrow commented May 9, 2022

Maybe the best would be to have a warning where the doc is on how to use it.

Perhaps a warning would be a good idea.

Not sure that it's a good wording to say that it's experimental since it's already exists for a while, more than year or so.

The nice thing about calling it "experimental" is that, IIUC, it doesn't lock in the API/ABI, so that they can change if needed to make fixes. To me it basically means that it's still evolving, which doesn't necessarily relate to how long the feature has been around.

@MichaelOrlov
Copy link
Contributor

@Kaju-Bubanja I've prepared fix #1002 for this bug.

@MichaelOrlov
Copy link
Contributor

@audrow

The nice thing about calling it "experimental" is that, IIUC, it doesn't lock in the API/ABI, so that they can change if needed to make fixes. To me it basically means that it's still evolving, which doesn't necessarily relate to how long the feature has been around.

Ok. I agree.
Wouldn't you mind to put such warning in release doc by yourself?

@audrow
Copy link
Member

audrow commented May 12, 2022

Wouldn't you mind to put such warning in release doc by yourself?

Will do.

@audrow
Copy link
Member

audrow commented May 23, 2022

FYI, here's the release note in the known issues section: ros2/ros2_documentation#2643.

@MichaelOrlov
Copy link
Contributor

Thank you @audrow. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants