Hi all,

My goal is to see if the Rovio can be used as a room localization system for other robots. So, I'm using the CGI call:

http://192.168.1.71//rev.cgi?Cmd=nav&action=1

Which returns something like this....

------------------

Cmd = nav

responses = 0|x=1374|y=-370|theta=-1.318|room=0|ss=18444

|beacon=0|beacon_x=0|next_room=9|next_room_ss=35

|state=0|resistance=0|sm=15|pp=0|flags=0005

|brightness=4|resolution=3|video_compression=1|frame_rate=20

|privilege=0|user_check=1|speaker_volume=15|mic_volume=15

|wifi_ss=193|show_time=0|ddns_state=0|email_state=0

|battery=113|charging=80|head_position=202|ac_freq=2

--------------------

The X, Y, and theta values show the XY location of rovio and the spin, reletive to the closest beacon signal.

The question is, will it be possible to read these points in a continuous sampling and thus accurately calculate our location in the room. The Northstar system (from Evolution) has earlier claimed accuracy of as little as 1/4 inch, which is pretty amazing. Will be interested what accuracy Rovio provides.

First problem I'm running into... When moving Rovio in a straight fashion, with no spin, I seem to get an accurate XY coordinate mapping to the floor. HOWEVER the XY coords change completely when the robot is spun even a bit. Clearly there is some mathematical mojo happening here, some formula that is needed to convert X-Y-Theta into an "absolute" XY spin number for the beacon. I can't figure it all out.

How does Rovio follow paths? What's the path-following process? Hmmm...

Anybody have an idea?

> My goal is to see if the Rovio can be used as a room localization system for other robots.

BTW: Evolution Robotics sells a developer kit for $1800 USD.

http://www.evolution.com/products/northstar/devbundle.masn

