Hi,

I get some problem with sweety's servos . They stopped to work ! I've tried the latest version of MRL with eclipse.

With an arduino duemilanove , all work as expected but with the arduino mega, i get the error "servo error servo's controller is not set" in eclipe log .

Arduino serial from mrl say :

publishMRLCommError/1
publishVersion/37
publishBoardInfo/1
publishMRLCommError/5/68/69/86/73/67/69/32/110/111/116/32/97/116/116/97/99/104/101/100
publishMessageAck/7

I saw that sweety's java file has been modified (arduino.servoAttach(rightForearm, 34); replace the old way , rightForearm.attach(arduino.getName(), 34);) . There is new change since that ?

 

Thank you for your help. This is a part of log that could help :D

 

09:12:32.209 [servo] ERROR c.myrobotlab.framework.Service - servo error servo's controller is not set
09:12:33.650 [servo] WARN  c.myrobotlab.framework.Service - no such method Servo.attach(String,Integer,Integer) :  - attempting upcasting
09:12:33.650 [servo] WARN  c.myrobotlab.framework.Service - ouch! need to search through 201 methods
09:12:33.651 [servo] ERROR c.myrobotlab.framework.Service - boom goes method attach
09:12:33.652 [servo] ERROR class org.myrobotlab.logging.Logging - ------
java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.myrobotlab.framework.Service.invokeOn(Service.java:1368)
    at org.myrobotlab.framework.Service.invoke(Service.java:1253)
    at org.myrobotlab.framework.Service.run(Service.java:1676)
    at java.lang.Thread.run(Thread.java:745)

kwatters

8 years 2 months ago

Beetle, try uploading the latest mrlcomm to your arduinos..  We've made a lot of changes to MRLComm, but we haven't incremented the version number, sorry about the confusion.. try out the latest with a fresh upload and see if the issue still exists.

Thx for your help. All is up to date, but i've still this problem. After several tests, i think the problem is in the function "attach()" of Sweety.java . If i run Sweety's service, i get an error from "attach()" but if i set the controller ,pin and attach a servo from the webgui, that work .

I see that in eclipse log :

06:50:54.286 [python.interpreter.3] ERROR class org.myrobotlab.service.Arduino - getDeviceId could not find device sweety.rightForearm
06:50:54.290 [python.interpreter.3] ERROR c.myrobotlab.framework.Service - python error PyException - null Traceback (most recent call last):

 

And , here is the error returned in the webgui when i try to use Sweety.attach() :

python : Traceback (most recent call last): File "<string>", line 29, in <module> at org.myrobotlab.service.Arduino.servoAttach(Arduino.java:2300) at org.myrobotlab.service.Sweety.attach(Sweety.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) java.lang.NullPointerException: java.lang.NullPointerException at org.python.core.Py.JavaError(Py.java:546) at org.python.core.Py.JavaError(Py.java:537) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204) at org.python.core.PyObject.__call__(PyObject.java:461) at org.python.core.PyObject.__call__(PyObject.java:465) at org.python.core.PyMethod.__call__(PyMethod.java:126) at org.python.pycode._pyx3.f$0(<string>:104) at org.python.pycode._pyx3.call_function(<string>) at org.python.core.PyTableCode.call(PyTableCode.java:167) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1386) at org.python.core.Py.exec(Py.java:1430) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:267) at org.myrobotlab.service.Python$PIThread.run(Python.java:161) Caused by: java.lang.NullPointerException at org.myrobotlab.service.Arduino.servoAttach(Arduino.java:2300) at org.myrobotlab.service.Sweety.attach(Sweety.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186) ... 12 more