flexbe_app icon indicating copy to clipboard operation
flexbe_app copied to clipboard

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

Open GalMoore opened this issue 5 years ago • 11 comments

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

GalMoore avatar Jul 29 '19 18:07 GalMoore

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

GalMoore avatar Jul 29 '19 18:07 GalMoore

Looks like a parsing error in the ROS interface of the app, I will take a closer look.

Can you run "rostopic echo /flexbe/command_feedback" during the end of behavior execution and copy the output here? It would help to see what triggers the printed warnings. Thanks!

pschillinger avatar Jul 29 '19 18:07 pschillinger

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 avatar Jul 29 '19 19:07 GalMoore

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??

GalMoore avatar Jul 29 '19 19:07 GalMoore

I was asking for the topic because of the warning message in your first post. But then, it might not be related to the issue of hanging.

What is the state where it hangs? Is it one implement by you or one of the pre-defined states? In the first case, can you share the source code? Is there anything in the code that could be blocking? In general, any information that could help to replicate the problem would be useful.

pschillinger avatar Jul 29 '19 20:07 pschillinger

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

GalMoore avatar Jul 30 '19 15:07 GalMoore

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...

GalMoore avatar Aug 01 '19 06:08 GalMoore

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?

marekskocz avatar Jun 03 '20 11:06 marekskocz

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

JessieMcVicar avatar Jun 15 '20 01:06 JessieMcVicar

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.

pschillinger avatar Jun 17 '20 16:06 pschillinger

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.

antoan avatar Mar 13 '23 18:03 antoan