myrobotlab icon indicating copy to clipboard operation
myrobotlab copied to clipboard

Gestures lifecycle

Open hairygael opened this issue 7 years ago • 5 comments

Describe the bug Seems when there is crash with python, it removes the autodisable function for further gestures on servo.

To Reproduce Steps to reproduce the behavior:

  1. Start INMOOV_START
  2. Run the gesture "Giving", which will throw an error related to a python piece being not defined.
  3. Run "Rest" gesture
  4. See the servos being not disabled after the proper timing.

Expected behavior Even with python error, if you execute another gesture which doesn't throw an error, the servo should then be disabled.

Desktop (please complete the following information):

  • OS: windows 10 pro
  • Browser:chrome, safari
  • Version 1.1.56

hairygael avatar Dec 12 '18 21:12 hairygael

Oh yes. When a gesture start, startedGesture() is called. At the end finishedGesture() , only if there is no crash between... Welcome ( soon ) to i01.execGesture() that will take care off crash and report it without break things.

moz4r avatar Dec 13 '18 15:12 moz4r

Thanks for responding!

Gael Langevin Creator of InMoov InMoov Robot http://www.inmoov.fr @inmoov http://twitter.com/inmoov

Le jeu. 13 déc. 2018 à 16:38, Anthony [email protected] a écrit :

Oh yes. When a gesture start, startedGesture() is called. At the end finishedGesture() , only if there is no crash between... Welcome ( soon ) to i01.execGesture() that will take care off crash and report it without break things.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MyRobotLab/myrobotlab/issues/395#issuecomment-447013009, or mute the thread https://github.com/notifications/unsubscribe-auth/AIF2xwn1heaStIL6vo_Pd1nJV-g9rP-kks5u4nSKgaJpZM4ZQfN_ .

hairygael avatar Dec 14 '18 12:12 hairygael

That is a sample to change a little how we can launch gestures, to talk about :

https://github.com/MyRobotLab/inmoov/commit/33ff862acbf50d97f2bc20d0c3b50c751ec18345

You will see giving will not contain anymore started/stopped gesture, 2 advantages less code lines, and gestures chain without warning ( giving can call fullspeed by exemple ) The whole chain will be considered as 1 gesture.

execGesture will call for startedGesture() at the begining ( today is hardcoded and disable "autoDisable", we can enhance this ) and stopedGesture() at the end that end stuffs. If there is an error in the py code, you will be vocally warned about, and also logged for more details. But the gesture will "finish" now.

We can call i01.execGesture("giving()") from script or, <oob><mrl><service>i01</service><method>execGesture</method><param>giving()</param></mrl></oob>

moz4r avatar Dec 18 '18 23:12 moz4r

Hello Anthony, That seems fine to me. Lots of AIML to check and to adapt. :) Maybe the warning for the python error could be an option? When working on coding, we maybe don't want to get recalled about the warning every now and then. As a side note: Just tested version 1.1.66 and got a python error which froze the cmd.exe, but MRL was still responding.

Gael Langevin Creator of InMoov InMoov Robot http://www.inmoov.fr @inmoov http://twitter.com/inmoov

Le mer. 19 déc. 2018 à 00:34, Anthony [email protected] a écrit :

That is a sample to change a little how we can launch gestures, to talk about :

MyRobotLab/inmoov@33ff862 https://github.com/MyRobotLab/inmoov/commit/33ff862acbf50d97f2bc20d0c3b50c751ec18345

You will see giving will not contain anymore started/stopped gesture, 2 advantages less code lines, and gestures chain without warning ( giving can call fullspeed by exemple ) The whole chain will be considered as 1 gesture.

execGesture will call for startedGesture() at the begining ( today is hardcoded and disable "autoDisable", we can enhance this ) and stopedGesture() at the end that end stuffs. If there is an error in the py code, you will be vocally warned about, and also logged for more details. But the gesture will "finish" now.

We can call i01.execGesture("giving()") from script or, i01execGesturegiving()

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MyRobotLab/myrobotlab/issues/395#issuecomment-448412427, or mute the thread https://github.com/notifications/unsubscribe-auth/AIF2x0RDBj-VUNWZIMKDt-Zy8czrzzAgks5u6XuZgaJpZM4ZQfN_ .

hairygael avatar Dec 19 '18 00:12 hairygael

You right ! vocal warning replaced by a "classical" one.

moz4r avatar Dec 20 '18 17:12 moz4r