stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

ZED2i image topic rate couldn't be changed by common.yaml #855

Closed fanhuaxiang closed 2 years ago

fanhuaxiang commented 2 years ago

Preliminary Checks

Description

As I want to use ZED2i in 720p with 30Hz. I edit the common.yaml in zed_wrapper/params file. The following is what I modified :

_pub_frame_rate: 30 general: serial_number: 39220361 resolution: 2
grab_framerate: 30

After the configuration in the common.yaml, I start ZED2i by _roslaunch zedwrapper zed2i.launch and monitor the rate of image by rostopic hz command, but the image topic rate is much lower as shown below:

Screenshot from 2022-08-16 12-33-48

The imu topic rate seems right, but the image topic is so weird.

What's wrong in my configuration or some other reasons? Looking forward to the root cause.

Steps to Reproduce

  1. Make sure Zed2i has been connected to Laptop.
  2. Edit the common.yaml in zed_wrapper/params file as mentioned in Description.
  3. Run _roslaunch zedwrapper zed2i.launch .
  4. Run _rostopic hz /zed2i/zed_node/imu/data /zed2i/zed_node/left/image_rect_gray /zed2i/zed_node/right/image_rectgray.

...

Expected Result

The rate of image topic is nearly 30Hz.

Actual Result

The rate of image topic is lower than 10Hz.

ZED Camera model

ZED2i

Environment

Hardware: Laptop
OS: Ubuntu 18.04.6 LTS
CPU: Intel® Core™ i5-8300H CPU @ 2.30GHz × 8
GPU: NVIDIA GeForce GTX 1050/PCIe/SSE2
ROS: ROS melodic,rosversion 1.14.13
CUDA: 11.6
NVIDA Driver: 510.54

Anything else?

What I guess if the hardware configuartion of my laptop limits the image topic rate, little confused...

fanhuaxiang commented 2 years ago

I figured it out. But the condition is that pos_tracking is not necessary. Solition: _pos_trackingenabled: false