stereolabs / zed-ros-wrapper

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

Frequency during rosbag #920

Closed ManChrys closed 8 months ago

ManChrys commented 9 months ago

Preliminary Checks

Description

Hello,

during i rosbag record i notice that

geo@geo-X570-GAMING-X:~$ rostopic hz /zed2/zed_node/imu/data
subscribed to [/zed2/zed_node/imu/data]
average rate: 366.237
    min: 0.002s max: 0.005s std dev: 0.00072s window: 348
average rate: 360.514
    min: 0.002s max: 0.005s std dev: 0.00078s window: 704
average rate: 358.989
    min: 0.002s max: 0.005s std dev: 0.00080s window: 1060
average rate: 358.510
    min: 0.002s max: 0.005s std dev: 0.00080s window: 1418
average rate: 361.821
    min: 0.002s max: 0.005s std dev: 0.00077s window: 1792
^Caverage rate: 360.334
    min: 0.002s max: 0.005s std dev: 0.00078s window: 1873

Steps to Reproduce

  1. roslaunch zed_wrapper zed2.launch
  2. rosbag record -o zed2_data.bag /zed2/zed_node/imu/data

Expected Result

The frequency shouldnt be around 400 ? e.g. 390 + ?

Actual Result

In this situation my output hz is 358-361 hz

ZED Camera model

ZED2

Environment

OS : ubuntu 18.04 LTS

PC Screenshot from 2023-10-05 12-03-49

Anything else?

when i i want to use https://github.com/ori-drs/allan_variance_ros whats the imu_rate should i give to the yaml file ? should be 400 hz or less?

imu_topic: "/zed2/zed_node/imu/data" imu_rate: 400 measure_rate: 200 # Rate to which imu data is subsampled sequence_time: 10800 # 3 hours in seconds

Thanks in advance!!

Myzhar commented 9 months ago

Hi @ManChrys 400 Hz is the frequency at which the IMU acquires data on the camera. The ZED Node tries to retrieve the data at the maximum rate in a parallel thread while performing other tasks, to the final publishing frequency can be lower.

You can try to raise this value to raise the priority of the IMU thread and get data at a higher rate, but consider that it can affect the performance of the other parts of the node.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days