JdeRobot / drones

15 stars 11 forks source link

Handling "ROS Time moved backwards" exception #156

Closed pariaspe closed 2 years ago

pariaspe commented 3 years ago

Fixed in #157

pariaspe commented 3 years ago
Exception in thread Thread-28:
Exception in thread Thread-27:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
    self.run()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 228, in run
  File "/usr/lib/python3.8/threading.py", line 870, in run
    r.sleep()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 103, in sleep
    self._target(*self._args, **self._kwargs)
  File "/RoboticsAcademy/exercises/rescue_people/web-template/exercise.py", line 110, in process_code
    sleep(self._remaining(curr_time))
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 163, in sleep
    exec(iterative_code, reference_environment)
  File "<string>", line 6, in <module>
  File "/RoboticsAcademy/exercises/rescue_people/web-template/hal.py", line 79, in takeoff
    self.drone.takeoff(h)
  File "/catkin_ws/src/drone_wrapper/src/drone_wrapper/drone_wrapper_class.py", line 301, in takeoff
    self.rate.sleep()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 103, in sleep
    sleep(self._remaining(curr_time))
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 163, in sleep
    raise rospy.exceptions.ROSTimeMovedBackwardsException(time_jump)
rospy.exceptions.ROSTimeMovedBackwardsException: ROS time moved backwards
    raise rospy.exceptions.ROSTimeMovedBackwardsException(time_jump)
rospy.exceptions.ROSTimeMovedBackwardsException: ROS time moved backwards