robot_localization:The /odometry/filtered frequency is not stable
I'm going to fusing the data of visual odom and imu. Question 1 By calculating the difference between the timestamps of two adjacent frames, it was found that the fused data frequency was unstable, but the result of rostopic hz /odometry/filtered was stable.Why is that? How do you get a stable output frequency?
Question 2 I plotted the /odometry/filtered data and the visual odom data in Matlab.As shown below. http://bbit.top/lib/exe/detail.php?id... The x-coordinate is the timestamp, and the y-coordinate is the quaternion x. The blue dot is visual odom data, the green dot is /odometry/filtered data. The /odometry/filtered data is more unevenly distributed than the visual odom data. My config is shown below.
<param name="map_frame" value="map"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="base_link"/>
<param name="world_frame" value="odom"/>
<param name="transform_time_offset" value="0.0"/>
<param name="transform_timeout" value="0.0"/>
<param name="odom0" value="/loop_fusion/odometry_rect"/>
<param name="imu0" value="/mynteye/imu/data_raw"/>
<rosparam param="odom0_config">[true, true, true,
true, true, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<rosparam param="imu0_config">[false, false, false,
false, false, false,
false, false, false,
true, true, false,
false, false, false]</rosparam>
<param name="odom0_differential" value="false"/>
<param name="imu0_differential" value="false"/>
<param name="odom0_relative" value="false"/>
<param name="imu0_relative" value="false"/>
<param name="imu0_remove_gravitational_acceleration" value="true"/>
<param name="print_diagnostics" value="true"/>
<param name="odom0_queue_size" value="5"/>
<param name="imu0_queue_size" value="20"/>
<param name="debug" value="false"/>
<param name="debug_out_file" value="debug_ekf_localization.txt"/>
<rosparam param="process_noise_covariance">[0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.05, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0.002, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.002, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.004, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0,
0, 0, 0, 0, 0, 0 ...
What does “unstable” mean? Can you provide numbers or examples. Also what’s the last commit hash you’re using?
@stevemacenski Sorry for the late reply. The following values are the frequencies obtained by calculating the difference between the timestamps of two adjacent frames. I set the frequency to 50, but they don't look like "stable" 50hz from the timestamp. And, some adjacent timestamps are the same, so the frequency obtained is inf. The last commit hash is 2d2976a737bbea00f638d9519783aaa9645a2c64. Author: Tom Moore tmoore@locusrobotics.com Date: Mon Aug 26 10:06:08 2019 +0100
49.7020227754802 66.3571699784837 99.4028676383458 49.7757523972278 33.1675655158234 39.7930229689857 49.7267715508554 66.3571699784837 Inf 28.4251673940741 33.1675655158234 49.7261820078722 49.7515449854694 49.7757523972278 Inf 28.4172713537538 39.8088856407969 49.7261820078722 66.3571699784837 39.7930229689857 199.207029209214