Commit graph

87 commits

Author SHA1 Message Date
Andrzej Kapolka
55a010a1a0 And also, close the file descriptor and print a message. 2013-08-07 18:02:38 -07:00
Andrzej Kapolka
f171b76f69 Fix for gyros' freaking out when disconnected. 2013-08-07 17:54:02 -07:00
Stephen Birarda
1b48d4f0fc revert removal of extraneous newlines 2013-07-16 12:46:32 -07:00
Stephen Birarda
89d3cfdb6f remove now extraneous newlines after switch to QDebug 2013-07-16 11:16:51 -07:00
Stephen Birarda
afe49bc756 switch calls to printLog to QDebug 2013-07-16 11:07:22 -07:00
Andrzej Kapolka
4e524d7125 Compass tweaks: better initial extents, scale extents to compensate for
anisotropy, converge more quickly on compass heading.
2013-07-11 12:10:15 -07:00
Andrzej Kapolka
559dc4bb5d Flush the queue so that we don't get any funny data on the initial read. 2013-07-10 15:07:39 -07:00
Andrzej Kapolka
6a5fb4f535 Removed unused variables, added motion driver library for OS X. 2013-07-10 14:28:06 -07:00
Andrzej Kapolka
6fe9a71868 Basic compass fusion. 2013-07-10 14:06:12 -07:00
Andrzej Kapolka
a116f5a636 Use InvenSense code to handle the rather complicated business of talking the
sensor into giving us the compass reading.  We're getting it now, but I still
have to figure out how to incorporate it.
2013-07-09 17:28:23 -07:00
Andrzej Kapolka
b660336b2a Fix for camera movement with webcam enabled; don't bother using roll from
webcam if we have the gyros; reinstate head orientation scaling; don't bother
using gyro position.
2013-07-02 16:59:03 -07:00
Andrzej Kapolka
3de76c9e15 Approach the webcam position rapidly. 2013-06-20 16:28:48 -07:00
Andrzej Kapolka
8cffaf7cc0 Fixed includes. 2013-06-20 16:09:24 -07:00
Andrzej Kapolka
7e34bef01e Attempt to fuse gyro readings with webcam data. 2013-06-20 16:07:33 -07:00
Andrzej Kapolka
b0dd5223e1 Avatar head roll/lean based on webcam data. 2013-06-20 14:20:03 -07:00
Andrzej Kapolka
648aacb53d Let's use a fixed vector for the camera position so that the target doesn't
move with lean.
2013-06-11 17:26:41 -07:00
Andrzej Kapolka
090df81afe Fixes to align better with previous code. 2013-06-11 15:58:50 -07:00
Andrzej Kapolka
e77aee3967 Show the average rotation rates, too. 2013-06-11 15:47:05 -07:00
Andrzej Kapolka
d913f8dec0 Actually, we want it sans gravity. 2013-06-11 14:25:05 -07:00
Andrzej Kapolka
4b890e2ccc Let's see what the long-term average acceleration is. 2013-06-11 14:23:47 -07:00
Andrzej Kapolka
47bd3bcdd7 Don't estimate acceleration before we know the gravity and don't update our
matrices without acceleration.
2013-06-11 14:03:49 -07:00
Andrzej Kapolka
b88380db6f New values, slower learning. 2013-06-11 13:43:29 -07:00
Andrzej Kapolka
5ba1d3a28c It ain't perfect, but I'm going with what I've got for now. 2013-06-11 13:18:13 -07:00
Andrzej Kapolka
517bbe80a7 Initial values, report error. 2013-06-11 13:02:20 -07:00
Andrzej Kapolka
ff9e6f831c Revert to previous coordinates. 2013-06-11 11:31:01 -07:00
Andrzej Kapolka
bf389de774 Testing a different coordinate conversion. 2013-06-11 11:22:43 -07:00
Andrzej Kapolka
73ceea7795 Working on "learning" the acceleration matrices. 2013-06-11 10:55:28 -07:00
Andrzej Kapolka
988c4f97b0 This should be the normalized offset. 2013-06-10 18:43:11 -07:00
Andrzej Kapolka
a34f9a0ef3 Need to include SharedUtil. 2013-06-10 18:41:49 -07:00
Andrzej Kapolka
90ef6a7cc0 Attempting to perform the transform between angular and linear acceleration. 2013-06-10 18:40:07 -07:00
Andrzej Kapolka
1b8683cbc5 Let's see if we can get an estimate of the distance to the sensor based on
the ratios between linear and angular velocity.
2013-06-10 15:22:53 -07:00
Andrzej Kapolka
5820c3c7c3 Remove average measurements, compute estimated acceleration (without rotated
gravity).
2013-06-10 14:49:39 -07:00
Andrzej Kapolka
e0e94481c9 Add pitch/yaw scale preference to control degree of view rotation. 2013-06-06 17:53:00 -07:00
Andrzej Kapolka
ffc1c33455 Removed double negation for coordinates, world aligned orientation -> camera
orientation, removed roll.
2013-06-06 17:25:52 -07:00
Andrzej Kapolka
0dbb5375db Approach the "down" direction more rapidly. 2013-06-06 15:50:14 -07:00
Andrzej Kapolka
a7c265d017 More compiley. 2013-06-06 15:44:38 -07:00
Andrzej Kapolka
ba6f2307ba Coordinate fix. 2013-06-06 15:43:26 -07:00
Andrzej Kapolka
081f193db8 Add back yaw decay the quaternion way. 2013-06-06 14:34:28 -07:00
Andrzej Kapolka
d87e165b06 Acceleration is presumably relative to the current orientation. 2013-06-06 14:08:53 -07:00
Andrzej Kapolka
9afb1b3338 Enhanced workiness. 2013-06-06 13:09:00 -07:00
Andrzej Kapolka
f04e45b7c1 Use quaternions for rotation estimates. 2013-06-06 12:07:34 -07:00
Andrzej Kapolka
14f331b07d Scratch that; need to do this in a branch. 2013-06-06 12:05:52 -07:00
Andrzej Kapolka
a851499684 Rework rotation estimation bits to use quaternions. 2013-06-06 12:03:50 -07:00
Philip Rosedale
61d4ac2675 Fixes per code review. 2013-06-06 09:52:39 -07:00
Philip Rosedale
24dcd14371 Added sensor fusion for more stable gyro roll, pitch. 2013-06-05 23:53:01 -07:00
Philip Rosedale
69ec109585 Refactor/Cleanup serial interface to use vectors, correct rotation axes. Added translation estimation for the head. 2013-05-31 15:28:15 -07:00
Philip Rosedale
17c898c151 Long term averaging of the gyros for better stability 2013-05-24 11:33:00 -07:00
Stephen Birarda
d7a1cc6ea8 correct the sign for yaw and roll for invensense serial data 2013-05-22 19:38:17 -07:00
Philip Rosedale
1b039c3755 Transmitter V2 drives the hand, and rendering levels with 'l' shows the hand transmitter data. Physics will need to be tuned. 2013-05-16 00:10:10 -06:00
Philip Rosedale
6b85d93aee Simplified serial port init to not use baud. 2013-05-13 18:52:43 -07:00