Rtabmap recieving inconsecutive timestamps for odometry
I'm using ROS melodic with a realsense d435 camera on a turlebot 3 burger with a raspberry pi 4. I'm using rtabmap to do the mapping. So my problem is that when I run rtabmap its often receives data with incorrect timestamps. The warning looks like this:
Odometry: Detected not valid consecutive stamps (previous=1614669993.243914s new=1614669987.932037s). New stamp should be always greater than previous stamp. This new data is ignored. This message will appear only once.
When I plug the camera into my pc, launch the camera node and run rtabmap on there it works fine. But with the camera plugged into the PI, launching the camera node from there, it shows the error. I initially though it was a network issue (data being sent too slowly between the systems). So I've also tried running roscore on the Pi, along with the camera node and rtabmap (nothing transmitted over the network), but the same issue occurs. I'm launching rtabmap with approx_sync:=true, and on the camera node enable_sync:=true and inital_reset:=true.
Any suggestions on how to improve this?
which realsense sdk version are you using? and which firmware is installed on the camera?
I'm using the realsense-ros package, I think that's the realsense 2.0 sdk. The firmware version is: 05.12.10.00
I am on realsense v.2.42.0, with firmware 05.12.11.00 on a D435i.
I checked the delay of the data sent along the /camera/aligned_depth_to_color/image_raw topic. When the device is plugged into my pc, the delay is usually around 0.2 seconds. When plugged into the pi the delay is 34222 seconds. Any ideas on what to do with this issue?