AinsteinAI / ainstein_radar

ROS support for Ainstein radar sensors.
BSD 3-Clause "New" or "Revised" License
45 stars 20 forks source link

Tracking filter update rate not actually dynamically reconfigurable #4

Open nrotella-ainstein opened 4 years ago

nrotella-ainstein commented 4 years ago

https://github.com/AinsteinAI/ainstein_radar/blob/f28b700d0b8a82e29949733203b600b8a551ad6e/ainstein_radar_filters/src/tracking_filter_node.cpp#L61

The tracking filter update rate is set by the tracking filter node in its constructor via the first (automatic) call to the dynamic reconfigure callback, which passes it to the underlying filter to launch a periodic thread at the specified rate.

Any future change to the update rate via dynreconfig does nothing - this includes loading parameters from a YAML immediately after launching the tracking filter node. Thus, the filter update rate can only be changed from default by overriding the default parameter value when launching the node, and therefore should be set to non-dynamic.

Alternatively, the update rate of the periodic task itself could be changed based on the dynamic parameter, but this may have undesirable consequences.