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

FlexBE app wont recognize second subclass from EventState class #71

Open
tremblay0934 opened this issue Feb 13, 2021 · 2 comments
Open
Labels

Comments

@tremblay0934
Copy link

tremblay0934 commented Feb 13, 2021

To clarify the problem, I designed a state called State1 which has EventState has a parent class, so

class State1(EventState):
    def __init__(self, dx_node_list, dx_topic_list, msg_type_list, max_time):
        super().__init__(outcomes=['completed', 'failed'])
...

And a made a second class like this:

class State2(State1):
    def __init__(self, max_time):
        super().__init__('/video_source', 'raw', Image, max_time)

State 2 is not recognized by FlexBE App.
I am using ROS melodic built with python3.

I would like to know if this behavior is intended

@pschillinger
Copy link
Member

This is the normal behavior of the default "Regex" parser. If you need support for such cases, there is an alternative parser that can be used. To change it, got to the "Configuration" panel of the FlexBE App and under "Workspace" change "State parser" tp "Python". Then, it uses python to determine whether a class is a state, fully supporting sub-classes.

@dcconner
Copy link
Member

@pschillinger is there a reason for using regex as default parser instead of Python? Should we consider changing default for ROS 2 ?

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

No branches or pull requests

3 participants