Skip to content

[BAG] Implement partial message extraction (extract messages --count) #30

@zhexuany

Description

@zhexuany

Summary

The robocodec extract messages --count command does not work for BAG format files.

Current Behavior

$ robocodec extract messages input.bag output.bag --count 10
Error: Partial message extraction (count < total) requires format-specific iteration. Use the convert command for full file copying.

Expected Behavior

Should extract the first N messages from the BAG file and write them to a new BAG file.

Use Case

  • Create smaller test files from large bag files
  • Extract a sample of messages for debugging
  • Process large files in batches

MCAP Status

This feature works for MCAP files, only BAG format is affected.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions