[pointcloud_to_laserscan] publish rate higher than scan_time
Hi, I'm having a bit of trouble understanding the "scan_time" parameter from poincloud_to_laserscan package.
I was supposing that it was the publish rate of the output (laser_scan). However, I have it set at 0.333 seconds (so 3Hz), but the publishing frequency of the scan is nearly 10Hz (as the pointcloud topic).
Do I misunderstand the meanning of this parameter?
Thanks a lot in advance
Felix
The launchfile for the laser scan :
<?xml version="1.0"?>
<launch>
<arg name="camera_name" default="zed2" />
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan" >
<remap from="cloud_in" to="$(arg camera_name)/zed_node/point_cloud/cloud_registered" />
<remap from="scan" to="$(arg camera_name)/zed_node/scan" />
<rosparam>
target_frame: base_link
transform_tolerance: 0.01
min_height: -0.7
max_height: 0.3
angle_min: -M_PI/2
angle_max: M_PI/2
angle_increment: M_PI/360/2
scan_time: 0.333
range_min: 0.2
range_max: 40.0
use_inf: true
inf_epsilon: 1.0
concurrency_level: 1
</rosparam>
</node>
</launch>
Sample output of rostopic hz for the scan:
$ rostopic hz /zed2/zed_node/scan
subscribed to [/zed2/zed_node/scan]
average rate: 9.285
min: 0.097s max: 0.121s std dev: 0.00687s window: 9
average rate: 9.358
min: 0.097s max: 0.121s std dev: 0.00480s window: 18
average rate: 9.354
min: 0.097s max: 0.121s std dev: 0.00470s window: 27
average rate: 9.360
min: 0.097s max: 0.121s std dev: 0.00401s window: 37
average rate: 9.338
min: 0.096s max: 0.121s std dev: 0.00448s window: 46
average rate: 9.330
min: 0.096s max: 0.121s std dev: 0.00413s window: 55
and for the pointcloud
$ rostopic hz /zed2/zed_node/point_cloud/cloud_registered
subscribed to [/zed2/zed_node/point_cloud/cloud_registered]
average rate: 9.806
min: 0.065s max: 0.133s std dev: 0.01900s window: 8
average rate: 9.898
min: 0.065s max: 0.133s std dev: 0.01296s window: 18
average rate: 9.891
min: 0.065s max: 0.133s std dev: 0.01087s window: 28