diff --git a/src/python_pybind11/test/MecanumDriveOdometry_TEST.py b/src/python_pybind11/test/MecanumDriveOdometry_TEST.py index d94e61a5..16bde377 100644 --- a/src/python_pybind11/test/MecanumDriveOdometry_TEST.py +++ b/src/python_pybind11/test/MecanumDriveOdometry_TEST.py @@ -14,7 +14,9 @@ import datetime import math +import time import unittest + from ignition.math import MecanumDriveOdometry, Angle @@ -38,7 +40,7 @@ def test_constructor(self): # Setup the wheel parameters, and initialize odom.set_wheel_params(wheelSeparation, wheelRadius, wheelRadius,wheelRadius) - startTime = datetime.datetime.now() + startTime = datetime.timedelta(time.monotonic()) odom.init(datetime.timedelta()) # Sleep for a little while, then update the odometry with the new wheel @@ -75,7 +77,7 @@ def test_constructor(self): self.assertAlmostEqual(0.0, odom.angular_velocity().radian(), delta=1e-3) # Initialize again, and odom values should be reset. - startTime = datetime.datetime.now() + startTime = datetime.timedelta(time.monotonic()) odom.init(datetime.timedelta()) self.assertAlmostEqual(0.0, odom.heading().radian()) self.assertAlmostEqual(0.0, odom.x())