Posted: Tue May 22, 2007 3:39 pm Post subject: My first Experiment Ready! (Your opinion?)
I had my Robonova for about a month and a half now, and I always wanted to control my robonova through Java programs. Well this is my first experiment - I build some classes for image recognition - filtering and colour enhancement algorithms also routines to capture frames from the wireless camera mounted on my robot. To all this I added bluetooth communication, now the robot can "reason" things out together with my laptop. The robot "sees" things the laptop analyses them and sends the messages to the robot (what to do) via bluetooth. On the other hand the robot sends back his status - sensor readings, battery status and whether he is ready from the current move.
Everything is still under testing. I wrote more than 400 lines of code in Java and I still need to write hundreds more to achieve what I have in mind. This is my first experiment. If you are interested in having a look, I posted the video on Youtube:
Posted: Tue May 22, 2007 5:27 pm Post subject: My Experiment
I removed the sound on purpose because there was my daughter playing with the neighbour's daughter in the other room (next to my study) and you would have heard lots of noise which doesn't make sense (words in Maltese!)
As regards to the titles, you're right, in my next video I will keep them short.
Thanks _________________ F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
Posted: Fri May 25, 2007 11:57 am Post subject: How I did it
I bought the camera module from e-bay at a very reasonable price, it was a wireless camera with a usb receiver which enables windows to recognise the device as a WDM so that it can interface with JMF (Java Media Framework) framework. I tried with other models of wireless/wired cameras that did not have a usb reciever (worked through a DVB card) but they were not JMF compatible.
Any way thorugh JMF I could capture a frame from the video stream and then make some simple image manipulation, basicly, brighten the image (adding an offset to the RGB values of any pixel) to remove shadows from the image as this makes the image recognition more difficult, and then extracting the "red" pixels out of the image treating the other pixels as "white", in this way the image of the box was singled out.
From the position of the box on the image one can determine whether the box is far, near or in a position to be collected. All this processing is done in the laptop.
Through the bluetooth module the robot receives the moves to make - the laptop sends an integer number which the robot receives and then performs the moves using robobasic. When the move is ready, the robot replies back with a ready signal (integer number 0) and the sensor readings (for now the sonar sensor and the battery status) - the sensor readings were not used in this experiment but I intend using them in the next one.
When the robot performs the "pickup" instruction the laptop terminates the communication with the robot.
Hope this explains better.
Charles. _________________ F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
Posted: Tue May 29, 2007 6:05 pm Post subject: Thanks
Thanks to all of you for your encouraging words. I will surely continue on this line - Java is my favourite language and Robotics, even though a new area to me, are very interesting and the combination of the two is fantastic. I will keep you informed and upload videos as soon as I have more to show you. Thanks again. _________________ F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
Joined: 31 May 2006 Posts: 539 Location: KC, MO, USA
Posted: Tue Jun 19, 2007 8:47 pm Post subject:
If you are willing. Can you post the java code and the robobasic code you used to set up the two way communication through Bluetooth. I would be greatly interested in how you set it up. I am looking into doing the same thing with my RN.
I have to do a project which consists on doing a web page for managing the RN directly with an applet or something that it could put in the web page.I hope that soon I they could contribute something to all
Posted: Wed Jun 20, 2007 8:03 pm Post subject: How communicate with Robonova through Bluetooth
I made use of the RXTX library, you can download it from www.rxtx.org. Basically, you need to treat the bluetooth connection as a serial port and send data to it just the way you send data to a com port. I use BlueSoliel bluetooth dongle and it communiates with robonova on com port 6.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum