Robot Not a Dev? Pre-order Now
Not a Dev?

Misty Community Forum

Returning Misty to default state at skill exit

So one thing that has always bugged me with these skills is how to return Misty to a default state when the the skill completes and what does this state look like. I have played around with a little function I just paste into my skill code but I was wondering if anyone else had something similar. Mine is just a basic purple LED, head centered and slightly up, normal eyes and arms down at sides. I was just wondering if there was already some uniform way going around. This most is important when running skills in serial of course. Concurrent execution would change this to some degree but would still need some sort of normal. Any existing work or thoughts?

1 Like

I am not aware of any consensus on this.

for https://rerobots.net/ to prepare for each instance, the Misty robot is returned to an initial pose as you describe (head centered, “normal eyes”, purple LED, etc.) as well as

  1. POST /api/halt
  2. clearing of other persistent, user-modifiable values, e.g., eye-blinking behavior.

in practice, for serial execution any skill can enforce its own initial state assumption by sending appropriate commands. I do not think we can hope for more when skills are entirely independent.

the question becomes interesting if we think about composing skills. instead of a default state to which every skill must return, we can reason in terms of Hoare triples:

{P}C{Q}

in this notation, a Misty skill assumes some prerequisite P. When the skill completes, it guarantees Q is satisfied. for example, there can be skills that find dogs and guarantee that when they return, Misty is facing a dog. then, other skills can be developed that assume a dog is near when they start running. symbolically, this has the form {P1}C1{Q1}, {Q1}C2{Q2}, where P1 might be “dog is in the same room as Misty” and Q1 might be “dog is right in front of Misty”.

1 Like

Very interesting and definitely this fits into what I was thinking. I admit though that I was going more to the presentation of the robot than logical state and prerequisite for the next skill but it definitely fits there as well. Definitely see how skills would have those preconditions such as “dog in room” or “new person identified” or whatever. Not sure how that will be dealt with in the future. At the moment there is no skill to skill triggering but that would be interesting.

1 Like

@seymour At this time, we don’t have any events that trigger when a skill ends that allows you to set default values. This functionality does exist in our .NET SDK, but one thing you could try is use the Misty.Get() and the Misty.Set() to save the desired default values between skills.

We are considering how we introduce the behavior you and @slivingston are talking about :slight_smile:

1 Like

Thanks Chris. Looking forward to see what you guys have coming. I have workarounds I was just wondering how others were handling it. I hadn’t thought of the .Get() and .Set() to store those items. I was mostly just cutting and pasting. When is the .NET SDK coming out any timing? :slight_smile: