Based on the startup example
here, if you enabled "unite_imu_method" to "linear_interpolation", try with "copy" instead (on my computer with "linear_interpolation", sometimes imu topic is not published):
# ISSUE: Use unite_imu_method:="copy" if imu topics keep stopping
$ roslaunch realsense2_camera rs_camera.launch \
align_depth:=true \
unite_imu_method:="copy" \
enable_gyro:=true \
enable_accel:=true
# with unite_imu_method:="copy"
$ rostopic hz /camera/imu
subscribed to [/camera/imu]
average rate: 399.385
min: 0.001s max: 0.004s std dev: 0.00038s window: 380
# with unite_imu_method:="linear_interpolation"
$ rostopic hz /camera/imu
subscribed to [/camera/imu]
average rate: 370.507
min: 0.000s max: 0.012s std dev: 0.00204s window: 174
no new messages
no new messages
no new messages
average rate: 37.700
min: 0.000s max: 4.262s std dev: 0.31146s window: 187
average rate: 35.511
min: 0.000s max: 4.262s std dev: 0.29399s window: 21