imu_apps Publish Frequency
-
With the updated SDK 1.1, I have noticed that the imu_apps publish frequency is maxed out at 500 Hz.
Previously, I was able to set the imu_apps reliably even to ~900 Hz or so, by setting the "imu0_sample_rate_hz" value in 'voxl-imu-server.conf' file.
Now, even when I set it to a higher than 500 Hz value, it continues to only publish at about 500 Hz.Has anyone else seen this issue or know if there is anything being done to support faster imu pub rates?
Thank you in advance! -
@jenyeom , how are you testing this?
what do you see when you run
voxl-inspect-imu -a imu_apps ... gravity| accl_x accl_y accl_z| gyro_x gyro_y gyro_z | Temp | timestamp | dt | 9.82 | -0.72 8.82 4.26 | 0.012 -0.001 -0.006 | 27.84 | 14760214 | 0.976|
(dt is about 1ms)
my
/etc/modalai/voxl-imu-server.conf
says"imu0_sample_rate_hz": 1000,
I am using SDK 1.1.2
-
@Alex-Kushleyev
Looks like I do have the same behavior (dt about 1ms) when I run the inspect-imu command with the rate set to 1000.However, the ROS2 topic of /quadrotor/imu_apps is currently only running at a max rate of ~550 Hz even with the "imu0_sample_rate_hz" set to 1000.
It's interesting because the same ROS2 code prior to updating to SDK 1.1.2 (when it was at SDK 1.0) had no issue publishing the imu_apps topic at the requested rate.
Maybe I'm missing something, but I can't think of anything else that would be different.
I've dug into the imu_interface code in the voxl_mpa_to_ros2 package but haven't found anything related to publishing frequencies.
Do you have any idea what might be throttling the imu_apps publish rate? -
@jenyeom , how are you measuring the frequency of the imu messages on the ROS size? Did you do something like
rostopic hz <topic>
-
@Alex-Kushleyev
Yes, also using the option -w 500 (or other numbers that I'm expecting) -
@jenyeom , i am not sure, can you please try setting cpu mode to performance:
voxl-set-cpu-mode perf
This will prevent cpu from sleeping excessively in low power mode. Perhaps the dt is so low that the cpu oversleeps and does not handle all the imu messages.
-