Position detection in a room

I have been thinking to detect a position of person in a room using Arduino.
I thought about GPS, but I found on various pages that there would be many problems indoors. I also thought to use Kinect, but it is not possible to set it up on a ceiling (Kinect faces towards the ground), besides on this, it is necessary to have a long cable which could be around 30m long.

Basically what I would like to do are:

  1. To detect the position of a dancer who constantly moves on a stage (approximately 8m x 5m).
  2. Depending on the position, sound and images interact.
  3. The accuracy of the detection of position may be 10cm(? if possible), as precise as possible.
  4. The time gap (delay) should be less as much as possible.

Maybe I could set up many infrared sensors into a lattice form, but it would become a large quantity. I also thought about a carpet which has many pressure sensors, but the quantity of sensors would be huge, as well.

If there are any sensor which can detect a position like GPS inside a building, that would be perfect. Does anyone know anything about this? Or if I can do the things like above, it is OK for me with a different method.
Thanking you in advance.

You could use 4 ultrasonic sensors ( one on top, one behind and one on each side). The ultrasonic sensors will report the distance to the first object. Depending on the readings you can triangulate the position. GPS works pretty much the same but at bigger scale.

You can find ultrasonic modules for 20 dollars or so that can measure from 20 cm - 600 cm with a 0.3 cm precision. If you buy the transducers and make it your own is way cheaper. Feed the results to a micro controller who can send signals to the appropriate light source. Of course, this assumes the stage doesn't have obstacles. The components should be bellow 100 dollars.

If you have obstacles then you need a camera with heat signature detection. The price is considerably higher this time.

CalinTamaian:
You could use 4 ultrasonic sensors ( one on top, one behind and one on each side). The ultrasonic sensors will report the distance to the first object. Depending on the readings you can triangulate the position. GPS works pretty much the same but at bigger scale.

Thanks for your reply.
The precision of ultrasonic module is ideal. The concern is that the ultrasonic module is very directional, like the infrared sensor. Perhaps the ultrasonic module is wider than the infrared sensor. It is still necessary to have many in order to have the good accuracy, since the space is about 8m x 5m.
Maybe the only solution is RSSI with XBee? I am now wondering, if the Xbees can determine the position through Trilateration :

http://forum.arduino.cc/index.php?topic=196681.0

Any kinds of your information or experiences would be appreciated.

A challenge to solve...but some ideas

  • use a raspberry Pi with camera & some available software, should work well on ceiling as well
  • Placing an IR LED(s) on the body being tracked should make this easier & more accurate
  • Other approaches are small body heat/temperature detectors, placed around the edges and then triangulated.
  • Use 3 or more sound sensors and have the dancer carry an audio sender, preferably inaudible. By measuring the 'speed of sound/pings' , you should be able to triangulate the loation. Will require some calibration. The sound pulses or pings, at a particular frequency, could be triggered by the Arduino using IR, which then waits for the sound pings to come back and will thus reduce interference.
  • You could expand by using the IR signal to synchronize the pings from multiple dancers at different time slots.

RF: As far as I know the accuracy of most RSSI approaches are poor.

jicx:

CalinTamaian:
You could use 4 ultrasonic sensors ( one on top, one behind and one on each side). The ultrasonic sensors will report the distance to the first object. Depending on the readings you can triangulate the position. GPS works pretty much the same but at bigger scale.

Thanks for your reply.
The precision of ultrasonic module is ideal. The concern is that the ultrasonic module is very directional, like the infrared sensor. Perhaps the ultrasonic module is wider than the infrared sensor. It is still necessary to have many in order to have the good accuracy, since the space is about 8m x 5m.
Maybe the only solution is RSSI with XBee? I am now wondering, if the Xbees can determine the position through Trilateration :

Trilateration using RSSI - Networking, Protocols, and Devices - Arduino Forum

Any kinds of your information or experiences would be appreciated.

The ultrasonic sensors have way bigger angle than an IR LED for example. The high frequency ones ( above 200Khz ) do have low directivity ( 9 degrees or so), but the lower frequency ones (25-40 KHz ) have big angles. At above 2m from the sensor I would expect to cover at least 2m left and right from the sensor. ( a 25 degrees sensor detects an object at 1.5m outside his straight line ; I know for sure because this was an unforeseen project issue).

The speed on sound is however dependent on air humidity , heat and pressure. Without compensation you might get some errors but you should have 10 mm resolution either way..... Unless the atmosphere is really incendiary :slight_smile:

AnalysIR:

  • use a raspberry Pi with camera & some available software, should work well on ceiling as well
  • Placing an IR LED(s) on the body being tracked should make this easier & more accurate

Roborealm would make it pretty simple to track the position using this method. Accuracy is going to be dependent on the resolution of the cameras you use.

jicx,
This can definitely be done. Do you have a budget in mind? Have you considered what kind of software and outputs you would need?

Laser_Developer:
jicx,
This can definitely be done. Do you have a budget in mind? Have you considered what kind of software and outputs you would need?

At this moment, the project is only in the initial phase as yet. Therefore, I don’t mean that is in a strict sense, but as I wrote above I have been thinking to use Arduino, and it is also possible to use Processing, openFrameworks, Max, Kinect etc. if necessary. Concerning with the budget, I am not sure yet. Maybe maximum 1000$ ?

