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

Behaviour hangs on last state. Forcing doesn't work. Stop Execution doesn't work. And displays the last state name in Lock Behaviour #38

Open
GalMoore opened this issue Jul 29, 2019 · 11 comments

Comments

@GalMoore
Copy link

Screenshot from 2019-07-29 21-16-11

@GalMoore
Copy link
Author

Screenshot from 2019-07-29 21-17-46

@pschillinger
Copy link
Member

pschillinger commented Jul 29, 2019 via email

@GalMoore
Copy link
Author

Thanks @pschillinger, I'm not getting anything on rostopic echo /flexbe/command_feedback. I am getting a heartbeat though on rostopic echo /flexbe/heartbeat (even if starts hanging).

@GalMoore
Copy link
Author

Thanks @pschillinger, I'm not getting anything on rostopic echo /flexbe/command_feedback. I am getting a heartbeat though on rostopic echo /flexbe/heartbeat (even if starts hanging).

anything else I can do to help debug??

@pschillinger
Copy link
Member

pschillinger commented Jul 29, 2019 via email

@GalMoore
Copy link
Author

GalMoore commented Jul 30, 2019

working on a NUC i7 16GB RAM Ubuntu 18.04 ROS melodic

@GalMoore
Copy link
Author

GalMoore commented Aug 1, 2019

I'm trying to install flexbe from scratch into a new catkin_ws (as I've done before succesfully) but this time I meet this, which I don't remember seeing before (and doesn't let me create any behaviours or load any)
image
Once I git clone my own behaviors (linked above) it does load my behaviors - albeit with the hanging on the last state...

@marekskocz
Copy link

I am having the same issue here (working on Intel NUC i7 with Ubuntu 18.04 with ROS melodic). I think the problem is somewhere in the link between the user interface and the engine in the background.

The user interface gets stuck once the last state of the behavior is completed, and it is not possible to force stop execution (stopping execution does work as long as the last state is not yet completed). On the top left in the UI it also still says the behavior is 'running'. However, the behavior engine in the background does actually finish the execution of the behavior, as in the terminal I can see messages that the behavior execution is finished and that the behavior engine is ready.

Any ideas how this could be fixed?

@JessieMcVicar
Copy link

I've got the same issue as @marekskocz with Ubuntu 18.04 and ROS melodic

@pschillinger
Copy link
Member

pschillinger commented Jun 17, 2020

The issue of getting stuck in the last state turned out to be caused by different versions of the yaml package. In fact, depending on how you install it, you get different versions:

  • apt installs python-yaml on latest version 3.12 (I think this is the ROS default for Ubuntu 18.04)
  • pip installs pyyaml on latest version 5.3

If both are installed, pip wins and causes the above issue.

While I work on fixing the issue itself, you might consider to use the working yaml version:
See fix at the bottom of my post.

Update: The way this bug comes into the system is actually via ROS messages. I tried the following code for both yaml installations:

from flexbe_msgs.msg import BEStatus
msg = BEStatus()
msg.args = ['test']  # string[] type in .msg definition
print(msg)

For python-yaml / 3.12 I get valid yaml:

stamp:
  secs: 0
  nsecs:         0
behavior_id: 0
code: 0
args: [test]

However, for pyyaml / 5.3 I get invalid yaml:

stamp:
  secs: 0
  nsecs:         0
behavior_id: 0
code: 0
args: - test

Causing

yaml.scanner.ScannerError: sequence entries are not allowed here
  in "<string>", line 6, column 7:
    args: - test

Another Update: This issue should be fixed by ros-melodic-genpy version 0.6.10+. For some reason, apt did not automatically update although the version was release already Jan 25. But manually running

apt install ros-melodic-genpy

updated to the latest version and fixed the issue for me even with pyyaml being installed.

@antoan
Copy link

antoan commented Mar 13, 2023

This doesn't work for me on Noetic, develop branch, unfortunately.

My system python pyyaml is 6.0. I'd be grateful for any workaround.

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

5 participants