(mini review: http://www.acroname.com/robotics/info/evaluation/northstar/northstar.html#c)

The developer kit includes one Detector ($1400). It handles the detection of the IR, locating the detector in a room, and sending the results via RS232 to your computer (or robot).

The developer kit includes two Projector units ($600 for two) which projects the IR signals to the ceiling.

------

AFAIK in Rovio it has a similar setup (the detector part is in the robot neck, and the projector in the charger base)

The NorthStar system is separate and sends data to the main CPU over a serial port. AFAIK it is not upgradable/hackable, but you can tap into the serial protocol.

Buying a few Rovios and stripping out the detectors may be a lower cost alternative to the $1800 kit (but without any documentation).

=======

> ...will it be possible to read these points in a continuous sampling and thus accurately calculate our location in the room.

Of course, it is easy to do today by simply repeating that URL request and stripping out the numbers (that's what the existing JavaScript does). NOTE: they added one additional value in the 4.09 "BATA" release.

> The Northstar system (from Evolution) has earlier claimed accuracy of as little as 1/4 inch...

(I'll believe that when I see it ;-)

TIP: the x/y/theta numbers can bounce all over the place, especially if you are far from the beacon or have high ceilings. The "ss" signal strength will give you an indication of how reliable the numbers are. Play with Rovio (and beacon) under a table and the accuracy goes up ;->

> How does Rovio follow paths? What's the path-following process? Hmmm...

Also little is known here. I believe the path data is stored in the NorthStar system, but I haven't figured out the details of how it interacts with the motor controllers.

You could figure out more by disassembling the main firmware, including the serial packet interface.

Or wait for the open source version which should at least include the NorthStar interface library (it is statically linked with other GPL code), the way it glues to the webcam/webserver part. The NorthStar system itself is proprietary and patented.

I am guessing here, but I would suspect that Rovio uses both dead reckoning, and updates from the Trutrack system to follow a path.

For example, it might know its location accurately now, and knows it must travel 6ft at a 90deg angle in relation to the base to get to the next waypoint. So, it calculate how many turns it must make of each wheel to get there. Perhaps half way there it checks its current position using Trutrack (I have no idea how frequently it checks its position) and realizes it is 3 inches off course. So, it recalculates a new path and how many wheel rotations are needed to get to its goal.

Joe Dunfee

Any physics majors in the bunch? I'd like to know why I can see the infrared beams coming out the TrueTrack beacon as a red glow when I focus my Sony Handycam video recorder on it, but not see the beams reflected on the ceiling. In other words, I understand that my the electronics in my Handycam can see infrared, but why can't the same electronics see the infrared beams projected on to the ceiling?

-roschler

> I understand that my the electronics in my Handycam can see infrared, but why can't the same electronics see the infrared beams projected on to the ceiling?

BTW: This is also true for the built in Rovio camera (OV7670)

It can see regular IR signals (eg: from a TV remote) but can't disambiguate the dots projected on the ceiling.

Yes, thanks, I know about the Northstar kit. However my understanding was, the Rovio tech is a "newer" version of the technology. Therefore it made more sense to try to use it. No reason to hack the hardware...the CGI script sends the numbers quite conveniently. Actually in a way the Rovio is an amazingly useful piece of hardware anyway. Take off the wheels, camera, etc, and you have a northstar type position detector hooked to a wireless mini-server that can be queried at any time by other robotic systems. That's a very useful gadget.

The key question, again, is how the X, Y, and theta interact. If the robot is spun in place, the X and Y numbers change radically. Therefore they are not X and Y numbers for the "room" but are some other coordinate system that, I'm guessing, are somehow related to the orientation of the sensor reletive to multiple spots in the beam.

Regarding the ability to see IR with your video recorder; these cameras are not really designed to view infrared, they are primarily visible light cameras. The fact that they can view IR is that their imaging chips happen to also detect IR as well as visible light. This is actually a bad thing for visible light photography because it can cause the image to be "wrong" as compared to what a human would see.

Because of the above, visible light cameras have filters to block the IR light. But, these filters are not perfect, and let some IR light through. As an aside, I know there have been at least one visible light video cameras that had a "nightime" mode where the IR filter is moved out of the light path to allow much better detection of IR light.

The final issue is that when you are focused on a single LED, the amount of IR light the camera recieves to a particular pixel is MUCH greater than when you are looking at the light spread out over a ceiling. Also, the ceiling absorbs some of the IR light and also disperses a lot.

In the end, it could actually be that your camera is detecting the IR light from the ceiling, but that it is so close in brightness to the other light in the room that it doesn't really show enough for you to notice.

Joe Dunfee

I was playing with this last night. Theta varies from +Pi to -Pi. When rovio was directly under the center of the beacon 'line' (connecting the two red arrows) and pointed at the base (right angle to the beacon line), theta was ~0.

If you spin the whole Rovio, remember the detector is not at the center of rotation, so it is changing it's XY position. Try rotating it about the sensor position itself. Also, the XY is relative to the brightest beacon, which I suspect means one of the beacon spots is considered 'major'. When you spin it, you're changing the orientation of the detector relative to that spot, so it might make sense that X and Y would change signs? One inch of position change might change the values by several hundred unit... but I've seen the value bounce by up to 1000 units between successive reads. It would be nice to know how many readings Rovio averages, to determine position at any point.

@RobosapienPet, have you considered hooking a 'scope onto the beacon IR LEDs to see what the signal pattern is?

Thanks for suggestion Milw,

I did try spinning "around detector" as if it were a fixed spot. Im still getting very large (multi-thousand) XY changes. I have to assume that X and Y are changing based on rotation, and that one must convert X and Y in some other coordinate system to come up with "normalized" room X and Y numbers.

The theta seems to be a straightforward and predictable change in pi-pi, as you said. It goes from 0 to 3.14 or -3.14 predictably, that makes perfect sense.

I'm curious, are you directly under the spots when you try spinning? I was seeing large variations on succesive reads like you describe, when Rovio was on the base and the spots were projected about 8 feet out from the base. But when I put Rovio on the floor under the spots, the variation was in a few 100s of units. And yes, I guess we don't know if the reported XY values have undergone any preprocessing; they might be just raw instantaneous values off the detectors. I'd like to try plotting a series of reads from the same position to see if the variance is related to signal strength as RobosapienPet suggested. Also move Rovio to marked positions and try to determine the relationship of normalized room XY to the cgi reported XY values.

Oops, forgot to mention, the Evolution Robotics website says the sampling interval is 100 msec...

Can somebody post readings for Rovio in one point with different value of theta?

May be several sets for different positions. Something like:

Point 1 (near base)

(12,34,1.4)

(22,44,-1.2)

...

Point 2 (center of room)

(..,..,..)

...

Point 3 (...)

...

Will be better if points are in pattern like this:

3-4 values of theta and corresponding x,y values for each point will be enought :))

I'll try to do some math excersizes with this data :))

working on it... I copied a bunch of readings last night into Excel but didn't break into individual cells. Plz stand by...

under one spot, nose to 2nd spot (X Y theta)

-2436 -56 1.387

-2460 -78 1.387

-2429 -36 1.383

-2429 -36 1.383

rotate 180 degrees

-4254 490 -1.567

-4243 445 -1.555

-4261 446 -1.557

-4239 422 -1.554

under other spot

2484 -633 -1.645

2463 -656 -1.653

2440 -635 -1.641

2492 -644 -1.643

rotate 180 degrees

4170 -991 1.507

4099 -1001 1.501

centered between, nose to base

3 -1515 -0.168

6 -1468 -0.165

54 -1487 -0.161

33 -1377 -0.156

nose away from base

363 30 3.107

363 30 3.107

388 17 3.106

367 -21 3.105

These were done by rotating the entire Rovio, not centered about the sensor unfortunately.

Can you do 90 degrees rotation for some points too?..

OK, coming soon (someone is blocking

You can try to search for extremums:

1) point with x=0 and y=0 and check behevior of values with rotating and small movements

2) tracks for which x remains 0, and check for theta and y changes

