turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
99 stars 45 forks source link

The timestamp of odom topic is incorrect #312

Closed atinfinity closed 9 months ago

atinfinity commented 9 months ago

Please provide the following information:

The timestamp values of scan and odom will be very close.

Actual behaviour

The timestamp values of scan and odom are significantly different. And, it seems that the timestamp of odom is incorrect.

scan

ros2 topic echo /scan --no-arr

header:
  stamp:
    sec: 1701157280
    nanosec: 899376422
  frame_id: rplidar_link
angle_min: -3.1241390705108643
angle_max: 3.1415927410125732
angle_increment: 0.005806980188935995
time_increment: 0.00011273796553723514
scan_time: 0.1216442659497261
range_min: 0.15000000596046448
range_max: 12.0
ranges: '<sequence type: float, length: 1080>'
intensities: '<sequence type: float, length: 1080>'

odom

ros2 topic echo /odom --no-arr

header:
  stamp:
    sec: 1692846621
    nanosec: 586804548
  frame_id: odom
child_frame_id: base_link
pose:
  pose:
    position:
      x: -0.07199306786060333
      y: -0.030085228383541107
      z: 0.00010956914047710598
    orientation:
      x: -0.005013398826122284
      y: -0.015475205145776272
      z: 0.00598546676337719
      w: 0.9998497366905212
  covariance: '<array type: double[36]>'
twist:
  twist:
    linear:
      x: 0.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 9.896715447155202e-09
      z: 0.0
  covariance: '<array type: double[36]>'

To Reproduce

  1. Power on TurtleBot4
  2. ros2 topic echo /scan --no-arr
  3. ros2 topic echo /odom --no-arr

Other notes

atinfinity commented 9 months ago

I found related issue https://github.com/iRobotEducation/create3_examples/issues/44#issuecomment-1647931520. So, I tried to set NTP based on https://iroboteducation.github.io/create3_docs/setup/compute-ntp/.

As a result, this problem was resolved. On the other hands, this information could not find from https://turtlebot.github.io/turtlebot4-user-manual/.