Welcome, Guest. Please login or register.
Did you miss your activation email?

Username: Password:


Pages: [1]   Go Down

Author Topic: Commanding pleo with usb cable  (Read 6528 times)

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Commanding pleo with usb cable
« on: March 06, 2010, 11:19:48 AM »

Hi,

I'm doing a school project on pleo and I need help with some aspects:

How do I give instrutions (like growl, walk)  to pleo using a computer and a USB cable?

I have read that using dino-Mite one can achieve that. But I am a little confused... is it true ? is it that simple?
If not, can someone point me in the right direction to achieve this.

Thanks
Logged


InmemoryofRomeo

  • Global Moderator
  • Pleo Grand Master RB
  • * Posts: 6903
  • au Female
  • Pleo(s): Lilo, Stitch, Pleakley, Jumba, Nani, Yuki, Angus, Pluto
  • : 2011 winner2009 winnerTomato Harvest Festivals
  • SAVE THE EARTH It's the only planet with chocolate
    • Professor
    • Wile_E_Coyote
    • Marcie
Re: Commanding pleo with usb cable
« Reply #1 on: March 07, 2010, 03:12:26 AM »

Yup dinomite can do that :) Check the dinomite download thread, the manual is there somewhere I think, if not let me know and I will email you a copy :) Its is indeed that easy :D

Alternatively you could check the remote control pleo thread under the programmers thread and do that instead :D
Logged
Eagerly awaiting Vector and Blue!

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Re: Commanding pleo with usb cable
« Reply #2 on: March 07, 2010, 11:10:15 AM »

Thanks InmemoryofRomeo  ;)!

I have found the manual and dino-mite in this forum.

My ultimate goal is to remote control pleo. But the first step of the project is to command pleo via usb cable.

I have searched the thread about remote control of pleo but I could not find it.
Please could you post the link to this thread.

thanks
Logged

InmemoryofRomeo

  • Global Moderator
  • Pleo Grand Master RB
  • * Posts: 6903
  • au Female
  • Pleo(s): Lilo, Stitch, Pleakley, Jumba, Nani, Yuki, Angus, Pluto
  • : 2011 winner2009 winnerTomato Harvest Festivals
  • SAVE THE EARTH It's the only planet with chocolate
    • Professor
    • Wile_E_Coyote
    • Marcie
Re: Commanding pleo with usb cable
« Reply #3 on: March 07, 2010, 09:52:59 PM »

http://bobthepleo.com/forums/index.php?topic=776.0

About halfway down there is a download with the coding, instructions and everything. You will need Dinomite of course, a compatible remote and an SD card. To find a compatible remote just grab all the ones in your house, point them at Pleo and see if it gets a reading through dinomite :)
Logged
Eagerly awaiting Vector and Blue!

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Re: Commanding pleo with usb cable
« Reply #4 on: March 11, 2010, 09:13:18 AM »

Thanks InmemoryofRomeo   ;) ;) ;)

Could you help me with a problem I'm having?  %)

Now, if want to send an instruction to pleo, for instance "move head 90º" either I use dino-mite or I open a shell and wright the command.

But I want to take it a step further, I want to send XML to my pleo.
What I'm trying to achieve is this: I want to send an instruction to pleo but the instruction is in a XML file.

Can pleo to the parsing of the xml file and execute the instruction? If so how?

Thanks
Logged

mweed

  • Grand Poobah
  • Triassic pleo master
  • ***** Posts: 1758
  • us Male
  • Pleo(s): Bob, Mopey
  • : Tomat Harvest Festivals
    • Professor
    • Wile_E_Coyote
    • Dr_Bunsen_Honeydew
    • Snoopy
    • Bob the Pleo
Re: Commanding pleo with usb cable
« Reply #5 on: March 11, 2010, 10:31:08 AM »

I do not believe the OS has an XML parser built into it.  With the extremely limited memory space available on the chip, I would be really surprised if they used any for that, and I can't imagine why Ugobe would have seen a need for it.   But that's not to say you couldn't write one and have it loaded . . . .

Any particular reason you want to use XML?
Logged

InmemoryofRomeo

  • Global Moderator
  • Pleo Grand Master RB
  • * Posts: 6903
  • au Female
  • Pleo(s): Lilo, Stitch, Pleakley, Jumba, Nani, Yuki, Angus, Pluto
  • : 2011 winner2009 winnerTomato Harvest Festivals
  • SAVE THE EARTH It's the only planet with chocolate
    • Professor
    • Wile_E_Coyote
    • Marcie
Re: Commanding pleo with usb cable
« Reply #6 on: March 11, 2010, 02:56:43 PM »

That may come under the 'higher functions' that we don't have access to, but I'm not sure at all, I've never worked with XML with Pleo.
Logged
Eagerly awaiting Vector and Blue!

PleoPet

  • Pleontologist
  • * Posts: 162
  • Female
Re: Commanding pleo with usb cable
« Reply #7 on: March 12, 2010, 09:17:29 AM »

other suggestions:
> I want to send XML to my pleo.

As mentioned, Pleo does not have anything like XML parsing built in. There is not enough memory for that.
There are pawn primitives for very simple text parsing (See 'string.inc'), but they are inadequate for anything except for trivial stuff.
There is another problem that using Pleo tethered is not very compatible with custom Pawn programs (the only official way to program Pleo)
---
Suggestion #1: (assuming you need XML)
Since the PLEO is tethered, why not: send the XML to your PC computer, do the XML parsing there (and any other high level logic) and then finally send the low level robot commands using the USB (or serial) link?
You can program the XML parser in any language you like (using pre-existing libraries) on the PC.

