rosbag2_image_loader

Crates.iorosbag2_image_loader
lib.rsrosbag2_image_loader
version0.1.2
sourcesrc
created_at2022-02-12 19:58:37.856597
updated_at2022-02-12 20:48:10.470341
descriptionData loader for rosbag2
homepage
repositoryhttps://github.com/scepter914/rosbag2-image-loader-rs
max_upload_size
id531470
size32,333
Satoshi Tanaka (scepter914)

documentation

https://docs.rs/rosbag2-image-loader-rs

README

rosbag2-image-loader-rs

Feature

  • Read sensor_msg/msg/Image
  • Read sensor_msg/msg/CameraInfo
  • Read sensor_msg/msg/CompressedImage

Get started

Run example

cargo run --release --example example <path_to_rosbag2>
# example
cargo run --release --example example data/rosbag/rosbag2_2022_02_05-00_54_33/rosbag2_2022_02_05-00_54_33_0.db3

Use in your application

  • In detail, see example code.
    // load Rosbag2Images interface
    let mut interfaces: Vec<Rosbag2Images> = load_images_from_rosbag2(file_name).unwrap();

    if !interfaces.is_empty() {
        loop {
            frame_index += 1;
            let input_image = interfaces[0].get_frame();
            if input_image.is_none() {
                break;
            }
            my_image_proc(&input_image.unwrap(), frame_index);
        }

History

  • v0.1.2
    • Update docs
  • v0.1.1
    • Update docs
  • v0.1.0
    • Open crate
Commit count: 53

cargo fmt