ros2bagreader unable to parse "metadata.yaml"

조회 수: 7 (최근 30일)
Annalisa
Annalisa 2025년 2월 20일
댓글: Simone 2025년 5월 8일
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
SACHIN KHANDELWAL
SACHIN KHANDELWAL 2025년 4월 21일
Hi @Annalisa, @Simone, could you please share files to reproduce the issue ?
Simone
Simone 2025년 5월 1일
편집: Simone 2025년 5월 1일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Gayathri
Gayathri 2025년 5월 5일
편집: Gayathri 2025년 5월 5일
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.

카테고리

Help CenterFile Exchange에서 Bag File Logging and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by