Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » General Category » General Discussion » Confused IR Tracking
Pages: [1]
  Print  
Author Topic: Confused IR Tracking  (Read 3085 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile Email
« on: February 28, 2008, 05:28:48 PM »

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?

Cheers

Andy
Logged
*
Karma: +0/-0
Posts: 8
Offline Offline
View Profile
« Reply #1 on: June 02, 2008, 02:20:47 AM »

Hi,

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
 else
  var.leftled = wiimote.dot2x
  var.rightled = wiimote.dot1x
 endif
else
 <decide what to do if you lost a dot>
endlif

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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Clicky Web Analytics