Permalink
Browse files

HACK: Backdate odometry time 100ms to match LIDAR data.

Based on RViz plot, odometry and LIDAR scan data are offset by about
100ms, which confuses the mapping algorithm. Right now it's unknown
if the error comes from the LIDAR node or the Roboclaw node, never
mind where inside that node is causing the timing issue.

In the short term, the timestamp of odometry data is getting backdated
by 100ms. This is close enough to LIDAR data for gmapping to function
but is only a hack and not an actual fix.

In the long term, need to figure out where that time difference is coming
from and fix it at the source.
  • Loading branch information...
Roger-random committed Sep 25, 2018
1 parent a4ce0bc commit c643846c5e0e233199361248ef7b16236ad86b85
Showing with 1 addition and 1 deletion.
  1. +1 −1 roboclaw_node/nodes/roboclaw_node.py
@@ -84,7 +84,7 @@ def update_publish(self, enc_left, enc_right):
def publish_odom(self, cur_x, cur_y, cur_theta, vx, vth):
quat = tf.transformations.quaternion_from_euler(0, 0, cur_theta)
current_time = rospy.Time.now()
current_time = rospy.Time.now() - rospy.Duration(0.1) # HACK: Backdate 100ms to match LIDAR data
br = tf.TransformBroadcaster()
br.sendTransform((cur_x, cur_y, 0),

0 comments on commit c643846

Please sign in to comment.