flexbe_app
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
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!
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).
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??
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.
working on a NUC i7 16GB RAM Ubuntu 18.04 ROS melodic
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)
Once I git clone my own behaviors (linked above) it does load my behaviors - albeit with the hanging on the last state...
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?
I've got the same issue as @marekskocz with Ubuntu 18.04 and ROS melodic
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
installspython-yaml
on latest version3.12
(I think this is the ROS default for Ubuntu 18.04) -
pip
installspyyaml
on latest version5.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.
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.