Home Community Blog Buy Now
Blog

Misty Community Forum

Misty ignores bit of code sometimes

Hi there,

I’ve been working with Misty for some time now and relatively recently I came across a weird bug. I can’t explain what happens very well as I’m not sure how it works myself. Basically what happens ist that Misty will randomly ignore bits of Code here and there. The problem can almost always be resolved by restarting her, but it is also not rare that the problem persists at another point in the codebase.

To visualize this better my Project is the following: Misty drives around in the office and when she comes across a closed door she waits in front of it and asks for help from a nearby human.
Now there have been many different versions of this same problem, but the ones that are by far most common are:

  • Misty will just not execute the .Speak() function
  • Misty ignores .Pause() functions

I don’t know if this could be a code problem. Reproducting this error on purpose has been unsuccessful so far, so I’m not sure where this even comes from. Is this Bug known? If so, what causes this behaviour and how do I avoid it?

Hi @tom.boehm . Thanks for reaching out.

Were you able to play other audio files after misty.Speak() failed? Are there any code snippets you might be able to share with us which illustrate the issue? Finally, would you mind pulling logs from your misty and sharing those? Feel free to email us the logs via support@mistyrobotics.com

Sorry for the delayed answer. Testing this was maddening, because it only happened again once since I posted. Today. I wrote a little skill to test Misty’s audio output aside from .Speak() like so:

misty.Speak("<speak><prosody pitch=\"high\" volume=\"x-low\">This is a test</prosody></speak>");
misty.PlayAudio("015-Meow.wav", 30, 3000);

And it turns out .Speak() is the only thing that doesn’t work. When it occurred in my actual work, I ran the above multiple times and the sound from .PlayAudio() was produced correctly after the 3 seconds while .Speak() seemed to be ignored. The test skill does nothing else so nothing could interfere.

Also as I described, the .Pause() function was ignored just a little later once. Within my Prototype Misty takes pictures and when she encounters a closed door, she waits in front of it. This is the code segment where it occurred:

misty.Stop();

// React to the situation
//misty.Debug("Closed fire door recognized. Standing by...");
misty.ChangeLED(255, 255, 0);
misty.Speak("<speak><prosody pitch=\"high\" volume=\"x-low\">This door is closed. Could you help me?</prosody></speak>");
doorSeenFlag = true;

// Unregister TimerEvent
misty.UnregisterEvent("GetPicture");

// Wait 8s and try again
misty.Pause(8000);
_GetPicture(null);

The 8 second pause was ignored completely, Misty instantly took another picture and continued on with the skill.

I will email you the logs from today to the adress. I looked through them myself, but sadly I didn’t note down the exact times when it happened to I can only estimate and within that timeframe. Both errors occurred seperately form one another between 16 and 17 o’clock UTC (I believe 9-10 o’clock in the log files). I didn’t stumble on anything that struck me as weird. The exception is that there was mentions of Misty’s camera being occupied and being unable to execute new commands. But as the error does not affect Misty’s ability to take pictures, I’m missing the knowledge whether or not this could be a cause. Also it works fine many other times so I am really at a loss here.

Hi Tom,

If you haven’t already would you mind installing our TTS patch?

Thanks for sending us the log from your robot. Unfortunately, they don’t give us a broad picture of what’s occurring here. Based on the logs, we would expect that the take picture command is coming after a pause from the speak command. In your logs, here’s where that occurs, followed by the gap (in seconds) between those events:

	Line 1197: 2021-05-11T08:36:50.2270178-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 1398: 2021-05-11T08:37:04.8898798-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
14 seconds	

	Line 1444: 2021-05-11T08:37:18.2178237-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 1449: 2021-05-11T08:37:26.2432646-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 1458: 2021-05-11T08:37:27.8794000-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 1464: 2021-05-11T08:37:30.9759582-07:00|INF|20194904009|19|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
3 seconds	

	Line 1742: 2021-05-11T08:38:14.4008798-07:00|INF|20194904009|19|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 2199: 2021-05-11T08:39:56.3512798-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
