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

resolve relative file paths #345

Merged
merged 15 commits into from
Apr 3, 2020
Merged

resolve relative file paths #345

merged 15 commits into from
Apr 3, 2020

Conversation

Karsten1987
Copy link
Collaborator

fixes #229

It basically takes the relative file paths and resolves them relativ to the base folder name, essentially the name of the rosbag to be replayed.
If one of these relativ files is actually in an absolute form, it will ignore it.

Signed-off-by: Karsten Knese karsten@openrobotics.org

@Karsten1987 Karsten1987 self-assigned this Apr 2, 2020
@Karsten1987
Copy link
Collaborator Author

I've updated the logic to differentiate between version 4 and <=4. I've also included a test for compatibility.

That being said, version 4 removes the folder name and the file path is now relativ to the parent folder a.k.a the rosbag2 folder.

Copy link
Contributor

@zmichaels11 zmichaels11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good to me.
Only suggestion that requires changes is size_t -> int for version

rosbag2_cpp/src/rosbag2_cpp/readers/sequential_reader.cpp Outdated Show resolved Hide resolved
rosbag2_cpp/test/rosbag2_cpp/test_multifile_reader.cpp Outdated Show resolved Hide resolved
rosbag2_cpp/src/rosbag2_cpp/readers/sequential_reader.cpp Outdated Show resolved Hide resolved
@Karsten1987
Copy link
Collaborator Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@mabelzhang mabelzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.
Since end-to-end record tests are updated to version 4, a to-do item for later might be to test end-to-end playback with version 3 (when that test is re-enabled and files exist to test it...).

@Karsten1987
Copy link
Collaborator Author

@emersonknapp I am getting QoS test failures, did I miss something?

16:14:56 7: [ RUN      ] RecordIntegrationTestFixture.published_messages_from_multiple_topics_are_recorded
16:14:56 7: [INFO] [1585869296.012310473] [rosbag2_transport]: Listening for topics...
16:14:56 7: [INFO] [1585869296.018655979] [rosbag2_transport]: Subscribed to topic '/string_topic'
16:14:56 7: [WARN] [1585869296.021000346] [rosbag2_transport]: A new publisher for subscribed topic /string_topic was found that is offering a (possibly) incompatible QoS profile. Not changing subscription QoS. Messages from this publisher may not be recorded.
16:14:56 7: [INFO] [1585869296.023990862] [rosbag2_transport]: Subscribed to topic '/array_topic'
16:14:56 7: [INFO] [1585869296.024012022] [rosbag2_transport]: All requested topics are subscribed. Stopping discovery...
16:15:55 2/2 Test #7: test_record ......................***Timeout  60.04 sec

and

16:13:55 2: [ RUN      ] RecordIntegrationTestFixture.published_messages_from_multiple_topics_are_recorded
16:13:56 2: [INFO] [1585869235.999994675] [rosbag2_transport]: Listening for topics...
16:13:56 2: [INFO] [1585869236.004100034] [rosbag2_transport]: Subscribed to topic '/string_topic'
16:13:56 2: [INFO] [1585869236.005604653] [rosbag2_transport]: Subscribed to topic '/rosout'
16:13:56 2: [INFO] [1585869236.007492335] [rosbag2_transport]: Subscribed to topic '/parameter_events'
16:13:56 2: [INFO] [1585869236.009682717] [rosbag2_transport]: Subscribed to topic '/array_topic'
16:13:56 2: [WARN] [1585869236.013561291] [rosbag2_transport]: A new publisher for subscribed topic /string_topic was found that is offering a (possibly) incompatible QoS profile. Not changing subscription QoS. Messages from this publisher may not be recorded.
16:13:56 2: [WARN] [1585869236.013963259] [rosbag2_transport]: A new publisher for subscribed topic /rosout was found that is offering a (possibly) incompatible QoS profile. Not changing subscription QoS. Messages from this publisher may not be recorded.
16:13:56 2: [WARN] [1585869236.014366566] [rosbag2_transport]: A new publisher for subscribed topic /parameter_events was found that is offering a (possibly) incompatible QoS profile. Not changing subscription QoS. Messages from this publisher may not be recorded.
16:13:56 2: [WARN] [1585869236.015690209] [rosbag2_transport]: A new publisher for subscribed topic /array_topic was found that is offering a (possibly) incompatible QoS profile. Not changing subscription QoS. Messages from this publisher may not be recorded.
16:14:55 1/2 Test #2: test_record_all ..................***Timeout  60.02 sec

@emersonknapp
Copy link
Collaborator

Hmm, it all passed in my actions and CI run before merging, taking a look

@emersonknapp
Copy link
Collaborator

Well, the branch was behind, but it seemed like it was somehow running my newest code - I rebased and pushed here (not sure if that was the right move but we'll see what happens with the CI run)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@emersonknapp
Copy link
Collaborator

Feel free to force push back over it, I made it fail the DCO. But i'm interested to see how the CI run does with this version of the branch

Copy link
Contributor

@piraka9011 piraka9011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@emersonknapp
Copy link
Collaborator

emersonknapp commented Apr 3, 2020

Ah, I noticed that your CI runs are again using only cyclone, whereas mine build with all three, and i assume just run on FastRTPS by default. When I explicitly run

RMW_IMPLEMENTATION=rmw_cyclonedds_cpp colcon test --packages-select rosbag2_transport

locally now i see the timeouts.

The spurious warnings are definitely a symptom of what we discussed this morning, and the hanging at the end of the test, I'm not exactly sure. I think that we should probably do the following:

  • disable the feature for now (not revert the whole PR)
  • add an rmw_implementation matrix on our tests so we catch this by default
  • fix it on cyclone and re-enable

Sound good? If so, here's a PR #348

@Karsten1987
Copy link
Collaborator Author

CI (with Fast-RTPS):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

I did indeed only use cyclone, because it's just so much faster to compile without any additional typesupport.

@Karsten1987
Copy link
Collaborator Author

Aaaaand once more:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@emersonknapp
Copy link
Collaborator

Ok @Karsten1987 you should be unblocked by the QoS tests on this one now, that feature is disabled, I am now looking into making it succeed on Cyclone

@Karsten1987
Copy link
Collaborator Author

thanks. I have to give some more love to the Windows build.

@Karsten1987
Copy link
Collaborator Author

rebase and another try for windows:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@Karsten1987
Copy link
Collaborator Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Karsten1987 and others added 11 commits April 3, 2020 11:48
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Co-Authored-By: Zachary Michaels <zmichaels11@users.noreply.github.com>
Co-Authored-By: Zachary Michaels <zmichaels11@users.noreply.github.com>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@Karsten1987
Copy link
Collaborator Author

again after rebasing:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@Karsten1987
Copy link
Collaborator Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@Karsten1987
Copy link
Collaborator Author

I am going slightly crazy with windows and file paths.
If that doesn't work now, I'll go ahead and disable that weird ctrl-c workaround for all tests on windows and address them in #271

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@piraka9011
Copy link
Contributor

@Karsten1987 I'd recommend just adding DCO and moving forward since we have it on our backlog to resolve the ctrl-c issue.

I've already added some Python tests based on launch in #347 and plan to expand from there to resolve the Windows ctrl-c issue.

@Karsten1987
Copy link
Collaborator Author

The last one indeed did it though:
Build Status // only the regular test failures.

@Karsten1987 Karsten1987 merged commit 59c90c8 into master Apr 3, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix_229 branch April 3, 2020 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

relative_file_paths depends on call site
6 participants