ros2bagreader unable to parse "metadata.yaml"

21 vues (au cours des 30 derniers jours)
Annalisa
Annalisa le 20 Fév 2025
Commenté : Simone le 8 Mai 2025
Hello, I am trying to open a mcap ros2 bag and I receive the following error:
Error using ros2bagreader (line 478)
Unable to parse "metadata.yaml" file in the specified folder path. Ensure that the YAML file is correctly formatted.
I am using matlab 2024b version.
Any advice on how to solve this issue?
Thank you,
Annalisa
  4 commentaires
SACHIN KHANDELWAL
SACHIN KHANDELWAL le 21 Avr 2025
Hi @Annalisa, @Simone, could you please share files to reproduce the issue ?
Simone
Simone le 1 Mai 2025
Modifié(e) : Simone le 1 Mai 2025
I can't share the entire metadata.yaml file, but I believe the issue can be identified by looking at just these few lines:
rosbag2_bagfile_information:
version: 9
storage_identifier: mcap
duration:
nanoseconds: 156929000527
starting_time:
nanoseconds_since_epoch: 1741604982945181385
message_count: 646482
topics_with_message_count:
- topic_metadata:
name: /mapping/global_slope
type: nav_msgs/msg/OccupancyGrid
serialization_format: cdr
offered_qos_profiles:
- history: unknown
depth: 0
reliability: reliable
durability: volatile
deadline:
sec: 9223372036
nsec: 854775807
lifespan:
sec: 9223372036
nsec: 854775807
liveliness: automatic
liveliness_lease_duration:
sec: 9223372036
nsec: 854775807
avoid_ros_namespace_conventions: false
type_description_hash: ..
message_count: 782
The 'offered_qos_profiles' entry was previously provided as a list, but now (version 9) each sub-entry appears on a new line, and the ros2bagreader function does not work

Connectez-vous pour commenter.

Réponses (1)

Gayathri
Gayathri le 5 Mai 2025
Modifié(e) : Gayathri le 5 Mai 2025
The error you are experiencing may be due to MATLAB R2024b only supporting bag files created with the ROS 2 distribution "Humble Hawksbill." If your bag file was created using a different ROS 2 distribution, this could be causing the issue.
Starting with the MATLAB R2025a Prerelease, the function is compatible with the ROS 2 distribution "Jazzy Jalisco" and should work without any errors.
  1 commentaire
Simone
Simone le 8 Mai 2025
Alright, thank you for your support

Connectez-vous pour commenter.

Catégories

En savoir plus sur Bag File Logging and Analysis dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by