Execution rate of multisense stereo images are slow

Issue #55 resolved
Iori Kumagai created an issue
  • Problems

    Stereo images from multisense_driver is slower than expected and we want to know how to speed up them.

    We use stereo images like /multisense/left/image_rect_color with following parameters and expect them to be published in around 30Hz, but actually they are published in about 5Hz.

     $ rostopic hz /multisense_local/left/image_rect_color -w 10
        subscribed to [/multisense_local/left/image_rect_color]
        average rate: 2.283
                      min: 0.376s max: 0.499s std dev: 0.06150s window: 3
        average rate: 2.126
                      min: 0.376s max: 0.628s std dev: 0.10366s window: 5
        average rate: 2.758
                      min: 0.131s max: 0.628s std dev: 0.14541s window: 9
        average rate: 4.778
                      min: 0.122s max: 0.388s std dev: 0.10306s window: 10
        average rate: 4.791
                      min: 0.122s max: 0.629s std dev: 0.16649s window: 10
        average rate: 4.772
                      min: 0.122s max: 0.629s std dev: 0.15685s window: 10
        average rate: 5.968
                      min: 0.119s max: 0.507s std dev: 0.12012s window: 10
    
  • Situation

    • Machine

      cpu: Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz

      memory: 16GB

      multisense: MultisenseSL

      distribution: Ubuntu 12.04.5

      ros: hydro

      multisense_ros from source (parent: 99:fc521418febe, branch: default)

    • Multisense parameters

      resolution: 1024x544_256_disparities

      fps: 30.0

      gain: 1.0

      stereo_post_filtering: 0.75

      auto_exposure, auto_white_balance and network_time_sync are enabled

  • Questions

    • Dependency with subscribed topics

      multisense_driver seems to select publishing topics whether they are subscribed or not. Which topic puts more loads?

    • Dependency with resolution of images

      When we changed the resolution from 1024x544_256_disparities to 1024x272_64_disparities, publish rate was improved to about 15Hz, but we want to use better resolution. Would you tell us the theoretical execution rate in each resolution?

Comments (6)

  1. Chris Osterwood

    Iori,

    The maximum frame rate of the MultiSense stereo does change with operating resolution and disparity search window. We have those limits listed on our website at: http://carnegierobotics.com/support-updates/2015/7/16/frame-rates-at-various-resolutions-and-disparity-search-windows

    At 1024x544_256 you should be getting 15 FPS and at 1024x544_64 you should be getting 30 FPS.

    Have you increased the MTU of your system to 7200 from 1500? It may be the packet overhead is causing the reducing in frame rate. See our documentation for details on that.

    The network startup script (at PATH_TO_SOURCE/multisense/multisense_bringup/configureNetwork.sh) also sets the kernel's "rmem_max" buffer size, which can improve and stabilize frame rate.

    Best regards,

    Chris

  2. Matt Alvarado

    Hi Iori,

    Can you confirm this decreased frame rate behavior also occurs on the following topics:

    /multisense/left/image_mono /multisense/left/disparity

    Also can you confirm that you have a full 1000Mb/s connection to the MultiSense

    sudo ethtool eth0
    

    Thanks, Matt Alvarado Engineer Carnegie Robotics

  3. Iori Kumagai reporter

    Chris, Matt

    Thank you for your advice. We could get the ideal rate (15hz) with mtu and rmem_max modification.

    At 1024x544_256 you should be getting 15 FPS and at 1024x544_64 you should be getting 30 FPS

    We intended to use multisense in 1024x544_256 so I understand that the ideal rate is 15fps.

    Have you increased the MTU of your system to 7200 from 1500? It may be the packet overhead is causing the reducing in frame rate. See our documentation for details on that.

    We tried to change MTU from 1500 to 7200 and execution rate improved to about 8-10Hz. When we set rmem_max and wmem_max according to configureNetwork.sh additionally, we could get 15Hz image_rect_color in 1024_544_256 resolution.

    Can you confirm this decreased frame rate behavior also occurs on the following topics:

    Our image_mono and disparity has same decreased frame rate problem but mtu and rmem_max resolved them.

    Also can you confirm that you have a full 1000Mb/s connection to the MultiSense

    We used 1000Mb/s connection.

  4. Chris Osterwood

    Iori,

    Thanks for letting us know that resolved the issue for you. Please let us know if you have any other issues with you MultiSense.

    Best Regards,

    Chris

  5. Log in to comment