Git Product home page Git Product logo

flexbe_app's Introduction

FlexBE App

User interface (editor + runtime control) for the FlexBE behavior engine.

FlexBE CI

Installation

Clone the following repos into your ROS workspace:

git clone https://github.com/FlexBE/flexbe_behavior_engine.git  # if not already present
git clone https://github.com/FlexBE/flexbe_app.git

Build you workspace:

catkin_make # or catkin build

During the build process, the required nwjs binaries are automatically downloaded and extracted. To download the binaries manually instead, run the script bin/nwjs_install.

Workspace

In order to create and prepare a new repository for behavior development, run the following script in your ROS workspace and pass it the name of your project or identifier:

rosrun flexbe_widget create_repo [your_project_name]

This will initialize a new local git repository with the correct workspace structure which you can then push to a desired remote location. Make sure that you build the workspace afterwards.

Usage

If desired, run the following command to create a shortcut in the application menu:

rosrun flexbe_app shortcut create
rosrun flexbe_app shortcut remove  # if you want to remove it

Use the shortcut or the following command to run the FlexBE App alone, i.e., for only developing behaviors, but not executing them:

rosrun flexbe_app run_app --offline

Omitting the --offline arg will let the App try to connect to ROS. You can manually connect/disconnect the App in the Configuration view.

Use the following launch file to run FlexBE's operator control station, i.e., everything FlexBE requires on the operator machine for controlling behavior execution:

roslaunch flexbe_app flexbe_ocs.launch
roslaunch flexbe_onboard behavior_onboard.launch  # counterpart expected to run on the robot

Use the following launch file to run both of the above for local behavior execution:

roslaunch flexbe_app flexbe_full.launch

Backwards Compatibility

The FlexBE App in this repository replaces the previous flexbe_chrome_app.


Please note that the way how state and behavior packages are detected has changed and breaks direct compatibility. Follow the instructions below to make the required changes. Behavior packages can also be converted automatically by the new FlexBE App.

State packages

A package is a state package for FlexBE if its package.xml declares the export of flexbe_states:

<package>
...
  <export>
    <flexbe_states />
  </export>
...
</package>

It is then expected to provide Python class definitions as described in Developing Basic States. Example: flexbe_states. Adding the above export statement is the only change to previous versions.

Behavior packages

A behavior package contains the code and manifest files generated by the FlexBE App. Usually, you do not need to modify it manually. Again, a behavior package is identified by an export statement in its package.xml:

<package>
...
  <export>
    <flexbe_behaviors />
  </export>
...
</package>

If no package in the ROS_PACKAGE_PATH contains such an export statement, the FlexBE App will suggest to initialize one of the existing packages as behavior package. Doing so will add the export statement and create the correct structure. If the chosen package already contains behavior manifests, the referenced behaviors can be automatically imported. The old behavior packages and manifests (all manifests outside the manifest folder, e.g., those inside the behaviors folder) can be removed afterwards.

In order to create a completely new behavior package, create an empty ROS package and then use the FlexBE App to initialize it.

A behavior package is expected to provide a manifest folder which contains the manifests for all provided behaviors. The behaviors are located in a Python module named like the package and contained in the src folder.

flexbe_app's People

Contributors

benmaidel avatar cheffe112 avatar dcconner avatar dorianscholz avatar dustingooding avatar fmessmer avatar henroth avatar meyerj avatar pschillinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flexbe_app's Issues

General Question: How to integrate appliocation logic the flexbe app?

Hi all!

First of all: Thank you. Flexbe looks really interesting. I am rather new in the field of robotics and ROS. I found flexbe while looking for a hierarchical state machine.

I am building a voice user interface for one of our robots. A state machine is a very neat wait to structure and streamline the process, since there are many steps involved (STT, NLU, TTS,..).

However: I followed the Flexbe tutorials and I have a basic understanding of the tool. Yet one essential question remained. Maybe its obvious for you, but for a newbie it no: How do I integrate my application logic with the statemachine? Where do I actually put my files (python) to work with states and transitions?

I am very thankful for any help and I hope will contribute to this project as well in the future.

Best
Areindl

Problem with states which have the same type

When having two state types with identical names in different state packages, the App only shows one of the two types twice when using the Add State feature. Which type is shown twice seems to change randomly on App restart.
state_type1
state_types2

Problem creating new behaviours

