Skip to content

Initial Bit-Bots rosbag import #32

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

Merged
merged 11 commits into from
Nov 21, 2024
Merged

Initial Bit-Bots rosbag import #32

merged 11 commits into from
Nov 21, 2024

Conversation

texhnolyze
Copy link
Contributor

@texhnolyze texhnolyze commented Nov 14, 2024

Summary

Setup of initial rosbag import (for GameState, JointStates, JointCommands, Image),
tested with rosbags from data.bit-bots.de recorded during the RoboCup 2024
and the GermanOpen 2024.

Proposed changes

  • refactor(models): add end_time to Recording
  • refactor(models): pluralized joint states/commands in DB
  • refactor(models): make each JointCommands column nullable
  • feat(cli): add import subcommand and validation
  • feat(db): turn into a fluent API
  • feat(import): setup initial rosbag import
  • chore(vscode): add import debug config
  • refactor(imports): seperate into importer/strategy
  • refactor(cli): seperate cli start/setup into pkg
  • feat(import): add rosbag image scaling and import

as one row refers to a list of states/commands for each joint
as we only ever have the joint commands of specific joints which are
actually moved at a certain point in time
and close DB session on destruction of object
of gamestate, joint states and joint commands
@texhnolyze texhnolyze self-assigned this Nov 14, 2024
@texhnolyze texhnolyze requested review from jaagut and Flova November 14, 2024 14:14
Copy link
Member

@jaagut jaagut left a comment

Choose a reason for hiding this comment

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

I have not yet looked at your major additions, just the smaller changes

@texhnolyze texhnolyze force-pushed the feature/import-rosbags branch 3 times, most recently from 465f51a to 4d1e616 Compare November 14, 2024 18:52
@jaagut jaagut self-requested a review November 15, 2024 13:52

for _, channel, message, ros_msg in reader.iter_decoded_messages(topics=USED_TOPICS):
first_used_msg_time = first_used_msg_time or message.publish_time
relative_timestamp = (message.publish_time - first_used_msg_time) / 1e9
Copy link
Member

Choose a reason for hiding this comment

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

@Flova Do we want to use the publish_time or the time from the header.stamp if available?

Copy link
Member

Choose a reason for hiding this comment

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

Good point. The header stamp is more accurate, but is could also lead to data from the future being available too early.

Copy link
Member

Choose a reason for hiding this comment

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

How could that be?

Copy link
Member

Choose a reason for hiding this comment

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

For example camera images are stamped when the trigger is activated. But they are available to the software a fraction of a second later. Using the trigger time could lead to an image being available to the network where it would normally be in transit. This could lead to the network expecting it to be available and performing different during inference where it physically isn't available yet.

texhnolyze added a commit that referenced this pull request Nov 21, 2024
texhnolyze added a commit that referenced this pull request Nov 21, 2024
@texhnolyze texhnolyze force-pushed the feature/import-rosbags branch from 7553c94 to 29d554a Compare November 21, 2024 11:20
texhnolyze added a commit that referenced this pull request Nov 21, 2024
@texhnolyze texhnolyze force-pushed the feature/import-rosbags branch from 29d554a to cd3e438 Compare November 21, 2024 11:23
@jaagut jaagut self-requested a review November 21, 2024 11:29
texhnolyze added a commit that referenced this pull request Nov 21, 2024
@texhnolyze texhnolyze force-pushed the feature/import-rosbags branch from cd3e438 to d7d1c38 Compare November 21, 2024 11:31
@texhnolyze texhnolyze force-pushed the feature/import-rosbags branch from d7d1c38 to f592c89 Compare November 21, 2024 11:43
@texhnolyze texhnolyze merged commit 6b433ca into main Nov 21, 2024
2 checks passed
@texhnolyze texhnolyze deleted the feature/import-rosbags branch November 21, 2024 11:57
Flova pushed a commit that referenced this pull request Apr 21, 2025
Flova pushed a commit that referenced this pull request Apr 21, 2025
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.

3 participants