Wiimote Project » General Category » General Discussion » Confused IR Tracking
: [1]
: Confused IR Tracking  ( 5780 )
0 and 1 Guest are viewing this topic.
Karma: +0/-0
: 1
Offline Offline
« : February 28, 2008, 08:28:48 AM »

Hi guys,

I'm just wondering if anyone has ever experienced problems with IR tracking before. The problem I am having is that if the remote loses sight of the sensor bar it sometimes seems to forget which IR light is which -and so the polarity is reversed. This obviously makes my project operate in reverse. Has anyone experienced this and found an easy way to stop it from happening?


Karma: +0/-0
: 8
Offline Offline
« #1 : June 01, 2008, 05:20:47 PM »


this is my first day playing with the Wiimote after i found Johnny's site and his impressive video tutrials.
I dont even own a Wii (and tbh i doubt i'll get one anytime soon) but I was looking for sensor capable of the ones used in the Wiimote for a long time already for various project ideas.
Soon after getting it to work on my notebook and creating my first TrackIR replacement using the IR camera instead of the accelermeters i noticed the same behaviour.
It seems like the camera enumerates the ir dots continuosly, which makes precise tracking usng more than one IR source more complicated (although there's IMO no better way unless you use e.g. modulated light).

The most promising way to avoid this problem probably is to create a toplevel loop that continuously checks for existance of dots (e.g. if using GlovePIE with code like "if wiimote.dot2vis then...", and whenever you count more than one dot you enumerate the result on your own.
depending on how your led arrangment you could e.g. do that horizontally or vertically based on the dot1x/dot1y value which would probably look somehow like

if wiimote.dot2vis then
 if wiimote.dot1x < wiimote.dot2x then
  var.leftled = wiimote.dot1x
  var.rightled = wiimote.dot2x
  var.leftled = wiimote.dot2x
  var.rightled = wiimote.dot1x
 <decide what to do if you lost a dot>

this is just a thought and not actually taken from a working example but generally it should work.
btw. this one would do a horizontal sort, the decision which dot is left or right would depend on your Wiimote setup (placed towards the user or away from him).

the same scheme should be easily adoptable to any other api.

let me know what you think about it.
: [1]

Clicky Web Analytics