These days I am struggling with the application which I generated with the help of Github project: Pepper Project robot-jumpstarter
It did work very well at the beginning, but after I added some module in the folder called “scripts” (like in picture1) not any more. My basic idea is to import class from the “IntersectionPointOfTwoCircles.py” to “main_localization.py” to make the main work fine.
And because the packages “sympy” and “numpy” are needed in “IntersectionPointOfTwoCircles.py”, firstly I tried to put these two packages in the folder “scripts” but it led to the situation where the Choregraphe very often only reacted after like about 5 to10 minutes or sometimes didn’t react. This is how the path of the Choregraphe pml-file “localization“ looks:
Then I let the packages be outside the app folder now.
The code for “Main_localization” is:
class MyClass(GeneratedClass):
executable_id = "localization"
def onLoad(self):
self.listener_id = None
self.executable_manager = self.session().service("ALServiceManager")
executable_name = self.getParameter("Executable Name")
if ALProxy("ALSystem").systemVersion() < "2.3":
self.executable_id = executable_name
if "." not in executable_name:
self.logger.info("Warning: You will have conflicts if several packages have executables called '%s'" % executable_name)
self.logger.info("Use a newer version of NAOqi to have executables prefixed with the package ID, or prefix it yourself, in the form with <package>.<executable ID>")
else:
self.executable_id = self.packageUid() + "." + executable_name
def disconnect(self):
try:
self.executable_manager.serviceStopped.disconnect(self.listener_id)
except Exception as e:
pass
def onUnload(self):
self.executable_manager.stopService(self.executable_id)
self.disconnect()
def onInput_onStart(self):
self.listener_id = self.executable_manager.serviceStopped.connect(self.onExecutableStopped)
if not self.executable_manager.startService(self.executable_id):
self.logger.info("Failed to start App Executable '%s', stopping." % repr(self.executable_id))
self.onStopped()
self.disconnect()
def onExecutableStopped(self, stopped_executable, reason):
if stopped_executable == self.executable_id:
self.logger.info("App Executable Stopped: " + self.executable_id)
self.onStopped()
self.disconnect()
def onInput_onStop(self):
self.onUnload()
self.onStopped()
And the error message:
[INFO ] .box :onInput_onStart:29 _Behavior__lastUploadedChoregrapheBehavior1081224720:/Localization_19: Failed to start App Executable ''.lastUploadedChoregrapheBehavior.output.localization'', stopping.
[INFO ] behavior.box :onInput_onStart:29 _Behavior__lastUploadedChoregrapheBehavior1069884112:/Localization_19: Failed to start App Executable ''.lastUploadedChoregrapheBehavior.output.localization'', stopping.
[INFO ] behavior.box :onInput_onStart:29 _Behavior__lastUploadedChoregrapheBehavior1149770056:/Localization_19: Failed to start App Executable ''.lastUploadedChoregrapheBehavior.output.localization'', stopping.
Has anyone idea what I can do now?