Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 09:26
    andrew-gresyk commented #9
  • Nov 25 09:24

    andrew-gresyk on Beta71

    (compare)

  • Nov 25 08:35

    andrew-gresyk on master

    ^ uglified template arguments (compare)

  • Nov 22 13:34
    DonMathi commented #9
  • Nov 22 13:34
    DonMathi commented #9
  • Nov 22 13:33
    DonMathi commented #9
  • Nov 22 10:03
    DonMathi edited #9
  • Nov 22 10:02
    DonMathi commented #9
  • Nov 22 10:02
    DonMathi commented #9
  • Nov 22 10:00
    DonMathi opened #9
  • Oct 21 22:06
    andrew-gresyk closed #5
  • Oct 21 22:06
    andrew-gresyk closed #7
  • Oct 15 10:43
    andrew-gresyk commented #8
  • Oct 11 12:17
    DonMathi edited #8
  • Oct 11 12:14
    DonMathi opened #8
  • Oct 08 06:27
    DonMathi commented #7
  • Oct 08 06:27
    DonMathi commented #7
  • Oct 08 06:26
    DonMathi commented #7
  • Oct 07 05:46
    andrew-gresyk commented #7
  • Oct 04 06:58
    DonMathi commented #7
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!
miheerkowshik
@miheerkowshik
I am looking to use HFSM2 ; transitioning from boost msm ; Wondering if you did any bench marking on build times ? I have huge state machines and I want to understand what I am getting into :)
Andrew Gresyk
@andrew-gresyk
This has been in my todo list for some time now.
How huge are your machines @miheerkowshik ?
miheerkowshik
@miheerkowshik
I have around 15 sub-state machines and top level SM has about 90 transitions ; Each of the sub-state machines have around 15-50 transitions ;
Andrew Gresyk
@andrew-gresyk
Ok, what's the total number of states?
miheerkowshik
@miheerkowshik
Around 80 states all together ;
Andrew Gresyk
@andrew-gresyk
80 states doesn't sound like too much.
I used ~50 state FSM and the build times were acceptable in a small project.
Let me know how it goes, keeping the build times down is an on-going effort for me.