Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

My first Experiment Ready! (Your opinion?)

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
15 postsPage 1 of 1
15 postsPage 1 of 1

My first Experiment Ready! (Your opinion?)

Post by JavaRN » Tue May 22, 2007 4:39 pm

Post by JavaRN
Tue May 22, 2007 4:39 pm

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:


http://www.youtube.com/v/QoGJed3Xp1Q

(Sorry but the video is a little bit long)
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:


http://www.youtube.com/v/QoGJed3Xp1Q

(Sorry but the video is a little bit long)
F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by DirtyRoboto » Tue May 22, 2007 6:12 pm

Post by DirtyRoboto
Tue May 22, 2007 6:12 pm

Very good work. I must commend you on your skills.

Marcus.
Ps. the titles at the head of the clip were quite long and it had no sound!!!
Very good work. I must commend you on your skills.

Marcus.
Ps. the titles at the head of the clip were quite long and it had no sound!!!
In servo's we trust!
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

My Experiment

Post by JavaRN » Tue May 22, 2007 6:27 pm

Post by JavaRN
Tue May 22, 2007 6:27 pm

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!) :P

As regards to the titles, you're right, in my next video I will keep them short.

Thanks
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!) :P

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!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by DirtyRoboto » Wed May 23, 2007 5:59 am

Post by DirtyRoboto
Wed May 23, 2007 5:59 am

Apart from that, it was an awesome display of cool programming.

Marcus.
Apart from that, it was an awesome display of cool programming.

Marcus.
In servo's we trust!
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by Ray » Wed May 23, 2007 12:13 pm

Post by Ray
Wed May 23, 2007 12:13 pm

Its cool !

:wink:
Its cool !

:wink:
Ray
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 230
Joined: Sun Apr 23, 2006 1:00 am
Location: HK

Post by limor » Fri May 25, 2007 1:24 am

Post by limor
Fri May 25, 2007 1:24 am

please expand a bit about the camera module, what you broadcast over bluetooth, what kind of analysis you are doing on the laptop etc.
please expand a bit about the camera module, what you broadcast over bluetooth, what kind of analysis you are doing on the laptop etc.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

How I did it

Post by JavaRN » Fri May 25, 2007 12:57 pm

Post by JavaRN
Fri May 25, 2007 12:57 pm

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.
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!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by Humanoido » Tue May 29, 2007 1:29 am

Post by Humanoido
Tue May 29, 2007 1:29 am

Outstanding! Great job!

humanoido
Outstanding! Great job!

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Post by BillB » Tue May 29, 2007 4:45 pm

Post by BillB
Tue May 29, 2007 4:45 pm

Excellent stuff.

Robonova Roboteering has now moved up to a new level.

Please keep us updated to your progress.
Excellent stuff.

Robonova Roboteering has now moved up to a new level.

Please keep us updated to your progress.
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Thanks

Post by JavaRN » Tue May 29, 2007 7:05 pm

Post by JavaRN
Tue May 29, 2007 7:05 pm

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.
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!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by Gort » Tue Jun 19, 2007 9:47 pm

Post by Gort
Tue Jun 19, 2007 9:47 pm

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.
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.
Gort
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 555
Joined: Wed May 31, 2006 1:00 am
Location: KC, MO, USA

Post by Gort » Tue Jun 19, 2007 9:58 pm

Post by Gort
Tue Jun 19, 2007 9:58 pm

Is your code similar to the code in the java.net article

http://today.java.net/pub/a/today/2004/ ... maxdepth=0
Is your code similar to the code in the java.net article

http://today.java.net/pub/a/today/2004/ ... maxdepth=0
Gort
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 555
Joined: Wed May 31, 2006 1:00 am
Location: KC, MO, USA

Post by Onime_No_Kyo » Tue Jun 19, 2007 11:05 pm

Post by Onime_No_Kyo
Tue Jun 19, 2007 11:05 pm

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
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
Onime_No_Kyo
Newbie
Newbie
Posts: 5
Joined: Tue Jun 19, 2007 2:45 pm

How communicate with Robonova through Bluetooth

Post by JavaRN » Wed Jun 20, 2007 9:03 pm

Post by JavaRN
Wed Jun 20, 2007 9:03 pm

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.

There is an excellent example on how to use this package in http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php

(I've used it myself to start coding my application)

Besides the example, there is a small note in the beginning of the article, what files need to be copied to make the package work.

Hope this helps.
Charles
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.

There is an excellent example on how to use this package in http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php

(I've used it myself to start coding my application)

Besides the example, there is a small note in the beginning of the article, what files need to be copied to make the package work.

Hope this helps.
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!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by Gort » Wed Jun 20, 2007 9:55 pm

Post by Gort
Wed Jun 20, 2007 9:55 pm

Thanks JavaRn, that is all I needed was a point in the right direction.
Thanks JavaRn, that is all I needed was a point in the right direction.
Gort
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 555
Joined: Wed May 31, 2006 1:00 am
Location: KC, MO, USA


15 postsPage 1 of 1
15 postsPage 1 of 1