[ros-users] accelerometer and tilt support + depth function

Oliver Kreylos kreylos at cs.ucdavis.edu
Tue Nov 16 17:30:31 UTC 2010

On 11/16/2010 08:49 AM, garratt wrote:
> Has anyone gotten the accelerometer to work for the Kinect?
> Stéphane, I have your code (referenced below) with the accelerometer
> support, but libusb_control_transfer segfaults whenever I run acc_get.
> I noticed that Oliver Kreylos's code calls read control with the
> following parameters:
>   dataSize=readControl(0x40,0x32,0x0000,0x0000,data,sizeof(data));

Hi Garratt,

sorry for causing confusion. My libusb wrapper code has separate 
readControl and writeControl functions because I dislike the idea of 
using a bit flag to switch between read and write in libusb. As a side 
effect, my readControl function sets bit 7 on the read mask itself to 
make it transparent to the user; in other words, when I call 
readControl(0x40,...) libusb actually sees 0xC0 for the first parameter. 
So my code is in line with the other code you reference.

I obviously should have documented that better.

I know that my accelerometer code works otherwise; I've played around 
with them for a bit.


       __        Dr. Oliver Kreylos
      / /\       Institute for Data Analysis and Visualization (IDAV)
     / /  \      University of California
    / / /\ \     One Shields Avenue
   / / /\ \ \    Davis, CA 95616, USA
  / /_/__\ \ \   Phone: +1 (530) 754-9470
/________\ \ \  Email: kreylos at cs.ucdavis.edu
\___________\/  WWW  : http://idav.ucdavis.edu/~okreylos/ResDev

More information about the ros-users mailing list