42 seconds	

	Line 2522: 2021-05-11T08:40:55.1898173-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 2841: 2021-05-11T08:42:06.3164045-07:00|INF|20194904009|15|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
1 minute 11 seconds	

	Line 3512: 2021-05-11T08:54:53.6915992-07:00|INF|20194904009|12|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 3521: 2021-05-11T08:55:01.6914902-07:00|INF|20194904009|12|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 3793: 2021-05-11T08:55:36.3877672-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 3933: 2021-05-11T08:56:00.0767400-07:00|INF|20194904009|12|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
24 seconds	

	Line 3984: 2021-05-11T08:56:15.0548978-07:00|INF|20194904009|12|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 4159: 2021-05-11T08:56:29.8263434-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
14 seconds	

	Line 5046: 2021-05-11T08:57:54.3363779-07:00|INF|20194904009|11|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 5229: 2021-05-11T08:58:08.4059463-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
14 seconds	

	Line 5554: 2021-05-11T08:59:12.5091072-07:00|INF|20194904009|11|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 5694: 2021-05-11T08:59:36.5968155-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
24 seconds	

	Line 5728: 2021-05-11T08:59:47.1196433-07:00|INF|20194904009|11|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 6309: 2021-05-11T09:18:25.0318895-07:00|INF|20194904009|14|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
18 minutes 38 seconds	

	Line 6360: 2021-05-11T09:18:38.3202386-07:00|INF|20194904009|14|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 6365: 2021-05-11T09:18:46.3393908-07:00|INF|20194904009|14|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 6375: 2021-05-11T09:18:47.9862217-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 6381: 2021-05-11T09:18:56.0021965-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 6390: 2021-05-11T09:18:57.5549735-07:00|INF|20194904009|14|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 6627: 2021-05-11T09:19:46.8087441-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
49 seconds	

	Line 6649: 2021-05-11T09:19:53.3066420-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 6654: 2021-05-11T09:20:01.3258479-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 6664: 2021-05-11T09:20:02.7041975-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 7112: 2021-05-11T09:21:22.9052944-07:00|INF|20194904009|8|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
1 minute 20 seconds	

	Line 7450: 2021-05-11T09:22:23.0265679-07:00|INF|20194904009|6|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 7456: 2021-05-11T09:22:26.0758841-07:00|INF|20194904009|17|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
3 seconds	

	Line 7814: 2021-05-11T09:23:50.4632544-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"4047b2ba-2208-4388-8e5b-9045dea26013"} 
	Line 7914: 2021-05-11T09:24:13.8849125-07:00|INF|20194904009|14|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
23 seconds	

	Line 8239: 2021-05-11T09:25:20.0976958-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 8244: 2021-05-11T09:25:28.1025444-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
8 seconds	

	Line 8253: 2021-05-11T09:25:29.4663685-07:00|INF|20194904009|9|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 8683: 2021-05-11T09:26:55.4262906-07:00|INF|20194904009|3|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
1 minute 26 seconds	

	Line 8934: 2021-05-11T09:27:21.6613787-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 8939: 2021-05-11T09:27:29.6682909-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
8 seconds	

	Line 8948: 2021-05-11T09:27:31.0107314-07:00|INF|20194904009|7|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 8954: 2021-05-11T09:27:34.0335605-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
3 seconds	

	Line 9012: 2021-05-11T09:27:52.9642101-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"Speak","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"} 
	Line 9017: 2021-05-11T09:28:00.9850577-07:00|INF|20194904009|4|SkillsIdego|{"api":"SKILLS","direction":"IN","command":"TakePicture","sourceId":"ded7b17f-9747-40e9-8328-5301bb8efcee"}
8 seconds

I know it’s difficult to predict, but next time if possible would you able to pull the logs instantly after this happens? That will aid in the troubleshooting process and will ensure we have the relevant info. Feel free to share that here next time it occurs and let me know if things work better after the patch.