I'm not sure what you are trying to do, but the same approach can be used to make a web proxy (ie. PC program providing a web interface to the Pleo). Something a Pleo would never be able to do on its own.
---
Suggestion #2: (assuming you need untethered)
If you want the XML file to be a stand-alone script/program to control Pleo's motion (like a high level programming language) and Pleo can run the script stand alone, then my advice is: don't use XML.
Define a much simpler (easier to parse) language/set of statements. See the "YAPT" tool. It creates very simple text lines that are simple enough to parse with Pawn.


Good luck.

« Last Edit: March 12, 2010, 09:23:21 AM by PleoPet »
Logged

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Re: Commanding pleo with usb cable
« Reply #8 on: March 15, 2010, 04:19:30 AM »

Hi, thanks for your comments they were very helpfull.

I will give you a more detailed description of what I'm trying to achieve:

I'm try to send to pleo a xml file containing instructions (ex move head, move tail, sleep).
I want pleo to be able to parse the xml file and execute the instructions.
The objective is to to send xml files form various sources (PDA, computer etc) to pleo.

This morning I had this idea:
Have a pawn script that works like a server. It looks for xml files on the sd card, parses them and executes the instructions.
But this raises the question: Is it possible to send a file via usb cable to be saved on the sd card?

Thanks


Answering some questions:
At this point I'm not allowed by my teacher to process the xml file on a computer and send only the instruction to pleo.
Logged

PleoPet

  • Pleontologist
  • * Posts: 162
  • Female
Re: Commanding pleo with usb cable
« Reply #9 on: March 17, 2010, 10:34:33 AM »

> At this point I'm not allowed by my teacher to process the xml file on a computer and send only the instruction to pleo.
Sounds like a contrived constraint IMHO.
If the project goal is to learn about XML parsing and write your own parser, then I don't recommend Pleo/Pawn. The Pawn primitives are very limited for parsing strings. Pleo normally doesn't do anything interesting with strings (the PDK uses XML for various things, but all those tools run on a PC, and create binary data to go on the SD card)

If the project goal is to create a simple robot language, then there are many other options.
Pleo is NOT a general programming platform. It is a robot with many features and many limitations.
-----
If still interested in writing and XML parser in Pawn, you can try the Pawn compiler running on your PC (ie. makes it much easier to test/debug and it has an IDE).
http://www.compuphase.com/pawn/pawn.htm

That's a start. Pleo has a few more limitations (even fewer string functions, no ability to add your own primitives, very little free memory)
IMHO: If you try it, I predict you will get frustrated and come to the same conclusion ;->
-----
> ...Is it possible to send a file via usb cable to be saved on the sd card?
Yes. The Pleo (USB cable) supports "OBEX" for object exchange.
There is also an old 'xmodem' protocol. See the Pleo PDK documentation for terse details.
NOTE: OBEX only works with the USB cable, not the hardware serial port. This will limit your options if you want to go wireless.
This approach also requires a custom program to run on the PC to transfer the file.
Logged

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Re: Commanding pleo with usb cable
« Reply #10 on: March 18, 2010, 07:24:05 AM »

PleoPet thanks for your help  ;).

Since the ultimate goal of the project is to send (from other platforms PDA, computer) xml files to pleo (containing  instructions like move head, move tail) using wireless communication I'm starting to have doubts about this being possible.....

I heard that there was someone who was controlling pelo with the wii remote. Does anyone know how he did it.


Thanks
Logged

PleoPet

  • Pleontologist
  • * Posts: 162
  • Female
Re: Commanding pleo with usb cable
« Reply #11 on: March 19, 2010, 09:22:40 AM »

> I heard that there was someone who was controlling pelo with the wii remote. Does anyone know how he did it.
http://robostuff.com/diy-projects/pleo-hacking/how-to-control-pleo-wirelessly-using-wii-nunchuck/
(IIRC: there was also a demo version for RoboDance using a different approach)

I'm sounding like a broken record but this one also uses Pleo for what it is good for (ie. robotic movement) and slaps on another computer for the computer stuff and send the serial commands to the robot (like DinoMite)

In this case the controlling computer is an Arduino (connected directly to the Nunchuck) sending serial commands to the Pleo with XBee modules. The Bluetooth WiiMote is not used.
There are many other variations.
For WiiMote control, you could use a PC with a Bluetooth module (connect one XBee to the Pleo and the other to the PC's serial port - through a level shifter). Then you could use the WiiMote normally.
Another approach would be to connect an Arduino (or other small controller) directly to the Pleo, and then have the Arduino do the extra work. There are Arduino modules for WiFi too (which would let Pleo+Arduino act as a self contained website/server that you could control with almost any WiFi device like an iPhone/iPadTouch).

The combinations are endless, but Pleo is only one piece of the puzzle since it lacks the hardware (and software programming flexibility) to do it all itself.

Logged

alunoist

  • Leaving the nest
  • * Posts: 8
  • Female
Re: Commanding pleo with usb cable
« Reply #12 on: March 22, 2010, 04:08:40 AM »

PleoPet  thanksfor the help.

I will have to expose this problems to my teacher.
Logged

Big Head

  • Outstanding in the herd
  • **** Posts: 60
  • Male
  • Still Looking For the "Fork of Horripilation".
Re: Commanding pleo with usb cable
« Reply #13 on: August 13, 2010, 08:12:11 AM »

I think it's sad to control pleos. It just seems kinda mean.
 :(
Logged
"Sweetheart, you can't buy the necessities of life with cookies."
Pages: [1]   Go Up
 

SimplePortal 2.3.5 © 2008-2012, SimplePortal