# Wiimote Project

### Author Topic: How can we get translation of the Wiimote (velocity/Position)  (Read 16889 times)

#### JayAr

• Posts: 13
• Karma: +0/-0
on: June 25, 2010, 08:29:14 AM
Hi,
I'm using GlovePie with the Wiimote and MotionPlus.
With GlovePie it is easy to get the Rotational Speed (Pitch/Yaw/Roll) in any of the 3 Axes and therefore the Orientation of the Wiimote.

However is it also possible to get or calculate the Velocity in X/Y or Z when moving the Wiimote linear (without Rotation). With this Velocity I could calculate the translation/position of the Wiimote.
I tried to calculate the Velocity from the Acceleration (in Glovepie the Acceleration is called Wiimote.RelAccX for X Acceleration without gravity), but I couldnt really manage to get the velocity from it.
I guess this is a lot harder to do, than to get the Velocity of Rotation from the Gyrosensors, since gravity messes everything up and once there are small errors the velocity doesn't go back to zero when the Wiimote stops. Also the accelerometers for X/Y/Z also react when the Wiimote is just rotating, which also messes everything up.

So could you please tell me if its not possible at all? However in this video (http://www.youtube.com/watch?v=acND4sO3pJs) it seems that AILive have nailed it, since they are showing real 1:1 movement somehow. The sword can be stabbed forward for example. So somehow they must be able to calculate the position of the Wiimote with Orientation and Translation. I can only get Orientation at the moment.

Thanks!

P.S.: By the way I tried using the simple formula

v(t) = v0 + a*t

which should work for constant acceleration, but I thought it should work for changing acceleration also when it calculates 100 times per second.
« Last Edit: June 25, 2010, 08:32:49 AM by JayAr »

#### boonjin

• Posts: 929
• Karma: +28/-0
• Smoothboard Developer
Reply #1 on: June 25, 2010, 09:27:17 AM
Hi,

If you are assuming constant acceleration, you may calculate the linear position. However, in a real world case, the acceleration may not be constant and you will have difficulties tracking.

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url

#### JayAr

• Posts: 13
• Karma: +0/-0
Reply #2 on: July 07, 2010, 07:08:57 AM
I guess that as soon as there are errors, the errors accumulate and get worse over time, so maybe the accelerometers are not accurate enough for calculation of the translation.

I wonder if we can can get the translation with the sensorbar (IR-Tracking) like in this video from Johnny Chung Lee, where he dows headtracking:

I havent used the sensorbar with Glovepie yet.

#### boonjin

• Posts: 929
• Karma: +28/-0
• Smoothboard Developer
Reply #3 on: July 07, 2010, 07:46:59 AM
Hi,

Yeah, you can use a sensor bar but that is assuming the orientation of the sensor bar is always fixed.

You may want to try using two Wiimotes to get 3D coordinates of the point you are tracking.

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url

#### JayAr

• Posts: 13
• Karma: +0/-0
Reply #4 on: July 08, 2010, 06:44:56 PM
Hi,

Yeah, you can use a sensor bar but that is assuming the orientation of the sensor bar is always fixed.

You may want to try using two Wiimotes to get 3D coordinates of the point you are tracking.

Regards,
Boon Jin
Yes I also thought putting one Wiimote on the desk and use it to track the other Wiimote and putting two Infrared Lights on the Wiimote which I move around. But then the orientation of the "Sensor Bar" is not fixed. But why should it be fixed anyway?

#### boonjin

• Posts: 929
• Karma: +28/-0
• Smoothboard Developer
Reply #5 on: July 08, 2010, 07:30:42 PM
Hi,

I actually meant to use two Wiimotes to track a single IR LED to get a stereo vision setup.

With this, you will get the 3D coordinates of the point.

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url

#### JayAr

• Posts: 13
• Karma: +0/-0
Reply #6 on: July 09, 2010, 05:40:45 AM
Ok, but then in my case I would use 2 Wiimotes to track and one to move around (because I still want the orientation), and on this Wiimote I put an IR LED, so then I would use 3 Wiimotes.

So is it not possible to track the translation of two infrared LEDs with one Wiimote, like in the headtracking video?

#### boonjin

• Posts: 929
• Karma: +28/-0
• Smoothboard Developer
Reply #7 on: July 09, 2010, 10:29:40 AM
Ok, but then in my case I would use 2 Wiimotes to track and one to move around (because I still want the orientation), and on this Wiimote I put an IR LED, so then I would use 3 Wiimotes.

So is it not possible to track the translation of two infrared LEDs with one Wiimote, like in the headtracking video?

You can use one Wiimote for tracking if the orientation of the two infrared LEDs are fixed like in the video. If the points are rotated, you will not be able to get the depth correctly.

The headtracking works as the user is assumed to be always facing the screen.

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url

#### JayAr

• Posts: 13
• Karma: +0/-0
Reply #8 on: July 12, 2010, 06:21:08 AM
Ok that makes a lot of sense. Thanks for answers, I will look into finger and headtracking more and see what fits best for me. I guess the 2 Wiimote / 1 LED-Tracking is the way to go.