rosbag2
rosbag2 copied to clipboard
receive class loader memory heap warning when using rosbag2_py.SequentialCompressionReader
Description
When I use the SequentialCompressionReader class in the following manner I get the error below.
def readbag(bag_path: str) -> None:
storage_options = rb2.StorageOptions(
uri=bag_path, storage_id='sqlite3'
)
converter_options = rb2.ConverterOptions(
input_serialization_format='cdr',
output_serialization_format='cdr'
)
reader = rb2.SequentialCompressionReader()
reader.open(storage_options, converter_options)
type_map: Dict[str, Any] = {
topic.name: topic.type
for topic in reader.get_all_topics_and_types()
}
while reader.has_next():
(topic, data, t) = reader.read_next()
msg_type = get_message(type_map[topic])
Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
at line 132 in /opt/ros/galactic/src/class_loader/src/class_loader.cpp
I have observed this behavior with both zstd compression and my own custom compression plugin. I am not sure if this is a bug or a warning that can just be ignored. If it is a bug I can provide more details on reproducing issue.
System
- Device: nvidia jetson agx - jetpack 4.6.1
- OS: ubuntu 18.04
- ROS 2 Distro: galactic
- Version: release