Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior execution failed! ROS time moved backwards #159

Open
tropappar opened this issue Jan 20, 2022 · 1 comment
Open

Behavior execution failed! ROS time moved backwards #159

tropappar opened this issue Jan 20, 2022 · 1 comment

Comments

@tropappar
Copy link

I often (not always) get the error message

Behavior execution failed!
ROS time moved backwards

when executing a behavior state machine on board.

This is the exception traceback:

[/uav_0/behavior:local]: Traceback (most recent call last):
  File ".../flexbe/flexbe_behavior_engine/flexbe_onboard/src/flexbe_onboard/flexbe_onboard.py", line 132, in _behavior_execution
    result = self.be.execute()
  File ".../flexbe/flexbe_behavior_engine/flexbe_core/src/flexbe_core/behavior.py", line 165, in execute
    result = self._state_machine.spin()
  File ".../flexbe/flexbe_behavior_engine/flexbe_core/src/flexbe_core/core/state_machine.py", line 71, in spin
    self.sleep()
  File ".../flexbe/flexbe_behavior_engine/flexbe_core/src/flexbe_core/core/state_machine.py", line 85, in sleep
    self._current_state.sleep()
  File ".../flexbe/flexbe_behavior_engine/flexbe_core/src/flexbe_core/core/ros_state.py", line 22, in sleep
    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
@dcconner
Copy link
Member

Questions:

  1. Is this real system hardware or simulation?
  2. What are you using for time sync between computers?

Do you think this just needs an exception handler block in ros_state.py line 22 and just continue on its way assuming the timer expired, or are there deeper issues that you are concerned with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants