Hello !

 

I am trying to understand how to retrieves the information from my (real) IR sensors. And I am not exactly sure if I understood everything correctly. ..

 

Let me describe you a bit the setup:

 

I have a wheelchair that has a board on it. This board controls the sensors and the motors (as well as some other functions.)

I have a laptop (under ubuntu 9.04). On this laptop player/stage is installed and runs my simulation with a simulated environment, robot and sensors. (Until here, it works perfectly as I am only simulating)

The laptop is connected to the board through a serial connection. (with a serial to usb converter). The board constantly sends the sensors values over the serial port. I can retrieve those information from the laptop with a simple c++ code polling the ttyUSB0 port.

The information sent over the serial port are “custom” ( [START][IDSENSOR][RANGE][IDSENSOR][RANGE][IDSENSOR][RANGE] …[END]), each [] being a Byte and representing a value as an ASCII Dec .

 

 

What I want:

(Final goal) Instead of controlling the simulated robot, I want control the real one with the laptop connected through serial.

 

For now I already want to be able to retrieve the information coming from my real IR sensors in Player. (I’ll see later for motor controls and so, should be approximately the same kind of mechanism as reading from real sensors …)  

As I understood, I have to write a new specific driver providing an ir:0 interface. It seems to me I can use approximately this example to make the driver: http://jonas.nitro.dk/ERSPPlayer/hdaps_8cc-source.html

Or more precisely as I am using ranger: the PBS-03JN driver given here: http://www.control.aau.dk/~tb/wiki/index.php/Player_drivers can be partially reused to do my driver.

 

I see a few problems coming:

I will also have to use this serial link to receive the encoders values (next step) and also to send the motor control data (next step also).

I think that if I do the driver this way, I will have problem when trying to open the ttyUSB0 port for the other drivers. Should I do one driver that dispatches/handles all the information ?

 

A few hints would be appreciated

 

Hope I was clear enough … and sorry for the question being a bit imprecise.

 

Thanks !

________________________________
Simon Ruffieux Consultant Département TIC Ingénieur diplômé EPF
 Ecole d’ingénie
urs et d’architectes Pérolles 80 CP 32 CH-1705 Fribourg (Suisse)
 Tél. +41 (0)26 429 66 69 Bureau F.10.06 www.EIA-FR.ch

P Please consider the environment: do you really need to print this email ?