To get it working on the Pi I took the I2C and MPU6050 code from https://github.com/jrowberg/i2cdevlib and modified the I2C class to use the Linux in-kernel I2C drivers rather than the Arduino drivers. There are drivers for many sensors on that site, which I imagine can easily be used on the Pi via my replacement I2C class. This is C++ code, btw.
'make' builds three demo programs; one displays raw data from the MPU6050, and another displays more useful data (angle of rotation, rotation matrix, quaternion, Euler Angle, for example) using the on-chip DMP to do the processing. The third demo draws a simple 3D wireframe model on the screen and lets you rotate it on all three axes by manipulating an MPU6050 that is hooked up to your Pi. If you don't have an MPU6050 you can even 'make test_3d' and manipulate the model using the keyboard

A tarball of the code is attached: Enjoy,
Richard