3) tracks for which y remains 0, and check for theta and x changes

4) tracks with constant value of theta (0, pi, pi/2, -pi/2)

May be this tracks/points/behaviors will give you some ideas :))

Does web interface has some display of current position ?

You can check javascripts for some expressions with sin and cos functions :))

No, the web interface doesn't show anything position related, other than the status ("Roaming", "Going Home", "Recording", etc). I'm not sure about the .js, I'll take a look.

> how the X, Y, and theta interact. If the robot is spun in place...

(and subsequent discussions)

Other tips:

As mentioned, try placing the robot under a table right under the 2 dots of the beacon. The signal strength will be strong, and you can easily move either the robot or beacon and watch the values change.

For rotation, try turning the beacon instead of the robot (ie. if you keep the robot still, and rotate the 2 dots, you will see the 'theta' value exactly match the rotation - ie. the angle of the line between the 2 dots as seen by the robot).

The "x" and "y" units are a little trickier. It takes a little trig. Remember you are seeing how things look from the robot's point of view

Check out this graphic: http://www.evolution.com/images/products/northstar1

Also remember it is a triangulation system, so it can't measure accurate distances on its own (unless you include the ceiling height, or coordinate with the robots motion)

----

> Does web interface has some display of current position ?

No. In the normal webpage, only the "ss" signal strength is used (for the Nav strength).

BTW: The firmware appears to have four "mag" values internally(perhaps magnitude?). I'll look into a way of extracting them.

Keep up the good work everyone. I'm loving this thread since it involves understanding the Rovio location readings.

Here's my take on things (top view) with some real values I recorded. The line connecting the beam dots is the X axis, Y is at right angles. 0,0 is a the center of the beam line. Theta is Rovios heading relative to the beamline. Although the readings are relative, I think Rovio should be able to calculate an absolute position after measuring the change in values for a given number of wheel rotations (ignoring slippage, which might be hard to ignore!). In my room, the beam line is about 8' out from the base, and the dots are ~7' apart on the ceiling.

Looks likely..

get readings at position 4863,4557 for different values of theta - if they will have the same sign and not too big difference (but due to non-linear transforms of optics/etc it can be not too small :)) ) then this theory will make sense :))

