Skip to content

mcap_vendor: Update to the latest release (v2.1.1)#2317

Open
MichaelOrlov wants to merge 2 commits intorollingfrom
morlov/update-mcap_vendor-to-v2_1_1
Open

mcap_vendor: Update to the latest release (v2.1.1)#2317
MichaelOrlov wants to merge 2 commits intorollingfrom
morlov/update-mcap_vendor-to-v2_1_1

Conversation

@MichaelOrlov
Copy link
Contributor

Description

Fixes # N/A

Is this user-facing behavior change?

No.

Did you use Generative AI?

No.

Additional Information

N/A

Signed-off-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov changed the title mcap_vendor: Update to latest release (v2.1.1) mcap_vendor: Update to the latest release (v2.1.1) Jan 22, 2026
@MichaelOrlov
Copy link
Contributor Author

Pulls: #2317
Gist: https://gist.githubusercontent.com/MichaelOrlov/bff5a3356bbc6d369e108393d2a7c3fe/raw/df901d96c4f77e2309c28df1a58961069a1d3496/ros2.repos
BUILD args: --packages-above-and-dependencies mcap_vendor rosbag2_transport rosbag2_tests ros2_bag
TEST args: --packages-above mcap_vendor rosbag2_transport rosbag2_tests ros2_bag
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18013

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@MichaelOrlov MichaelOrlov marked this pull request as ready for review January 22, 2026 00:52
@MichaelOrlov
Copy link
Contributor Author

@mjcarroll it doesn't fly 😞
There is some breakage since mcap/cpp/v2.0.2, which is causing our tests to fail.
For some reason, the mcap reader doesn't return channel objects with zero messages.
The last working version is mcap/cpp/v2.0.1

cc: @james-rms

@james-rms
Copy link
Contributor

👍 I can take a look.

Signed-off-by: Michael Orlov <morlovmr@gmail.com>
@MichaelOrlov MichaelOrlov force-pushed the morlov/update-mcap_vendor-to-v2_1_1 branch from 9f18c20 to 6fc6645 Compare January 22, 2026 22:20
@MichaelOrlov
Copy link
Contributor Author

MichaelOrlov commented Jan 22, 2026

@james-rms I would appreciate your help here.
I've made a preliminary analysis and pushed a simple reproducer to the branch.

The failing test is get_metadata_include_topics_with_zero_messages
The test passes with bags recorded with the previous versions (v2.0.1) of the MCAP cpp. However, it fails with the (v2.0.2) of the MCAP cpp. Seems the newer versions of the MCAP cpp writer do not write topics with zero messages? I also noticed that message definition for the "std_msgs/msg/String" type is missing in the new version of the bag.
It turns out that breakage was introduced in the foxglove/mcap#1381
We are getting a failure in test becase the mcap_reader_->channels() returns an empty range here

// Build a list of topic information along with per-topic message counts
metadata_.topics_with_message_count.clear();
for (const auto & [channel_id, channel_ptr] : mcap_reader_->channels()) {
const mcap::Channel & channel = *channel_ptr;

But the problem is in the mcap writer not reader.

@james-rms
Copy link
Contributor

@MichaelOrlov can you speak to why ROS2 needs topics in bags that have no messages in them? what does a topic with no messages even mean in context?

@james-rms
Copy link
Contributor

I ask because I'm happy to change that test to not test for that, but I want to double check that it's OK.

Comment on lines +37 to +40
# URL https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v2.0.1.tar.gz
# URL_HASH SHA1=af844741032eacc9e39527e2715d34baa44cc3b2 # v2.0.1
URL https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v2.0.2.tar.gz
URL_HASH SHA1=8e62e3e9b07b7f625932571bafaf1b7666b3c487 # v2.0.2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# URL https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v2.0.1.tar.gz
# URL_HASH SHA1=af844741032eacc9e39527e2715d34baa44cc3b2 # v2.0.1
URL https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v2.0.2.tar.gz
URL_HASH SHA1=8e62e3e9b07b7f625932571bafaf1b7666b3c487 # v2.0.2
URL https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v2.1.2.tar.gz
URL_HASH SHA1=0e36ae304c46158ca64d1eede5fc9cb1199ca5a5 # v2.1.2

@MichaelOrlov
Copy link
Contributor Author

@MichaelOrlov can you speak to why ROS2 needs topics in bags that have no messages in them? what does a topic with no messages even mean in context?

That way, we know the Recorder originally discovered the topic and subscribed to it.
The messages may be lost during recording or not published at all. When we create a new subscription (mcap channel), we also store metadata about this subscription, such as QoS settings and message definition.
This metadata is very useful for triaging why there are no messages in the recording.

@clalancette
Copy link
Contributor

I've opened up foxglove/mcap#1526 , which fixes the failing test here.

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.

4 participants