Hi just few days ago I really got to know about robotlab and so i have downloaded to actually implement it on my personal robot.

I would like to do obstacle avoidance using myrobotlab software. Since i am new to this platform so need some guidance. I would like my robot to navigate in a home environment and at the same time avoid and do not collide with any obstacle ahead. Could anyone please help me with this as how to start and etc. I am using arduino mega as the main controller, Logitech HDC270 webcam, robot power motor controllers and DC motors for driving the wheels.

Your guidance and assitance will be highly appreciated.

Any form of tutorial will also be great and how can i communicate with arduino mega.

 

Thanks

Rajeev

admin

12 years 4 months ago

MyRobotLab is designed to run on anything which can run Java.  It can communicate to micro-controllers, although most micro-controller can not run Java (yet).  With that said, I did not see a computer mentioned in your hardware list.

My first question for you is what is the Logitech HDC270 webcam plugged into ?  Because you can not plug it into the arduino mega, as far as I know.

I currently am working on a Roomba + Computer + Kinect system - http://myrobotlab.org/node/119 .
This will be an "all on board" system, however, there are different configurations which are more distributed - like this http://myrobotlab.org/communication  or even like this, where the camera is not mounted on the robot, but still position information is communicated wirelessly.

To assist you better I would need more details on your setup or what you intend to do.

GroG

rajeev

12 years 3 months ago

Sorry to mention but I am using Acer Aspire One laptop to which the webcam and the Arduino microcontroller  will be connected. The mobile platform is a differential drive system and the wheels are controlled by DC motors. Microcontroller will be communicating with the robotpower Simple H to control the respective motors. Also the laptop will be placed on top of the platform to make it totally autonomous. The main objective will be that the mobile robot should be able to navigate any environment avoiding obstacles. For test purposes it will be an indoor environment.

I would suggest to begin with using some control services of MRL (MyRobotLab).  To better assist you I would like to know the following :

1. Will there be any other sensors besides the webcam?  IR or Ping?  MRL can potentially support all of these, and typically augmenting sensor information makes for a more robust system.

2. What OS will be running on the laptop?  MRL supports Windows, Linux & Mac OSX, however there are details regarding OpenCV which would need to be addressed.  One of the largest is the correct native libraries - is it 32 or 64 bit operating system?

3. How comfortable are you in software development?  MRL can be programmed in a rudementary way graphically.  It has an embedded Python IDE with complete interoperability via scripts.  It is written in Java and can be further developed in Java too.

4. I understand it will be autonomous but I suspect you will want to have the option of tele-operation it via wifi.  MRL has a RemoteAdapter service which allows it to be distributed over over more than one computer.

You can start by downloading 14.1 - http://code.google.com/p/myrobotlab/downloads/detail?name=myrobotlab-0014.1.zip&can=2&q=

If your running windows you should be able to double click the jython.bat or you can double click the myrobotlab.bat, tab to the service tabs and start a Jython service IDE.  For speech recogition you'll need to download the thridParty.zip jar libraries into myrobotlab-0014/libraries/jar.  For the opencv you'll need to give me operating system information.

Right now we are working on a repo and a dynamic download/update system - so the thirdParty.zip will become obsolete, and installation will become much more simple.

rajeev

12 years 3 months ago

  1. At the moment i am only using webcam as my primary sensor but i also have parallax ping sensors and I will use it if need requires.
  2. I am using windows 7 and its a 32bit system.
  3. I am comfortable with C and C++ programming but i have also done few work using python. (Surely not an expert).
  4. Once i have been able to achieve my first objective which is autonomous control, i am also thinking of making it a teleoperated system.

I hope i have answered your questions. Also i have never worked with OpenCV and this would be my first time.

I look forward for your guidance and if you do require any further clarification, i would be happy to provide you with that.

Rajeev

MRL is a Java application framework - so you need to have Java..

  • I'm using the 1.6 SDK - You can download it here - http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u29-download-513648.html
  • Download the myrobotlab-0014.1 unzip it.
  • Download the thirdParty.zip, unzip it and put all the jar within it into myrobotlab-0014.1/libraries/jar - This contains a variety of open source Java applications which are wrapped in MRL Services.  They include speech recognition, speech synthesis, simulators, and many other systems.  They are all in various states of development, some are more robust than others.
  • Double click jython.bat
  • Click on the jython tab
  • Click on the example -> speech -> sayThings.py
  • You should see something like this...

I didn't know any Python until a few weeks ago.  It is more similar to Java than C++.  The designers were very interested in the minimal amount of syntax, which is a nice feature.  Another very nice thing is all of MRL is accessable through this Jython interface.