These are the four cardinal directions at one point, starting with Rovio nose ~parallel to beam line, then turning 90 CCW (attmepting to rotate about sensor but variance of position could be ~1-1.5 cm)

x=3171|y=-4782|theta=1.434

x=2467|y=-4642|theta=3.019

x=2410|y=-4710|theta=-1.753

x=2673|y=-5104|theta=-0.164

If you say the beam line is North-south, then theta 3.14 is a Rovio heading of West, 1.57 North, -1.57 South, and 0 or -3.14 is East

heh, seems your theory is correct +- errors from visual effects

Wow, thanks. What great work!!

I'm a total math retard, and trig is my least favorite. Never could have figured this out :)

So, can anybody tell me a formula that I can plug into Excel that will calculate "absolute" (as in, room reference, not rovio reference) XY positions, if I plug in the rovio XY theta numbers?

For example:

Xroom, Yroom = (formula... Xrovio, Y rovio, theta)

Again, the problem I keep running into is big variations in X and Y even when I make efforts to keep the rovio sensor absolutely central (rotate only, no XY move when I spin the device around). MILW your drawing shows, I think, that the XY should stay the same (+- variance of several hundred counts) if the device is rotated around the sensor as the axis. I'm not getting that, I'm getting big variations...

Or am I misunderestimating?

Tom have you tried averaging some readings? I think that's what you're going to have to do, before converting. Also I don't think you need any trig, theta just tells you what direction the Rovio is pointing. The X and Y from Rovio can be converted by scaling and adding an offset; you will need to calibrate the readings you get at the extreme limits of your room to the actual dimensions of your room, and pick how you want to set up the room coordinate system. I can sketch an example and show the setup, you'd have to plug in your room values and units etc to make use of it.

milw: What is real scale of this coordinates in your case? how much units per 1m for example?

Can you make one more table for 15-20 readings in one position with different theta values - so we can see systematic error of measurement depending on theta and behavior of this error...

do you have a flat horizontal ceiling?

error in 600 units seems to be big enought... try to bookmark some point and let rovio navigate to it from different angles - will it stop at the same point or different depending on arrival angle? Does it make some additional movements at arrival for correcting final position?

Yes, my ceiling is flat white with some slight sand texture. I want to dig out a turntable so there'll be less positioning error for each rotation. Will report back.

This diagram shows some readings and real measurements. Over 4 readings, the SD is ~160 units, at about 53 units per cm, so a bit over 3 cm deviation. In X I got about 135 units per inch or 53 units/cm; in Y about 136 units/inch or 53.5 units/cm. The ceiling is 90.5 inches (229.9 cm) above Rovios detector, and the IR dots ar around 55.5 inches (21.7 cm) apart at a range of 82" (208.3 cm) from Rovios detector when docked.

Unfortunately, using the /rev.cgi?Cmd=nav&action=1 URL during recording seems to have mucked up the recording; older test recordings still seem to play back with fairly good fidelity (positions of turns within about 6" of recording; camera up/down and headlight on/off play back correctly).

Heh, with this resolution (50+ units/cm) errors in 200-300 range is really small and comparable to rovios size.

But measurements using turntable is still interesting of course :))

Here you go Sevik, have fun! 10 readings at 8 headings. Eccentricity of the sensor on the turntable is ~2 mm.

Heading 0 degrees (North)

x=-1975|y=-8298|theta=3.131

x=-1834|y=-8257|theta=3.141

x=-1761|y=-8313|theta=-3.131

x=-1942|y=-8249|theta=3.134

x=-1968|y=-8265|theta=3.133

x=-1811|y=-8274|theta=-3.128

x=-1834|y=-8310|theta=-3.141

x=-1792|y=-8289|theta=-3.133

x=-1839|y=-8333|theta=-3.136

x=-1812|y=-8291|theta=-3.132

Heading 90 CW (East)

x=-1692|y=-8091|theta=1.577

x=-1518|y=-8103|theta=1.592