These is major criteria, though:

  1. It is very often not possible to hung a camera or Kinect on the ceiling. Otherwise, an organizer of festival does not allow us to set it up enough time.
  2. With the similar reasons, it is not possible to install many sensors on the stage. (If the ultrasound sensor has a very wide beam, it looks like it is possible.)
  3. The condition of light can largely change, such as sometimes a lot of lights, sometimes almost obscure. Thus, it does not work with a normal camera, but it is OK with an infrared camera or Kinect.
  4. For example, Mocap has many dots on a body of dancer. In this project, it is not possible to have anything like this.

Thanks.

Someone suggested me to use 2 Kinects at once. Each one is connected with one computer. Instead of fixing it on the ceiling, these are placed on the ground. One is from the front, and another is from the side.
Each one detects only X axe and Y axe, without Z axe (since Kinect does not allow to detect an accurate depth). The two computers communicate with ex. OSC, and the combination of data would be X, Y and Z for the real space.

It is only the idea, though. I know it is not the scope of Arduino Forum, but any ideas or any suggestions?

OK, your price range looks reasonable.
It's possible to make a 2D position sensor based on one or two scanning lasers. Normally, these are very expensive devices, but keith1024 has been modifying SF02/F lasers to do area mapping Laser Measurement (SF02) Setup & Library - Sensors - Arduino Forum
It may be possible to place these in the back corners of the stage to provide a 2D map of anything on the stage area. I think that keith1024 is going to provide mapping software for the Arduino so I'm sure you could ask him to modify it for your application.

jicx:
Someone suggested me to use 2 Kinects at once. Each one is connected with one computer. Instead of fixing it on the ceiling, these are placed on the ground. One is from the front, and another is from the side.
Each one detects only X axe and Y axe, without Z axe (since Kinect does not allow to detect an accurate depth). The two computers communicate with ex. OSC, and the combination of data would be X, Y and Z for the real space.

It is only the idea, though. I know it is not the scope of Arduino Forum, but any ideas or any suggestions?

How about a normal webcam? We only need the position of the dancers' feet, so, instead of mounting the cameras at the ceiling, we only need to mount them high enough to see the whole stage (say 6 feet). The camera will probably see something like this:

  • The viewing angle skews the rectangular stage into a parallelogram.
  • We only need to concern ourselves with the dancers' feet (shown in green) and/or body center.
  • Instead of tracking absolute distance, we can figure out the ratio of distances from different sides of the stage.
  • We can track multiple dancers if needed.

If the camera is kept at 6 feet, it is likely that it will be unable to see the whole stage. In that case, some markers (shown in blue) can be used as references for distance/position. This way we can use multiple cameras to cover the stage. As a bonus, you also get a (crappy) recording of the dance!

Laser_Developer:
OK, your price range looks reasonable.
It's possible to make a 2D position sensor based on one or two scanning lasers. Normally, these are very expensive devices, but keith1024 has been modifying SF02/F lasers to do area mapping Laser Measurement (SF02) Setup & Library - Sensors - Arduino Forum
It may be possible to place these in the back corners of the stage to provide a 2D map of anything on the stage area. I think that keith1024 is going to provide mapping software for the Arduino so I'm sure you could ask him to modify it for your application.

Here is the reply from keith1024:

I have read through your thread though and I think I have a good picture in my head of what you'd like to achieve. I can see how you'd be interested in the SF02/F wide beam angle, and I can tell you that it is actually very directional. However, for what you are trying to do, I believe it is completely doable with two scanners (SF02/F) mounted in the back corners of the stage with their zero points at -45 and 45 degrees, they would then do a sweeping scan, driven by a servo, that covers 0 to 90 degrees (so the entire stage), and I think this would give a good symmetrical view of the area.

Experiments with the SF02/F have shown that we are able to pick up an ~2cm wide object, in a 90 degree scan done over ~1 second. I think if the target is something as wide as a person, it'd be possible to perform the 90 degree scan in even less than 1 second.

It is a fantastic idea!

utkarsh:
How about a normal webcam? We only need the position of the dancers' feet, so, instead of mounting the cameras at the ceiling, we only need to mount them high enough to see the whole stage (say 6 feet). The camera will probably see something like this:

  • The viewing angle skews the rectangular stage into a parallelogram.
  • We only need to concern ourselves with the dancers' feet (shown in green) and/or body center.
  • Instead of tracking absolute distance, we can figure out the ratio of distances from different sides of the stage.
  • We can track multiple dancers if needed.

If the camera is kept at 6 feet, it is likely that it will be unable to see the whole stage. In that case, some markers (shown in blue) can be used as references for distance/position. This way we can use multiple cameras to cover the stage. As a bonus, you also get a (crappy) recording of the dance!

I agree!
The only thing is that we cannot use a webcam due to the condition of light.

jicx:
I agree!
The only thing is that we cannot use a webcam due to the condition of light.

It depends on the camera, but typically cameras will work with infrared illumination. Your audience would not see that infrared light. If you have a webcam try pointing a TV remote at it and see if you can detect its light.

Hi jicx

I've just posted an update containing our initial experiment with tracking with the SF02/F and it's results.

http://forum.arduino.cc/index.php?topic=233699.0

I thought you may find it interesting. :slight_smile: