Headless head....

Today I tested using the RemoteAdapter service for the first time. I have a Raspberry PI mounted in the InMoov robot head and an Arduino UNO connected to it. It also has a USB WiFi dongle so that I can communicate with it.

 

I installed MRL in the Raspberry and created a python script.

The script first starts all services that I want to use, like the Arduino and several servos. Then as the last lines I added:

HeadRPI = runtime.createAndStart("HeadRPI","RemoteAdapter")

HeadRPI.startListening()

And in My PC I use this very small script.

HeadRaspi = runtime.createAndStart("RemoteAdapter","RemoteAdapter")
HeadRaspi.setDefaultPrefix("HeadRaspi")
HeadRaspi.connect("tcp://192.168.1.91:6767")

And it just works.  I can control the servos from the PC. Not thru remote desktop as I have done before, but thru the MRL instance on the PC. 

The light blue services run on the PC and the dark blue in the Raspberry.

After that I created a startscript like this:

java -jar myrobotlab.jar -service python Python -invoke python execFile /home/pi/Head2.py

So now my head is running headless

 

 

 

 

 

 

 


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

Thats Great ! Soon, we should


Thats Great !

Soon, we should be able to join multiple instances and access them all from a swingless remote gui too !

Are you going to use the Raspi just for control and non-video sensors ?  What are you future plans, now that you have done Distributed MRL ?!? :D

Mats's picture

Plans for the head and InMoov robot

I'm planning to use the Raspberry PI camera and the soundcard connected to the Rpi in the head. I just started with the services that are working. I have tested OpenCV but some more work is necessary. I downloaded and installed OpenCV 3.0 using this instruction: 

http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspb...

So now I can use OpenCV 3.0 from Python, However that's not the same thing as using it from MRL, since it uses jython. I think it should work something like in this post. 

http://salaboy.com/2013/06/14/using-javacv-in-the-raspberry-pi-linux-arm/ 

But I haven't tried that part yet. I haven't spent much time in this area, since I think both Kwatters and Alessandrino has been successful in using OpenCV with the RPI camera. So I hope that their work will go into MRL soon. 

I also have some problems with the USB soundcard in the Rpi. I can set it up to work with both the microphone and the speaker. But as soon as I startx, the settings are overwritten. So at this stage I will try to redo the soundcard settings and avoid using startx. In headless mode I hope that it will work. I will just have to use the prompt or the webgui. 

I will also put a Raspberry and an Adruino in the body of InMoov. The two Rpi's will communicate using WiFi. The Raspberry in the body will send commands to the body Arduino to control the arms / hands and other bodyparts. I think it will also be the Master brain, since the Rpi in the head will have to do a lot of other work. This is still only plans, since I have more printing and building to do.

I will try different services (OpenCV, FaceTracking, Speech and so on ) in my PC and when they work I will move them to the RPi and test using them remote.

 

 

 

 

 

 

 

kwatters's picture

raspi2 was worky on with javacv 0.10

Remote operation and presence!  I love it.  We did get OpenCV (based on javacv 0.10) working on the ras-pi2 .. I have yet to get it working for the latest javacv ( version 1.1 )

I ended up manually downloading the binary distribution of javacv 1.1 and unzipping it to put the jar files into  MRL/libraries/jar  directory.  This way I knew the dependencies would be found,...   I didn't see a "linux-arm" varient of the build, only and "android-arm" jar.  Not sure if we're going to have to build it on the ras pi to create the proper jars with the open cv deps.