merose / diff_drive

ROS nodes for controlling and monitoring a differential drive robot.
BSD 3-Clause "New" or "Revised" License
129 stars 61 forks source link

Fix division by zero error in rosbag playback #1

Closed plieningerweb closed 6 years ago

plieningerweb commented 7 years ago

[INFO] [1510936022.126839, 0.000000]: /diff_drive_odometry started169086
Traceback (most recent call last):08541 Duration: 0.000000 / 13.169086
File "//catkin_ws/src/diff_drive/nodes/diff_drive_odometry", line 89, in
node.main()
File "//catkin_ws/src/diff_drive/nodes/diff_drive_odometry", line 45, in main
self.publish()
File "//catkin_ws/src/diff_drive/nodes/diff_drive_odometry", line 49, in publish
self.odometry.updatePose(rospy.get_time())
File "//catkin_ws/src/diff_drive/src/diff_drive/odometry.py", line 70, in updatePose
self.pose.xVel = deltaTravel / deltaTime
ZeroDivisionError: float division by zero