Skip to content

Fix up loading map files into SCS2 - #250

Merged
PotatoPeeler3000 merged 15 commits into
developfrom
feature/loading-mcap
Jul 27, 2026
Merged

Fix up loading map files into SCS2#250
PotatoPeeler3000 merged 15 commits into
developfrom
feature/loading-mcap

Conversation

@PotatoPeeler3000

@PotatoPeeler3000 PotatoPeeler3000 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Added support for loading several different test map files.

  • A hand converted yovariable log that saves to an mcap file
  • Old and new robot log that uses mcap
  • Open source nissan car mcap file
Screencast.from.2026-07-10.15-22-02.mp4
Screen.Recording.2026-07-20.at.1.08.44.PM.mov

public class LZ4FrameDecoder
{

static final String PREMATURE_EOS = "Stream ended prematurely";

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was a bunch of hard coded setup that now happens on the native side

}
}

static class FrameInfo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was more code that happens on the native side now, its gets handled by default

RESERVED_0(0), RESERVED_1(1), CONTENT_CHECKSUM(2), CONTENT_SIZE(3), BLOCK_CHECKSUM(4), BLOCK_INDEPENDENCE(5);

private final int position;
final int OSMemoryPageSize = 4096; // Minimum buffer size for tons of I/O calls

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Tried to add comments here explaining what its doing

}
}

public static class BD

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

More code that gets handled by default on the native side

// LZ4F_compressFrame call, it holds no per-call state, so there's no reason to rebuild it every time.
private final LZ4FPreferences preferences;

static final String CLOSED_STREAM = "The stream is already closed";

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same as the decoder, a lot of this code gets handled by default on the native side now

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added a few more tests

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added a few more tests

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Converted the LZ4rameDecoderCompressedData.txt to a binary file so its not as large, also cut it in half because we don't need to store that much data

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since the binary file exists, I was able to delete this file

api("org.antlr:antlr4-runtime:4.13.1")
api("com.github.vatbub:mslinks:1.0.6.2")
// Not using org.bytedeco:lz4-platform: it pulls in javacpp-platform, whose fixed javacpp:1.5.8
// classifier list (incl. android-arm/x86, linux-armhf, linux/windows-x86 32-bit) gets bumped to

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added lz4 strictly for mcap decoding

@calvertdw
calvertdw self-requested a review July 23, 2026 20:43
@PotatoPeeler3000
PotatoPeeler3000 merged commit 1318759 into develop Jul 27, 2026
3 checks passed
@PotatoPeeler3000
PotatoPeeler3000 deleted the feature/loading-mcap branch July 27, 2026 18:08
PotatoPeeler3000 added a commit that referenced this pull request Jul 31, 2026
Added support for loading several different test map files. 
- A hand converted yovariable log that saves to an mcap file
- Old and new robot log that uses mcap
- Open source nissan car mcap file



https://github.com/user-attachments/assets/094f2919-d73c-40b0-8e87-c5f31513bc96


https://github.com/user-attachments/assets/d2db6d3b-6fe8-4d7e-806f-9c93e1e03d91
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.

2 participants