can we make the imu_tools complementary filter output at a slower rate than the filter input
Hello,
I made a complementary filter, getting data from my imu board at 400 hz. and outputting the results at 400hz.
I feed that data to robot_pose_ekf, along with odom data, and it works. What I am having trouble with is that, when I visualize the imu messages on rviz, I get stale data warnings from time to time. basically rviz is running on my laptop, and imu filter is running on the RPI, connected over the network, so because of the network lag, some messages do delay and I get status errors.
If I lover the sensor board output frequency to 50hz, I get no errors.
Is there a way to reduce the output rate of the imu_complementary_filter? Just for visualization? I can of course listen on the output data, then republish 1 out of N messages to reduce speed, but is there any other way that can be used for this kind of situation?
Best regards. Can
Why don't you just modify your node to publish at 50 hz? You can take mean of four readings and publish one.