Show pageOld revisionsBacklinksAdd to bookExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Kinect ====== ===== device ===== /etc/udev/rules.d/90-kinect2.rules <code> # ATTR{product}=="Kinect2" SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c4", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d8", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d9", MODE="0666" </code> <code bash> sudo udevadm control --reload </code> On Ubuntu avoid autosuspend of USB. Add usbcore.autosuspend=-1 to grub options <code bash> # check with grep . /sys/bus/usb/devices/*/power/autosuspend </code> To connect kinect I have to use proper USB 3.0 chipset like [[http://www.amazon.it/dp/B00NLD15VQ/ref=sr_ph?ie=UTF8&qid=1430917762&sr=1&keywords=usb+3.0+pci|this]] <code> USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller </code> ===== OpenCL ===== <code bash> sudo apt-get install beignet beignet-dev opencl-headers </code> ===== libfreenect2 for CUDA ===== * [[http://jetsonhacks.com/2015/02/23/kinect-v2-with-libfreenect2/|...leggi]] <code bash> git clone https://github.com/xlz/libfreenect2.git sudo apt-get install -y build-essential libturbojpeg libtool autoconf libudev-dev cmake mesa-common-dev freeglut3-dev libxrandr-dev doxygen libxi-dev libjpeg-turbo8-dev cd libfreenect2/depends cp -r $path_of_gstjpeg_src/nv_headers . sh install_ubuntu.sh sudo ln -s /usr/lib/arm-linux-gnueabihf/libturbojpeg.so.0.0.0 /usr/lib/arm-linux-gnueabihf/libturbojpeg.so cd ../examples/protonect/ mkdir build && cd build cmake .. make ../bin/Protonect </code> MAX_ISO_BUFFER_LENGTH in usbfs.h caused issues. In the published version, the size is 49152 * 128, the mPCIe card/Jetson didn't like that, but works when the size is **49152**. ===== libfreenect2 ===== <code bash> cd /lab/kinect sudo apt-get install -y build-essential libturbojpeg libtool autoconf libudev-dev cmake \ freeglut3-dev libxrandr-dev doxygen libxi-dev libopencv-dev sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so git clone https://github.com/OpenKinect/libfreenect2 cd libfreenect2/depends ./install_ubuntu.sh cd ../examples/protonect cmake -DENABLE_CXX11=ON make && sudo make install </code> Patch to avoid black screen <code> For example in Protonect.cpp: add an include after line 37 #include <libfreenect2/packet_pipeline.h> change line 61 from libfreenect2::Freenect2Device *dev = freenect2.openDefaultDevice(); to libfreenect2::Freenect2Device *dev = freenect2.openDefaultDevice(new libfreenect2::CpuPacketPipeline()); </code> ===== References ===== * http://www.morethantechnical.com/2012/12/07/resampling-smoothing-and-interest-points-of-curves-via-css-in-opencv-w-code/ * http://tiku.io/questions/1242558/matplotlib-contour-from-xyz-data-griddata-invalid-index ===== ROS ===== ==== Ubuntu 14.04 ==== <code bash> sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add - sudo apt-get update </code> <code bash> sudo apt-get install ros-indigo-desktop-full </code> initialization <code> sudo rosdep init rosdep update </code> activate on working shell <code bash> echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc source ~/.bashrc </code> create workspace <code bash> mkdir -p /lab/catkin_ws/src cd /lab/catkin_ws/src catkin_init_workspace cd .. catkin_make </code> ====== iai_kinect2 ====== <code bash> cd /lab/catkin_ws/src git clone https://github.com/code-iai/iai_kinect2.git cd iai_kinect2 rosdep install -r --from-paths . cd /lab/catkin_ws catkin_make -DCMAKE_BUILD_TYPE="Release" </code> tips/sensors/kinectv2.txt Last modified: 2015/05/09 08:06by scipio