Reading sensor values of Robosapien V2?

6 posts / 0 new
Last post
coredump9
coredump9's picture
Reading sensor values of Robosapien V2?

Hi all,

Is there a way to read the values of the sensors (position switches and pot) of a Robopien V2 by sending a "query" command? I would like to do this in order to determine the robot's pose.. that is, the orientation of the head/body/limbs. I already modded my RSV2 by wedging an Arduino microcontroller, so now I can control it by sending serial commands from a PC. For the most part, I can make the RS V2 do more complex moves such as bow, karate arm blocks, etc. But without sensor feedback, it would sometimes not do the move completely or correctly due to gear backlash, missed commands, etc.

I read thru all the available info on the Web and found none, so I am not not hopeful but I thought I'd ask. Any ideas would be appreciated.

thanks in advance,

Ben

gerber
gerber's picture

Hi Coredump9

That sound great what you have been able to do to link to the RSV2 to the PC.

Is the RSV2 running linx like the RSMedia cause if it is then maybe you could access the same sensor command for the on the RSmedia as the RSV2. This is only a stab in the dark as I haven't actually done anything with the RSV2.

Is it possible to do the same mod on the Robosapien V1 or the roboreptile so they can be controlled from the PC?

Do you have information on the mod you did to access the RSV2 from the PC? Is the mod the same as the serial hack for the rsmedia.  The reason I ask is I have written software to control the RSMedia.(Currently is will control all movements of the Robot but I have a lot more I want to do to it)

(Here is the link to the software:

 http://www.robocommunity.com/download/18033/RS-Media-Control-Station/;jsessionid=52306E7B13759549FA0B29B518F5121F )

I could use it to control the RSV2 or other wowwee robots as well.

Are the commands to control the RSV2 for example like

/usr/bin/robot/send_robot_cmd 0xff 0x05 0x01  0x366 0x00  (for RS2 Right Chop)

/usr/bin/robot/send_robot_cmd 0xff 0x05 0x01  0x36A 0x00  (RS2  Bulldozer Forward)

If so it would be easy for me to add these command into the software and then you could control your RSV2 from there.

Cheers

Gerber

coredump9
coredump9's picture

Hi Gerber,

Thanks for the info on the RS Media Control software you developed. It looks very useful but unfortunately, the Robosapien V2 (unlike RS Media) does not run on Linux. As far as I know, it runs an embedded program on a custom chip and takes commands as serial bytes, see here.

To answer your question, many folks made similar "microcontroller wedge" mods for the V1. In fact I followed one of them, described in the RobosapienIR blog to add Arduino control to my Robosapien V2. I posted info on my RS V2 mods in another thread in this forum.. but here's the link:
Command line interface for the Robosapien V2

thanks again,

Ben

gerber
gerber's picture

Hi Coredump9

It's a shame it's not programmed like the RSM. However it would be nice to try and add it into my software. Cheers for the link I looked at the python code that is used to send the commands to the robot. I think I code do the same thin in VB.net(below is the link to the Python code)

http://www.arduino.cc/playground/Main/RoboSapienIR

I don't know if you have every tried, but is it possible to send the robot codes from hypertermial? If so I would probably be able to make software in vb.net to control the RSV2.

Cheers

Gerber

coredump9
coredump9's picture

Hi Gerber,

Oh sorry I forgot to explain. The code listing in the RobosapienIR page is actually the code that is compiled and downloaded to the Arduino microcontroller. It is written in the Arduino language, which is essentially C with lots of functions to ease programming.

I wrote a Python script called Robomoco (Robosapien Motion Compiler) that runs on a PC/Mac/Linux host computer and sends the raw bytes to the Arduino. My program actually does more than that.. you can create complex motion sequences (macros) with it such as bow, grab objects in mid-air, double punch, etc.

And yes, you can send the robot codes from hyperterminal or any serial program. So if you can enhance your program to send the raw byte codes, more people can use it!

Ben

Robo J
Robo J's picture

This seems like a great way to make your Robosapien V2 have some sort of feature that RS Media has.

Im a bit curious though... I THINK if you add some sort of storage shield on the arduino and the arduino connected to the RSV2 board, you can probably store programmed movements or even make your robot seems smarter than a out of the box RSV2.

Plus i would like to see this mod you have. A video or atleast a picture of the mod would be nice.