x=-1518|y=-8103|theta=1.592

x=-1600|y=-8087|theta=1.584

x=-1684|y=-8070|theta=1.580

x=-1513|y=-8087|theta=1.588

x=-1561|y=-8060|theta=1.589

x=-1669|y=-8128|theta=1.578

x=-1670|y=-8100|theta=1.577

x=-1538|y=-8089|theta=1.589

Heading 180 (South)

x=-1601|y=-8360|theta=-0.028

x=-1687|y=-8322|theta=-0.045

x=-1486|y=-8306|theta=-0.024

x=-1640|y=-8311|theta=-0.038

x=-1758|y=-8298|theta=-0.054

x=-1492|y=-8293|theta=-0.024

x=-1567|y=-8248|theta=-0.031

x=-1531|y=-8199|theta=-0.025

x=-1560|y=-8296|theta=-0.029

x=-1629|y=-8273|theta=-0.034

Heading 270 (West)

x=-1730|y=-8249|theta=-1.540

x=-1746|y=-8241|theta=-1.538

x=-1590|y=-8264|theta=-1.525

x=-1867|y=-8270|theta=-1.549

x=-1759|y=-8290|theta=-1.542

x=-1611|y=-8234|theta=-1.524

x=-1675|y=-8288|theta=-1.528

x=-1658|y=-8259|theta=-1.535

x=-1618|y=-8240|theta=-1.521

x=-1534|y=-8290|theta=-1.524

Heading 0 (North)

x=-1847|y=-8267|theta=3.114

x=-1851|y=-8301|theta=3.112

x=-1882|y=-8259|theta=3.104

x=-1741|y=-8246|theta=3.120

x=-1859|y=-8317|theta=3.109

x=-1879|y=-8297|theta=3.110

x=-1847|y=-8287|theta=3.108

x=-1861|y=-8299|theta=3.111

x=-1969|y=-8278|theta=3.095

x=-1792|y=-8248|theta=3.118

Heading 45 (NE)

x=-1957|y=-8186|theta=2.333

x=-1822|y=-8131|theta=2.348

x=-1976|y=-8163|theta=2.333

x=-1982|y=-8090|theta=2.330

x=-1746|y=-8081|theta=2.361

x=-1756|y=-8065|theta=2.358

x=-1727|y=-8111|theta=2.361

x=-1902|y=-8093|theta=2.344

x=-1968|y=-8149|theta=2.333

x=-1805|y=-8156|theta=2.352

Heading 135 (SE)

x=-1432|y=-8263|theta=0.807

x=-1528|y=-8231|theta=0.801

x=-1625|y=-8200|theta=0.785

x=-1485|y=-8212|theta=0.802

x=-1480|y=-8130|theta=0.804

x=-1443|y=-8222|theta=0.801

x=-1347|y=-8207|theta=0.809

x=-1455|y=-8170|theta=0.807

x=-1644|y=-8168|theta=0.786

x=-1606|y=-8144|theta=0.791

Heading 225 (SW)

x=-1616|y=-8310|theta=-0.775

x=-1547|y=-8246|theta=-0.774

x=-1520|y=-8243|theta=-0.771

x=-1670|y=-8257|theta=-0.783

x=-1689|y=-8283|theta=-0.785

x=-1612|y=-8207|theta=-0.778

x=-1612|y=-8275|theta=-0.781

x=-1552|y=-8279|theta=-0.776

x=-1729|y=-8232|theta=-0.788

x=-1581|y=-8296|theta=-0.779

Heading 270 (NW)

x=-1671|y=-8409|theta=-2.367

x=-1726|y=-8351|theta=-2.372

x=-1726|y=-8351|theta=-2.372

x=-1622|y=-8295|theta=-2.366

x=-1561|y=-8309|theta=-2.359

x=-1720|y=-8381|theta=-2.373

x=-1608|y=-8361|theta=-2.365

x=-1421|y=-8271|theta=-2.346

x=-1554|y=-8275|theta=-2.366

x=-1745|y=-8321|theta=-2.377

## Pages