But we want to start with little steps.  So hit exec and we will see if we took our first "little" step.  What should happen is there should be  a long pause.  Initially this needs to run with a connection to the internet.  What is happening is :

  • A speech service is being created and named "speech"
  • The back end of the speech synthesizer is configurable - in this case we configured it to use Google (FreeTTS is another possibility)
  • set the language to English
  • command to say Hello
  • the text is sent to google and MRL downloads an MP3 - it caches it locally - so any future use of the phrase is quick.

Let me know how it goes.

 

rajeev

12 years 3 months ago

I was able to smoothly execute the software. No problems so far. So whats next for me???

GroG

12 years 3 months ago

In reply to by rajeev

Next I would suggest Motor Control?

MRL has an Arduino service, but to get full use out of it you will need to load the arduinoSerial.pde - it is located here.

http://myrobotlab.googlecode.com/svn/trunk/src/resource/arduinoSerial.pde

This allows MRL running on the computer to talk to the micro-controller.

The next steps would be:

  • creating a Arduino Service
  • selecting the appropriate COM port
  • creating a Left & Right Motor. 
  • attaching the Motors to the Arduino (Motor Controller) interface
  • testing some of the commands (forward, reverse, speed control)

 

Here is a Jython script which "should" do the following.  You can change the code values for the Arduino & Motors depending on your hardware setup.  A tabbed panel for each Service should appear. 

-----------------------------------------------------------------------------------------

 

from org.myrobotlab.framework import Service
from org.myrobotlab.service import Arduino
from org.myrobotlab.service import GUIService
from org.myrobotlab.service import Motor
from org.myrobotlab.service import ServiceFactory
 
from time import sleep
 
# Create a running instance of a Motor controller and Motor
Service.setLogLevel("DEBUG")
 
arduino = ServiceFactory.create("arduino","Arduino")
arduino.startService()
arduino.setPort("COM3")
 
left = ServiceFactory.create("left","Motor")
left.startService()
left.attach("arduino", 9, 2)
 
right = ServiceFactory.create("right","Motor")
right.startService()
right.attach("arduino", 11, 5)
 
right.move(0.15)
sleep(1)
right.move(0.25)
sleep(1)
right.move(0.35)
 
gui = ServiceFactory.create("gui","GUIService")
gui.loadTabPanels()
 

 

rajeev

12 years 3 months ago

Hi Grog

When I tried to execute the jython codes , i waited for about 15mins but nothing happened. Then i tried to create the servises using myrobotlab.bat file but i was not getting the any com port for arduino. Even when i tried to select it from the drop down menu, but it was just blank. To check i opened arduino sketch and i was able to see the com port there but still nothing in the GUI.

Is it designed to automatically pick up the com port or only it will detect through jython codes?

M stuck now. What to do? Will Linux OS will be better to work with myrobotlab?

GroG

12 years 3 months ago

There should be a Log.txt created - please send it to me

admin

12 years 3 months ago

Which is the common problem with (B)leading edge software and one of the things I'm trying to solve with release 15.  At your current transitory version (0014.1) Service.setLogLevel is not supported.  

Fortunately, I have been busy with release 15 and we can use some tricks to get you up to speed.

I posted a mrl.zip.  Unzip its contents into your myrobotlab-0014.1 directory.

The update includes an "update" mechanism.

go to your myrobotlab-0014.1 directory in a cmd shell and copy/paste the following command :

java -cp "libraries/jar/*" org.myrobotlab.service.ServiceFactory -update

This command will start Ivy and query the repository I'm building.  Make sure you have an internet connection when you run it. It will build a local cache of all necessary dependencies (jars, native files, etc).

I've tested this on XP and it works - opencv works too.  I'm a little concerned with windows 7 but let me know.

(P.S. MRL will attempt to check & resolve dependencies when it starts - if yor not connected to the internet or notice delays when starting, just rename the ivysettings.xml.  If this xml file does not exist with the appropriate name, MRL will not attempt to check the repository for updates.  If you run update in the future, make sure the file is in the correct location with the correct name)

Good Luck....

 

 

This is what the output of the update command does.  It should show itself getting in sync with the repository.  If you have any experience with Linux's yum or apt-get you'll be familiar with this concept.

 

 

rajeev

12 years 3 months ago

Hi this is what i am getting

 

I think it is not updating although i am connected to the internet.

admin

12 years 3 months ago

It looks like it's correctly starting Ivy ...  are you connected through a Proxy server?

admin

12 years 3 months ago

Updates through Proxy Services are not yet supported :P (add to my list of things to do :P )

MarketologEn

11 years 7 months ago

Hello, dear Admin.

I want to place advertisement on your forum.
Price $300 dollars is acceptable?

PM me please.

 

Hello MarketologEn,

At this time MyRobotLab is not accepting any advertisements of any form, but thank you very much for your offer and interest.

Regards,
Admin