I cannot get anything to talk to my UNO arduino bd in myrobotlab for a couple of days.
Trying the servo and Inmoov files. Tthe inmoov files listen and talk but no servos move. 
Running windows 7 and have java version 1.8.0_20-b26 runtime environment and have tried several computers.
Downloaded the latest version of myrobotlab 1.0.53
looking at the myrobotlab.log I see it cannot find a hex file.
173746 [Thread-14] INFO  class org.myrobotlab.service.Arduino  - avrdude: can't open input file obj\MRLComm.20140829155318081\MRLComm.hex: No such file or directory
It looks like the file is be written to C:\Users\jhs42\AppData\Local\Temp\build2977277257579611086.tmp with some other files.
I have no problems loading myrobotlab.ino using arduino.exe and can move the servos with my own ino file.

GroG

10 years 1 month ago

Hello Harland and Welcome...

I believe the problem might be an Arduino.zip file not being downloaded and uncompressed.

Here are some possible instructions to fix:

Definition of mrl directory = directory you are running mrl from: In this example we are going to call it c:\mrl

Check to see if the zip was downloaded .. if it was .. it should be

c:\mrl\libraries\zip\arduino.x86.32.windows.zip

within it is a "arduino" directory ... drag & drop / unzip the directory such that it will be in the mrl root

c:\mrl\arduino

restart - and try again ..

if it doesn't work - send a noWorky & put a comment as a description.

Good Luck !

harland

10 years 1 month ago

I did as suggested arduino was all ready there but unzipped and did pasted it again.
still no servo motion and still error on arduino hex file
sent 2nd noworky

GroG

10 years 1 month ago

Ok, I really need to take this part out of MRL..

MRL no longer supports compiling & uploading of MRLComm.ino.. you'll need to copy paste MRLComm.ino out of MRL and into the standard Arduino IDE.

Your getting a compiler error in the MRL/Arduinio compile/upload.

You should be able to copy paste compile & upload in a regular Arduino IDE.

You only need to upload once per MRL version - MRL & the Arduino's MRLComm.ino should match -

After uploading with the Arduino IDE - you should be able to start an Arduino service in MRL and just "connect" .. there will be a few rx/tx error warning on the initial connection - but that is just garbage from the Arduino - after that you should be able to drive servos, use the oscope, etc..

used arduino 1.0.5-r2 ide to load MRLComm.ino which was in folder 
  C:\mrl\arduino\libraries\MyRobotLab\examples\MRLComm
loaded with no errors   sketch size 5734 bytes
started myrobotlab - ui 1.0.53
opened arduino
picked serial port and connected
good so far
started inmoov service from runtime screen
picked start right hand asked com port put in 3
could not attach
get error "could not attach to pin 3 serial port is null - not initialized?"
back to runtime
started servo service
was able to attach to arduino pin2
got error servo's controller is not set
sent 3rd noworky
REALLY APPRECIATE YOUR HELP. I have quite a bit on Inmoov built and would like to see it move.
 
 

Something is goofy .. I see

24088 [arduino] ERROR class org.myrobotlab.framework.Service  - did not get response from arduino....

in the log - which should not happen if the sketch was successfully uploaded in the Arduino IDE ...
It will say - found version yatta yattah

...

start at step 0 ... when you load blinky sketch in the Arduino does it run  & blink?

I have used several UNO boards for projects, been doing elec design for more than 30years. I can run this:

#include <Servo.h>
 
Servo servothumb;          // Define thumb servo
Servo servoindex;          // Define index servo
Servo servomajeure;
Servo servoringfinger;
Servo servopinky;
Servo servowrist;
Servo servobiceps;
Servo servorotate;
Servo servoshoulder;
Servo servoomoplat;
// Servo servoneck;
// Servo servorothead;
 
int rotangle = 0;
int sensorValue = 0;
int sensorPin0 = A0;
int sensorPin1 = A1;
int sensorPin2 = A2;
int sensorPin3 = A3;
int sensorPin4 = A4;
int sensorPin5 = A5;
float volts = 0;
// const int buttonPin = 10;     // the number of the pushbutton pin
// const int ledPin =  12;      // the number of the LED pin
int buttonState;         // variable for reading the pushbutton 
 