Hi, I have some problems when I try to create new behaviors.
Here the error message:
link

If I use the default behaviors available I have no problem at all!
(but if I load them, change the name and then I try to save, here we have the error!)

Obviously I am not able to see my new behavior on the "select behaviors" column!

Behaviors Packages: "flexbe_behaviors"
State Packages: "flexbe_states"

I think that could be a problem with my configuration or maybe with the app because with the Chrome_App everything was fine.

Thanks,
Alessio

State file name overwritten in Behavior source code when saving

I have pulled the latest development repo in order to utilise the new 'update state when source code changes' feature. However I seem to have come across a bug which prevents me from running the behavior. Every time I save the behavior the file name of the State ( in this case- jp_picking_main.py) changes in the behavior source code. As seen below on 2nd last line.

Expected Behavior Source Code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
#               WARNING: Generated code!                  #
#              **************************                 #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] tags will be kept.        #
###########################################################

from flexbe_core import Behavior, Autonomy, OperatableStateMachine, ConcurrencyContainer, PriorityContainer, Logger
from kr3_flexbe_states.jp_picking_main import JP_FindAndPick
from flexbe_states.log_state import LogState

Actual Behavior Source Code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
#               WARNING: Generated code!                  #
#              **************************                 #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] tags will be kept.        #
###########################################################

from flexbe_core import Behavior, Autonomy, OperatableStateMachine, ConcurrencyContainer, PriorityContainer, Logger
from kr3_flexbe_states..goutputstream-C9ESGZ import JP_FindAndPick
from flexbe_states.log_state import LogState

I then proceed to get the following output when running the behavior :

[07:55:57] --> Starting new behavior...
[07:55:57] Exception caught in behavior definition: [-]
    invalid syntax (tmp_-826516856.py, line 12)
[07:55:57] No behavior active.
[07:55:57] Dropped behavior start request because preparation failed.

Any thoughts? cheers!

Flexbe_app isn't usable anymore

hello,
I tried to install Flexbe_app, but i couldn't use it. I thought i missed a step or something so erased everything and did it again. Another person had the same problem as I, the flexbe app open but no behaviors are accessible from it.

When we opened the flexbe_app we had errors showing up about manifest not accessible and only 3 behaviors were found (but none were accessible from the app window -beside it should have been 7 behaviors, not 3).
we came to the conclusion that the following of the steps wasn't the problem but that this new flexbe_app version had a problem.
The flexbe_app open correctly but the manifest of the behavior packages aren't seen anymore. (we can't create anything).

I fixed the problem in my computer (after 2 days of strugling) by downloading this version and changing the run_app (in the bin) by a previous version of your flexbe_app (the 2.0.6 i could find on ros_ignite) and adding some files.

The 2.0.6 version isn't sustainable because the nwjs version is not recent enough and the behaviors can't be saved. So i did a mix with both versions (recuperated the manifest file, lib and locates files and changed the "app_run")
I still get the error "Your profile can not be used because it is from a newer version of NW.js.
Some features may be unavailable. Please specify a different profile directory or use a newer version of NW.js."

But now i can actually see my behaviors files and save them.

The weird mix done isn't a good solution, it would be great to fix this please :)
Here is the mix i did.

Thank you for your great app!
run_app.txt

Extreme CPU load by Python processes after shutdown of FlexBE app

