Dynamic Pose Covariance for ndt_pose
I am trying to fuse autoware.AI's ndt_pose into the robot_localization package with other sensor data. However I will need to add covariance to ndt_pose to convert the message type from geometry_msgs/PoseStamped to geometry_msgs/PoseWithCovarianceStamped.
Is there a good way to generate the ndt_pose covariance dynamically (perhaps based on the Fitness Score)? I am currently using static covariance but I feel that dynamic covariance will be better for the localisation performance.
Edited
I've decided to calculate simple moving average (SMA) and exponential moving average (EMA) to dynamically derive the covariance. I'm more inclined to use the covariance derived from the exponential moving average and I chose a time period which is close to the rate of publishing of the /ndt_pose topic.
Nonetheless, are there other better ways to dynamically generate the ndt_pose covariance?
SMA and EMA formulas = https://en.wikipedia.org/wiki/Moving_...