void setup() { 
  Serial.begin(9600);    
//  pinMode(ledPin, OUTPUT); 
//  pinMode(buttonPin, INPUT);     
  servothumb.attach(2);  // Set thumb servo to digital pin 2
  servoindex.attach(3);  // Set index servo to digital pin 3
  servomajeure.attach(4);
  servoringfinger.attach(5);
  servopinky.attach(6);
  servowrist.attach(7);
  servobiceps.attach(8);
  servorotate.attach(9);
  servoshoulder.attach(10);
  servoomoplat.attach(11);
//  servoneck.attach(12);
//  servorothead.attach(13);
  alltorest();
  Serial.println();              // print opening message        
  Serial.println("finger testing 08/18/2014");              // print opening message      
 
void loop() {            // Loop through motion tests
//  buttonState = digitalRead(buttonPin);
//  if (buttonState == LOW) {     
//    vresistor();  
//  } 
  if (Serial.available() == 0)
    return;
  int bRead = Serial.read();
  if (bRead == -1)
    return;
  char cmdBuffer = bRead;
  switch (cmdBuffer)
  {
  case 'z':       // Reset all to 0
    Serial.println("0 all");              // print opening message    
    alltorest();           // Uncomment to use this
    rotangle = 0;
    break;
  case 'p':      //
    Serial.println("pinky");              // print opening message    
    servopinky.write(rotangle);
    break;
  case 'r':      //
    Serial.println("ring");              // print opening message    
    servoringfinger.write(rotangle);
    break;
   case 'm':  
    Serial.println("majeure");              // print opening message    
    servomajeure.write(rotangle);
    break;
  case 'i':      //
    Serial.println("index");              // print opening message    
    servoindex.write(rotangle);
    break; 
  case 't':      //
    Serial.println("thumb");              // print opening message    
    servothumb.write(rotangle);
    break;
  case 'w':      //
    Serial.println("wrist");              // print opening message    
    servowrist.write(rotangle);
    break;
  case 'b':      //
    Serial.println("bicep");              // print opening message    
    servobiceps.write(rotangle);
    break;
  case 'a':      //
    Serial.println("rotate arm");              // print opening message    
    servorotate.write(rotangle);
    break;
  case 's':      //
    Serial.println("shoulder");              // print opening message    
    servoshoulder.write(rotangle);
    break;
  case 'o':      //
    Serial.println("omoplate");              // print opening message    
    servoomoplat.write(rotangle);
    break;
  case 'h':      //
    Serial.println("close hand");              // print opening message    
    closehand();
    break;
  case '+':  
    rotangle = rotangle + 5;
    break;
  case '-':  
    rotangle = rotangle - 5;
    break;
  case '?':
    Serial.println("p=pinky, r=ring, m=ajeure, i=index, h=close hand, 1=read pots");     
    Serial.println("t=thumb, z=zero all, w=wrist, +=angle, -=angle");   
    Serial.println("b=bicep, a=rotate arm, s=shoulder, o=omoplate");   
    break;  
  case '1':
    vresistor();  
    break;
  }
    Serial.print(" angle=");       // always let operator no angle
    Serial.print(rotangle);     
    Serial.println();
}
 
void vresistor() {  
start:  
//    digitalWrite(ledPin, LOW);  
    sensorValue = analogRead( sensorPin0 );
    Serial.print("pinky ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    if (rotangle > 110){
      rotangle = 110;
    }
    servopinky.write(rotangle);
    Serial.print(rotangle);     
    delay( 300);
 
    sensorValue = analogRead( sensorPin1 );
    Serial.print(" ring ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    if (rotangle > 110){
      rotangle = 110;
    }
    
    servoringfinger.write(rotangle);
    Serial.print(rotangle);     
    delay( 300);
 
    sensorValue = analogRead( sensorPin2 );
    Serial.print(" majeure ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    if (rotangle > 110){
      rotangle = 110;
    }
    servomajeure.write(rotangle);
    Serial.print(rotangle);     
    delay( 300);
    
//    digitalWrite(ledPin, HIGH);  
    sensorValue = analogRead( sensorPin3 );
    Serial.print(" index ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    if (rotangle > 100){
      rotangle = 100;
    }
    servoindex.write(rotangle);
    Serial.print(rotangle);     
    delay( 300);
 
    sensorValue = analogRead( sensorPin4 );
    Serial.print(" thumb ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    if (rotangle > 110){
      rotangle = 110;
    }
    if (rotangle < 20){
      rotangle = 20;
    }
    servothumb.write(rotangle);
    Serial.print(rotangle);     
     delay( 300);
 
    sensorValue = analogRead( sensorPin5 );
    Serial.print(" wrist ");     
    Serial.print( sensorValue);
    Serial.print( " a=");
    rotangle = (((5.0 * (float)sensorValue) / 1024.0)*30);
    servowrist.write(rotangle);
    Serial.print(rotangle);     
    Serial.println();
    delay( 300); 
    goto start;
    }
   
// Motion to set the servo into "rest" position: alltorest
void alltorest() {         
  servowrist.write(0);
  delay(500);
  servoindex.write(0);
  delay(300);
  servothumb.write(20);
  delay(300);
  servomajeure.write(0);
  delay(300);
  servoringfinger.write(0);
  delay(300);
  servopinky.write(0);
  delay(300);
  servobiceps.write(0);     
  servorotate.write(30);    //Never less then (20 degree)
  servoshoulder.write(30);  //Never less then (30 degree)
  servoomoplat.write(10);   //Never less then (10 degree)
//  servoneck.write(90);
//  servorothead.write(90);
}
 
// Motion to close all fingers one at a time and rotate wrist
void closehand() {         
  Serial.println("index");              // print opening message    
  servoindex.write(100);
  delay(2000);
  Serial.println("majeure");              // print opening message    
  servomajeure.write(100);
  delay(2000);
  Serial.println("ring");              // print opening message    
  servoringfinger.write(100);
  delay(2000);
  Serial.println("pinky");              // print opening message    
  servopinky.write(100);
  delay(2000);
  Serial.println("thumb");              // print opening message    
  servothumb.write(100);
  delay(1000);
  Serial.println("wrist");              // print opening message    
  servowrist.write(40);
  delay(1000);
  servowrist.write(80);
  delay(1000);
  servowrist.write(100);
  delay(2000);
  Serial.println("rotate arm");              // print opening message    
  servorotate.write(45);
  delay(1000);
  Serial.println("bicep");              // print opening message    
  servobiceps.write(45);
  delay(1000);
  Serial.println("rotate arm");              // print opening message    
  servorotate.write(90);
  delay(1000);
  Serial.println("shoulder");              // print opening message    
  servoshoulder.write(45);
  delay(1000);
  Serial.println("omoplate");              // print opening message    
  servoomoplat.write(45);
  delay(4000);
  alltorest();
}
 
Motors work, no errors. Just cannot get myrobotlab to run. Like I said sound works and it "hears" commands. just no servos
 

wvantoorn

10 years 1 month ago

I had the same error when i loaded the mrlcomm.ino file from the examples. When i went into the arduino service and copy paste the file from inside the service to the arduino ide, it did work fine for me. That was with windows 7, myrobotlab 1.0.53 and arduino 1.05r2 and no errors. With the example file i got the same error. Maybe that will help!

 

but did you connect to the arduino service, before starting inmoov service? That could give problems.

what i do is start python service, beware that when you right click on python to start service you name it python and not Python.

then load your script you want and make sure the com ports are selected the right ones.

press run script and now you see all kind of tabs beeing started, including io1.left or io1.right depending on script. That is the arduino service for the inmoov. When you already started an arduino service and connected to that one you get serial null errors.

 

So in short:

open mrl

start python service

load your script you want to use

make sure com ports are right

start script and it should work

Hope it helpes!

gr. Wilco

 

harland

10 years 1 month ago

I tried several things:
new arduino uno board (maybe mine was bad)
latest arduino.exe and new usb driver (have been using old version)
added 10uf caps to I/O board and some .01uf caps (thinking maybe noise was causing my communication issues, since the code I wrote was working, but only running one servo at a time)
upped the power supply to 6v from 5v and ran heavier wire to power inmoov (18AWG was 24AWG)
in the end I was rewarded with "version 17....goodtimes" when starting python inmoov code
the uno board is working with the right hand and arm
thanks for the help!

GroG

10 years 1 month ago

That's very great news harland !
It's been gnawing on the back of my head for a while..
I'm really glad you figured it out and told us :D