While using the FlexBE app through roslaunch flexbe_app flexbe_ocs.launch, I can see in output of top that a bunch of Python-processes are running (probably 10 or something). When I close the app these processes start to consume way more CPU cycles than before (on average 0,3 while using the app, around 75 right after shutdown.

Screenshot from 2020-03-06 09-56-53
Screenshot from 2020-03-06 09-57-10

I checked out the "develop"-branch of flexbe_app, rebuilt everything and this phenomenon didn't show up.

State list is empty

Hello, the state filter cannot work because it can find no states. Roscd flexbe_states works.

roscd

I have also tried reinstalled FlexBE (the latest version), but problem remains the same. Available state and behavior is empty in Flex App. I don't known why. Please help.
flex_app

Thanks in advance!

Statemachine Editor: Selecting a state transition net and then pressing `Esc` key causes the state transition net to disappear

In the picture below, the 'failure' outcome of the InitializeLeg state is connected to the state machine's (sm) 'failed' outcome:
screenshot1

However, that connection was a mistake. I don't want to exit the sm if InitializeLeg state returns a 'failure' outcome, but I'm not sure where it should go. I want to move the 'failure' outcome back to InitializeLeg state like 'shutdown', so I select the 'failure' net.
screenshot2

and press 'Esc'. This causes InitializeLeg's 'failure' outcome net to disappear. Now the only way to get it back is to restart the FlexBE app, destroying any unsaved work.
screenshot3


The workaround is to connect outcome nets somewhere else (e.g. the origin state); however, it would be better if there were a way to move the outcome back inside the state box to prevent confusion between outcome nets that supposed to loop back and outcome nets that are just there temporarily.
screenshot4

Explicit state package feature bug

I am encountering an issue when i save my Flexbe behaviors with the latest release. I believe it has stemmed from the changes made in this commit, e4b90f3 . When behaviors are saved in the app it gives imported behaviors aliases which are not handled (i.e renamed) in the the rest of that behaviors file.
screenshot from 2019-01-17 15-17-22

Was the idea to just give aliases to the imported states only? I notice when you turn off the explicit state package feature in the settings it has no effect on the behavior imports, they are still given an alias.

Cheers!

Error with "status label"

Running the example_behavior with App version 2.0.1

chrome-extension://bkpceecdjoihccpjecmbafbjifpefbad/src/ui/ui_runtimecontrol.js:113
		status_label = R.text(R.width / 2, R.height - 30, text)
		                ^

TypeError: Cannot read property 'text' of undefined

    at drawStatusLabel (chrome-extension://bkpceecdjoihccpjecmbafbjifpefbad/src/ui/ui_runtimecontrol.js:113:19)
    at Object.UI.RuntimeControl.displayOutcomeRequest (chrome-extension://bkpceecdjoihccpjecmbafbjifpefbad/src/ui/ui_runtimecontrol.js:721:4)
    at outcome_request_callback (chrome-extension://bkpceecdjoihccpjecmbafbjifpefbad/src/rc/rc_pubsub.js:44:21)
    at process.nextTick (chrome-extension://bkpceecdjoihccpjecmbafbjifpefbad/src/ros/ros_subscriber.js:50:59)

In method src/ui/ui_runtimecontrol.js at L111

	var drawStatusLabel = function(text) {
		if (status_label != undefined) status_label.remove();
		status_label = R.text(R.width / 2, R.height - 30, text)
			.attr({'font-size': 16, 'fill': 'gray'});
	}

There is no protection against R being undefined and needing to initialized

The States in the Concurrenncy Container does not Run Parallally as Intended.

I have created a flexbe behavior to test the working of concurrency container. The concurrency container contains 3 states which should run parallelly. Each of these 3 states basically publishes a unique string to 3 different topics. The value published by the topic is printed using "rostopic echo" ROS command. But when I run the behavior, the 3 concurrency states do not print the strings simultaneously instead prints the strings one after another. This is not how the parallel states should run in a concurrency container. Instead, all the 3 strings should be printed at once. I have attached my flexbe behavior graph and code.

The below two images show the behavior flow.
behavior_flow

3_states_inside_concurrency_container

I have attached the behavior and the code for the individual states below.
flexbe_behavior_and_states.tar.gz

FlexBE app seems to load only the first EventState per module

First of all, thanks @pschillinger for developing FlexBE and all the work you put into it; in fact, this is a great tool with lots of useful features!

I came across some unexpected behavior (that is, unexpected to me) when transforming my existing smach states to FlexBE states. I've grouped several smach states inside one module, and when I've made FlexBE states out of them, it seems that FlexBE loads only the first state per module and ignores all others in the same file.

I guess this is somewhat related to #42 and might also come from https://github.com/FlexBE/flexbe_app/blob/master/src/ros/ros.js, however I was unable to find where exactly this could be avoided.
Anyhow, this may as well be desired behavior; if so, I guess it would be helpful to add a remark in http://wiki.ros.org/flexbe/Tutorials/Developing%20Basic%20States - or maybe it is already somewhere in the documentation and I've skipped it accidently.

Suggestion: Linking of outcomes with the same name.

I am currently declaring two outcomes called 'finished' in a behavior such that i can make the behavior state machine look a lot neater ( i.e. insuring transitions lines aren't overlapping states, etc). However, when i go to embed this behavior i will have to handle both of these 'finished' outcomes.

It would be neat if flexbe_app could realise that two of the outcome names are the same, and internally link them together such that when embed the behavior you only have to handle/ link one of the outcomes.

Would doing something like this make sense?

Runutime Control Display bug

What I have done is as follows:

  1. Use flexbe_app to run behavior_1
  2. After bahavior_1 is completed, keep flexbe_app opening, but run behavior_2 by calling action (http://wiki.ros.org/flexbe/Tutorials/Running%20Behaviors%20Without%20Operator).
  3. After behavior_2 is completed, run behavior_1 again by flexbe_app. Behavior works, but no runtime control display in the app. As shown by Fig. 1, on-board status is running and initialization is done, which is really done. Since the display is empty, I cannot continue the next state since a high-level outcome is to be verified as shown in Fg. 2.

image
Fig. 1

image
Fig. 2

I tried to stop Execution and restart behavior for many times, but problem remains.

repeated behavior and package display

Hi,
first, what I use is ROS melodic in Ubuntu18.04, flexbe_app develop branch (latest) and flexbe_behavior_engine develop branch (latest). When I load behaviors in flexbe APP, all available behaviors and the available package display twice as shown in Fig. 1.
app-load
Fig.1

The states display are normal.The following are references that may be useful.
behavior-src
Fig.2

menifest
Fig. 3

More information can be provided if needed.

By the way, if there any command to check available behavior name without launch flexbe app, so that certain behavior can be run by command?

UI: If there are multiple state outcome nets between two states, then their tags will overlap.

Suppose you have 2 states A and B, each with two outcomes 'x' and 'y'

If you connect state A's outcome 'x' to state B, and
state B's outcome 'y' to state A, then
the state outcome nets between the two states (and their tags) will overlap,
meaning that you will only see one line and either 'x' or 'y'.


Perhaps, nets between 2 states should be routed differently (based on origin). Then you'd see 2 distinct lines between state A and state B. One line for the transition from A to B and one for the transition from B to A.

In the case of multiple transitions in one directions, I think it would be best to only render one line and simply display separate tags for each transitions (e.g. If both 'x' and 'y' from state A are connected to state B, then only one line with separate 'x' and 'y' bubbles would be displayed)

Hi, thanks for your contributions! But I have a question.

In my practice of FlexBE_NAV, I notice that the sliding module in the panel only can be changed by operator. For example, if i change it to "Full", the message '->Autonomy changed to 3' comes up. It seems "No" to "Full" matchs "0" to "3". However i have a idea that robot can change the autonomy level initiative when they get in danger. If there some solutions about this for the robots to change the autonomy parameter in other ways(not in the HRI), and the panel instruction also changes together. I don't know how to change the architecture,hope your answer and help!

Comments are not shown when viewing sub-behaviors

When I open a sub-behavior, which then shows with a reddish editor background, the comments previously embedded into this sub-behavior are not shown. They are still present, however, because they show when editing the behavior directly.

This is a very minor issue, of course; just saying.

Use one behavior's userdata in another behavior without re-creating them

Hi, I want to use the same userdata for two different behaviors, does it possible to save a behavior's state machine userdata, then load them into another behavior?

I tried to copy the content of the first behavior's create function (for example: _state_machine.userdata.global_planner = "GlobalPlanner"), then past the content into the [MANUAL_CREATE] section of the second behavior's create function. With this operation, while opening the second behavior, I get these userdata in the State Machine Interface section (such as : Input Keys: global_planner), but nothing in the State Machine Userdata section.

I would like to know if it is possible to copy the userdata value as well, to avoid re-create again those userdata.

Thanks in advance.

State paramter not found

The app does not reognize the state's parameter when you create it without a whitespace:

def __init__(self,target_time):

While it does recognize it when the whitespace is added:

def __init__(self, target_time):

view code does not work

Hi,

I am not sure if this is a bug or not. Basically, opening source code for a state using the button view source, errors out with the message:
Unable to open state in editor: TypeError: Cannot read property 'getFilePath' of undefined

I've described the bug maybe a bit better here ( https://answers.ros.org/question/310698/flexbe-wont-show-source-code/ ), but I thought it was worth opening an issue as well.

I believe that this is a problem in ui_panels_stateproperties.js l:676, where WS.Statelib.getFromLib(state_class) is returning nonsense.

I get from that that maybe my statelib is not configured properly (?) and I wonder what I did wrong.

Thank you very much from the help!

Container with the same Key for input and output

Is it possible to have a container that gets an input key, process it and set it as an output key?
The idea is having number of containers processing the same parameter and passing it between them.
Process A edits a key, passes it to process B (in some cases to C), and then next time A is reached it will use again the same key and edit it.

Thank you for the help.

FlexBE App does not save behavior

I'm following the tutorial and at the very end of "Using the Statemachine Editor" part, I press "Save Behavior" but no message shows up indicating contents were saved. I investigated inside the package folder "tutorial_behaviors" but there is no trace of the content I created inside the app.

Two strange things are happening: 1- Just when I open the app using the flexbe_ocs.launch, the Package dropdown menu is empty, so I can't select anything. 2- There's a yellow pop-up warning "No Behavior Packages - There is no behavior packages available. Please initialize a ROS package for this purpose or prepare one manually." This popup dropdown menu shows a variety of behaviors (flexbe_app, flexbe_core [...] flexbe_widget).

My catkin workspace contains the flexbe_app, flexbe_behavior_engine, generic_flexbe_states and my created package tutorial_behaviors

Load default behaviour when launching flexbe_full.launch?

I just finished the development of a state machine using FlexBE, and now I have a launch file that starts all the nodes my robot requires and set them ready to operate.
Is it possible to either add a specific argument or change some parameters in FlexBE configuration, so my behaviour loads automatically instead of FlexBE starting with no behaviour loaded and for me to have to click in load behaviour > my_behavior? Maybe I should use another way of launch FlexBE rather than flexbe_full launch file?

Can't edit sub-behavior state's parameters

We want to encapsulate some states within a behavior in order to reuse them in different applications/projects.

States within this behavior have some parameters we want to change depending the application. The thing is we can only change parameters when we design the behavior, not in the application.

I don't know if I'm explaining well enough. Let's take a simple example:

  1. We create a behavior containing a wait state and a logger state. In this behavior we can modify for either wait_time or logger text parameters.

wait_behavior

  1. We create a new behavior containing 2 previously created behaviors.

multiple_wait_behaviors

I'd expect if I enter in each behavior (wait_behavior_1, and wait_behavior_2) I could change all wait_time and text parameters, but I can not.

I might missing something, or doing something wrong. For me, this should be a core functionality for scalability of application and projects.

In this example, an alternative is to encapsulate the wait and logger states within a state-machine container, and copy/paste to duplicate them, but I don't think this is the way to go.

Any idea?

Thanks a lot for making such a tool available. Even if we just started using it, it looks very promising!

rc/rc_pubsub bug in feedback

Gives error logging synthesis feedback. Fix just add + before feedback calc:

@@ -234,7 +234,7 @@ RC.PubSub = new (function() {
        }
 
        var synthesis_action_feedback_callback = function(feedback, root, feedback_cb) {
-               console.log('Synthesis status: ' + feedback.status + ' (' (feedback.progress * 100) + '%)');
+               console.log('Synthesis status: ' + feedback.status + ' (' + (feedback.progress * 100) + '%)');

checkBehavior as command line tool

@pschillinger Do you see any easy way to get the checkBehavior functionality from flexbe_app accessible from the command line? So we could do something like rosrun flexbe_app check_behavior behavior_name

Background: We'd like to add the checkBehavior feature from flexbe_app to the rostest pipeline.

Clicking New Behavior button does not set `rosnode_name`, but appears to.

When you click the New Behavior button, all the Behavior fields are reset to empty values, but the Package dropdown in the Dashboard view is populated with the default behavior package name. If you assume it's set (as it appears to be), then continue defining the rest of the required fields/states, then click the Save Behavior button, you get what appears to be a successful action (no errors, etc). You also get so saved file! I injected some debug-style printing and found the following in the updateManualSelections call that is reached by the saveBehaviorClicked method:

# my debug output added
	this.updateManualSections = function(callback) {
		var names = Behavior.createNames();
		T.logError(">>> BEHAVIOR NAMES CREATED");
		T.logError(">>> BEHAVIOR PKG: " + names.rosnode_name);
		T.logError(">>> BEHAVIOR NAME: " + names.file_name);
		T.logError(">>> BEHAVIOR NAME_TMP: " + names.file_name_tmp);

which results in:

>>> BEHAVIOR NAMES CREATED
>>> BEHAVIOR PKG: 
>>> BEHAVIOR NAME: asdf_sm.py
>>> BEHAVIOR_NAME_TMP: adsf_sm_tmp.py

If I go back to the Dashboard and manually click and select the package name in the Package dropdown, followed by the Save Behavior button again, the rosnode_name value is set and the save is successful.

Proposals:

  1. Automatically set rosnode_name to the currently selected Package, even after a New Behavior is clicked.
  2. Add an empty field to the Package dropdown to force a selection. (This is probably easier and more correct.)

Not able to install FlexBE app

I follow same steps as described here. But When I type below command
Singularity hrwros-05.simg:~/hrwros_ws/src> rosrun flexbe_app run_app /home/kevin/hrwros_ws/src/flexbe_app/nwjs/nw: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

How to solve this error, please help?
I am using Ubuntu 18.04 LTS. And Singularity image by edx.

fails to compile

Downloading nwjs... CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/home/gal/flexBE_ws/src/flexbe_app/bin/nwjs_install) returned error code 18 Call Stack (most recent call first): flexbe_app/CMakeLists.txt:36 (safe_execute_process) during compilation

Could it be cause I'm running Ubuntu 18.04 with ROS Melodic?

Flexbe testing ignores rate

The self._rate parameter of states seems to be ignored in the Flexbe testing framework. Even if it's set by a user in the init function, the on_execute function is executed as fast as possible.

states lost in version 2.2.2

Firstly, It's nice to see a new version of flexbe_app and flexbe_behavior_engine :-)
I checkout flexbe_behavior_engine ( version 1.2.3) and flexbe_app (2.2.2), some states of my own package are lost, as shown by Fig.1. Only one state is left.
Then I checkout flexbe_app (2.2.1) back, flexbe_behavior_engine is still in new version 1.2.3, states are complete, as shown by Fig.2.
new-version
Fig. 1

old-version
Fig. 2

Besides, Behaviors are always available, but they cannot work since some states disappear.
Will the new version be incompatible with the custom states?

Problem with linking behaviors and states

Hello everyone,

Two months ago, I had a perfectly working FlexBE installation. However, I tried to launch it back a few days ago and it doesn't seem to find the behaviours and states packages.

This is how my Configuration tab looks like:
flexberror

I've removed my custom packages and tried to reinstall it only with the generic_flexbe_states but it neither works. I have followed the tutorial step by step and the packages show no error when building with catkin_make :/

Has anybody experienced anything similar?

Thanks in advance!!

Suggestion: Add option to reload/refresh state modules from Statemachine Editor

If I am prototyping a state machine with some custom state modules, I often realize that I want to modify a state class in some way (e.g. add/remove parameters, add/remove outcomes).

I can edit the module file and make my desired changes; however, those changes are not reflected in the Statemachine Editor GUI.

Instead I have to save my behavior (not always possible), and close/open the FlexBE app.


It might be beneficial to have a 'reload/refresh' button in the Statemachine Editor to update the list of available states and update the state block within the Editor.

Then the workflow would be: Epiphany -> edit module file -> click 'refresh/reload' in Editor -> ...

Issue with logging in behavior with yaml style formatting

I have a repeatable issue with errors if a Logger.loginfo message has yaml style formatting in the message

2595.511000000 ERROR [topics.py:723(_invoke_callback) [topics: /clock, /rosout, /turtlebot/flexbe/log] bad callback: <function callback at 0x7f7c49fd6050>
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback
    cb(msg)
  File "<string>", line 10, in callback
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key
    if self.check_token(KeyToken):
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 576, in fetch_value
    self.get_mark())
ScannerError: mapping values are not allowed here
  in "<string>", line 1, column 21:
    text: [Receive Goal]: Input new goal ...
                        ^

The formatting was to use [%s]: Input new goal. I tried [%s] - Input but that gave a similar error (different message shown)

  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 490, in fetch_block_entry
    self.get_mark())
ScannerError: sequence entries are not allowed here
  in "<string>", line 1, column 22:
    text: [Receive Path] - Requesting a plan
                         ^

I finally removed the [ ] and -, and I no longer see the issue.

The behavior executive still works, and I only had an indication if I reviewed the rosout.log file or viewed the "Show Terminal" window in FlexBE. It is possible that this error happened in the past, and is generic to ROS, but I believe it is happening on the app side when it either processes the initial behavior or when it receives the message on the the flexbe/log topic.

binary not released to apt

It looks like flexbe_app is not available to install through apt on ubuntu. This is true for both kinetic and melodic. As you can see, they are not listed. I believe the docs are failing to build because of dependencies and this is preventing the release of the binary. The builds fail here and here

ERROR:input_method_base.cc

`/catkin_ws$ roslaunch flexbe_app flexbe_full.launch
... logging to /home/yubao/.ros/log/fb537152-fdd1-11e9-a8ce-309c23e1152f/roslaunch-yubao-Z370M-S01-6367.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://133.15.23.26:40533/

SUMMARY

PARAMETERS

  • /behavior/log_enabled: False
  • /behavior/log_folder: ~/.flexbe_logs
  • /rosdistro: kinetic
  • /rosversion: 1.12.14

NODES
/
behavior (flexbe_onboard/start_behavior)
behavior_launcher (flexbe_widget/be_launcher)
behavior_mirror (flexbe_mirror/behavior_mirror_sm)
flexbe_app (flexbe_app/run_app)

auto-starting new master
process[master]: started with pid [6378]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to fb537152-fdd1-11e9-a8ce-309c23e1152f
process[rosout-1]: started with pid [6395]
started core service [/rosout]
process[behavior_mirror-2]: started with pid [6405]
process[flexbe_app-3]: started with pid [6416]
process[behavior_launcher-4]: started with pid [6418]
process[behavior-5]: started with pid [6419]
[INFO] [1572741395.235183]: 1 behaviors available, ready for start request.
[INFO] [1572741395.745634]: --- Behavior Engine ready! ---
[INFO] [1572741395.746462]: No onboard behavior is active.
[INFO] [1572741395.747591]: --- Behavior Mirror ready! ---
[6420:6420:1103/093643.174381:ERROR:input_method_base.cc(146)] Not implemented reached in virtual ui::InputMethodKeyboardController *ui::InputMethodBase::GetInputMethodKeyboardController()Using InputMethodKeyboardControllerStub
`

When launch

roslaunch flexbe_app flexbe_full.launch

No package list here:
image

No State listed:
image

I cloned these to my catkin_ws

  1. flexbe_app
  2. flexbe_behavior_engine
  3. generic_flexbe_states

And create a demo using:
rosrun flexbe_widget create_repo tutorial

And install ros packages by:
$ sudo apt-get install ros-kinetic-flexbe-*

roscd flexbe_states is no problem.

Here is my system info:
$ uname -a Linux yubao-Z370M-S01 4.15.0-66-generic #75~16.04.1-Ubuntu SMP Tue Oct 1 14:01:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Thanks

Can man save behavior as another with different name?

Hi, first thanks for your work and I really like to use this wonderful tool .

Sometimes I would like to create two similar behavior but with some difference, but I need to create two new behaviors with some repeat work. If the behavior_1 can be saved as behavior_2, then I can load behavior_2 and only edit where is different. This can be easy for users. Is it reasonable?

Multiple instances of Flexbe

Hey @pschillinger ,

I am trying to control two difference robots by launching flexbe_app (roslaunch flexbe_app flexbe_full.launch) in two different namespaces, however the Flexbe_app seems to become unresponsive when i launch the 2nd instance. Is flexbe_app currently not support to run multiple instances, if so, is there a way to get this to work?

Thanks Phil!

can't find any state types in type selection

I am trying to complete the "hello world" tutorial from the ros flexbe wiki.i followed the tutorials closely but cannot seem to find any state types even though i installed all the state packages mentionned in the tutorial and they are detected in the flexbe app.
here is a screenshot:
image

Statemachine Editor: Connecting state outcomes becomes progressively slower based on the number of existing state outcome nets

Was using the Statemachine Editor to edit a sm with 10 states and ~25 state outcome transitions total.

Once I passed about 20 state outcome transitions (i.e. I had made 20 connections between states), I noticed that making new connections became progressively slower (and laggier).

I'd click on the state outcome name in the origin state and the screen would update slowly (and freeze for fractions of a second) while I tried to drag the net to the destination state.

This lagginess only manifests itself when making state transition connections and appears to get worse as the number of state transitions connections made increases.

(I'm working with 32 MB of RAM with a good processor and graphics card). Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.