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

introduce defaults #452

Merged
merged 4 commits into from
Jul 23, 2020
Merged

introduce defaults #452

merged 4 commits into from
Jul 23, 2020

Conversation

Karsten1987
Copy link
Collaborator

This PR sits on top of #451 to show case the difference when decent defaults are chosen.
I'd like to hear from others whether these defaults are sensible or not.

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

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

These seem like reasonable defaults to me

@Karsten1987 Karsten1987 changed the base branch from minimal_cpp_test to master July 10, 2020 20:09
@Karsten1987
Copy link
Collaborator Author

@emersonknapp sorry, I've added one other thing to this PR. I introduce an overload for open for reader and writer which take a single uri string to a rosbag and internally fills the storage_options. Given that we internally set the storage options to the default, which is sqlite3, I believe this introduces a exec_depend on rosbag2_storage_default_plugins. I do think that's a reasonable thing to do though. But I'd like to hear your opinion about it, whether that's sensible to introduce as a dependency.

@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2020-07-16/15468/1

{
rosbag2_cpp::StorageOptions storage_options;
storage_options.uri = uri;
storage_options.storage_id = "sqlite3";
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor nit - should these 3 default values ("sqlite3", 0, 0) be defined as constants somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the last two are directly "hardcoded" in the storage options struct - meaning I could technically leave out the following two lines of code.
Where would you define the other constant, "sqlite3"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@emersonknapp I've excluded the sqlite3 into a constant within the same file. Let me know if that works for you.

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Karsten1987
Copy link
Collaborator Author

Karsten1987 commented Jul 21, 2020

  • 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>
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

@emersonknapp emersonknapp merged commit 546eb7c into master Jul 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the defaults branch July 23, 2020 20:49
emersonknapp pushed a commit that referenced this pull request Feb 2, 2021
* minimal c++ API test

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

* introduce defaults

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

* open overload for simple uri string

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

* set sqlite3 as a constant

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
emersonknapp pushed a commit that referenced this pull request Feb 17, 2021
* minimal c++ API test

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

* introduce defaults

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

* open overload for simple uri string

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

* set sqlite3 as a constant

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
skudryas pushed a commit to skudryas/rosbag2 that referenced this pull request Mar 12, 2021
* minimal c++ API test

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

* introduce defaults

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

* open overload for simple uri string

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

* set sqlite3 as a constant

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
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.

None yet

3 participants