Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 15:16
    Xenoamor opened #6
  • Aug 16 21:39

    andrew-gresyk on master

    + added TContext argument to al… (compare)

  • Aug 16 08:05
    andrew-gresyk commented #5
  • Aug 15 21:36
    DonMathi commented #5
  • Aug 15 15:44
    andrew-gresyk commented #5
  • Aug 15 15:26
    andrew-gresyk commented #5
  • Aug 15 14:59
    DonMathi commented #5
  • Aug 15 11:51
    andrew-gresyk commented #5
  • Aug 15 11:16

    andrew-gresyk on master

    Added calculator example. In li… + fixed minor clang issues in t… (compare)

  • Aug 15 07:50
    DonMathi commented #5
  • Aug 15 07:23
    andrew-gresyk commented #5
  • Aug 15 06:47
    DonMathi commented #5
  • Aug 15 06:26
    DonMathi commented #5
  • Aug 15 06:22
    DonMathi commented #5
  • Aug 14 14:34
    andrew-gresyk commented #5
  • Aug 14 14:24
    DonMathi commented #5
  • Aug 14 14:24
    DonMathi commented #5
  • Aug 14 14:23
    DonMathi commented #5
  • Aug 14 14:23
    DonMathi commented #5
  • Aug 14 14:22
    DonMathi commented #5
Andrew Gresyk
@andrew-gresyk
Welcome!
Feel free to ask questions, voice concerns, suggest features, or destroy :)
Valentin Galea
@valentingalea
Hi!
DJuego
@DJuego
Yes, hi! And thank you for your efforts with HFSM2, @andrew-gresyk
Andrew Gresyk
@andrew-gresyk
Hi there!
You're welcome!
Would you mind sharing what you're using hfsm2 for?
Alexander Baird
@Alexeut_twitter
Good stuff great project. Question: if I wanted synchronise state changes in two different clients using this (over a network) - am I free to approach that however I want, or are there any factors I should keep in mind?
Andrew Gresyk
@andrew-gresyk
Thanks!
for multiplayer your best bet is to record the transitions on one client and replay them on the other
Andrew Gresyk
@andrew-gresyk
Transitions can be initiated either by type (fsm.changeTo<TState>()) or by numerical ID (fsm.changeTo(StateID))
StateID can be obtained using fsm.stateId<TState>()
more info here: https://github.com/andrew-gresyk/HFSM2/wiki#root-aka-public-fsm-api
to record and replay a transition you'd need to send over
  • StateID
  • transition type (if non-default changeTo() is used
  • payload (again, optional)
    .. per transition
DJuego
@DJuego
Wow! "Dynamic" planning support.
That sounds like a powerful concept. :-)
Andrew Gresyk
@andrew-gresyk
Well, as opposed to BTs' sequence nodes which can be seen as static plans :)
DJuego
@DJuego
Hi again!
Could you suggest some tool to represent HFSM graphically? (Specifically to use with your library)
I would like to plan my HFSMs in a visual (but digital) way ...
Andrew Gresyk
@andrew-gresyk
heya!
there's not a tool designed for hfsm2 to design fsms graphically
the reverse is possible with debug visualization: https://gresyk.dev/features/2018/01/15/hfsm-magic.html
would you like to create such tool?
DJuego
@DJuego
Well, it's a tempting proposal, but I do not feel qualified. :-D Thank you for reply. ;-)
Meanwhile, I'm considering using your proposal in the field of mobile robotics.
DJuego
@DJuego
Perhaps a graph editor could be useful... For instance; https://github.com/ArsMasiuk/qvge
DJuego
@DJuego
I suppose that the problem is to develop a graphical grammar for a powerful representation of hierarchical state machines with graphs.
Andrew Gresyk
@andrew-gresyk
Interesting
Since the structure of HFSM2 is defined at compile time, the output of such editor would be C++ code.
I like the idea, I'm happy to support anyone willing to take on developing a tool like that.
DJuego
@DJuego
Well. Qt Visual Graph Editor export to several types of files such as Grapviz DOT Language (https://www.graphviz.org/doc/info/lang.html). Perhaps a plugin for Qt Visual Graph Editor or a tool for Grapviz DOT Language ?? ---> HFSM2 structure conversion.
I still must become very familiar with hierarchical state machines and HSM2. :-}
Andrew Gresyk
@andrew-gresyk

well, a HFSM2 structure is basically a c++ header with something like this:

using FSM = M::PeerRoot<
                struct State1,
                M::Composite<struct Region,
                    struct SubState1,
                    struct SubState2
                >
            >;

the full list of all regions/roots is here: https://github.com/andrew-gresyk/HFSM2/wiki#regions

DJuego
@DJuego
Yes Yes. I have already read it. :-)
But the transition "rules" are not represented there.
Andrew Gresyk
@andrew-gresyk
So you
you'd also like to edit transitions?
DJuego
@DJuego
Well. And why not? Transitions can be represented in a graph... at least up to a minimal level. "I can go from A to C through B, but never directly" and so. In your opinion, can your Hierarchical state machines be represented with graphs effectively?
Andrew Gresyk
@andrew-gresyk
Absolutely, having transitions would be great
Andrew Gresyk
@andrew-gresyk
In that case, the tool would need to generate state code as well, possibly with some comment marks to maintain generated code
DJuego
@DJuego
Right.
DJuego
@DJuego
In the wiki i miss orthogonal region explanation...
Andrew Gresyk
@andrew-gresyk
it still needs the page on all regions
meanwhile - when orthogonal region activates - all of its sub-states also activate
it's a 'fork' in a sense
DJuego
@DJuego
Thanks @andrew-gresyk .
DJuego
@DJuego
Thank you for the update. @andrew-gresyk . I have planned to use HFSM2 very, very soon. Wait for my feedback. :-))
Andrew Gresyk
@andrew-gresyk
I see what you did there @DJuego :)
Let me know how it goes!