ROS2 failed to read bagselection unkown exception
16 次查看(过去 30 天)
显示 更早的评论
When I try to read the messages from a specific topic in matlab I got unkown exception. This specific bag is the only one that got that error. I am attaching the topics I got, all of them are good except for the "novatel_bottom/bestpos". I wonder if there is further information about this error.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/711252/image.jpeg)
2 个评论
Jagadeesh Konakalla
2021-8-16
Hi Manuel,
Please reach out to us through the MathWorks Technical Support. We may need more information to help you out.
Thanks,
Jagadeesh K
Karthik Reddy Vennapureddy
2021-8-16
编辑:Karthik Reddy Vennapureddy
2021-8-16
Hi Manuel,
With ROS 2 dashing installation command line,when you play the same bag file in python using "ros2 bag play <bag_folder>" after registering these custom messages via "colcon build", and run "ros2 topic echo /novatel_bottom/bestpos" in other terminal, could you check if the following error occurs:
"terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException'
what(): Not enough memory in the buffer stream
Aborted"
The reason for this error is the message is not serialized correctly on the topic and is corrupted, you can try re-recording the bag file with ROS 2 command line environment, see if "ros2 topic echo /novatel_bottom/bestpos" is successfull and then try reading the messages in MATLAB. If you have further issues, please contact MathWorks Technical Support as suggested by Jagadeesh.
Thanks,
Karthik Reddy
回答(1 个)
Karthik Reddy Vennapureddy
2023-12-26
Hi Manuel,
While recording the ROS 2 bag file, the message failed to serialize on a topic and is corrupted. This can be seen by playing the bag file in ROS 2 python command line using "ros2 bag play <bagFolder>" in one terminal. Open other terminal and do "ros2 topic echo /novatel_bottom/bestpos", you can see that a error below is thrown:
"terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException'
what(): Not enough memory in the buffer stream
Aborted".
Starting with R2022a, a meaninful error message is shown here as :"Unable to read the data recorded on topic <topic_name> because the bag file appears to be corrupt. Record this topic again to the bag file".
Thanks,
Karthik Reddy
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!