Baxter学习笔记2-Kinect摄像头驱动安装篇
2016-09-12 22:34
477 查看
1: Install ROS
参考ROS官网sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt sources.list.d/ros-latest.list' sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116 sudo apt-get update sudo apt-get install ros-indigo-desktop-full sudo rosdep init rosdep update echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc source ~/.bashrc sudo apt-get install python-rosinstall
然后创建工作空间:
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace cd .. catkin_make
2: Install OpenKinect/libfreenect2
2.1 Prerequisite
git clone https://github.com/OpenKinect/libfreenect2.git cd libfreenect2 cd depends; ./download_debs_trusty.sh sudo apt-get install build-essential cmake pkg-config
2.2 Install libusb must be >= 1.0.20
sudo dpkg -i debs/libusb*deb
Install TurboJPEG
sudo apt-get install libturbojpeg libjpeg-turbo8-dev
2.3 Install OpenGL
sudo dpkg -i debs/libglfw3*deb sudo apt-get install -f sudo apt-get install libgl1-mesa-dri-lts-vivid
The thrid command would be not right:
1: If the last command conflicts with other packages, don’t do it
2: If get the error info: ‘No rule to make target /usr/lib/x86_64-linux-gnu/libGL.so’
we should build the link to the libGL.so: locate the libGL.so we know 'libGL.so' is in the '/usr/lib/x86_64-linux-gnu' sudo ln -s libGL.so.1.0.0 libGL.so (which libGL.so.1.0.0 is not the link)
sudo apt-add-repository ppa:floe/beignet sudo apt-get update sudo apt-get install beignet-dev sudo dpkg -i debs/ocl-icd*deb
2.4 Install Nvidia driver
1: Download the Nvidia driver in right version (NVIDIA GeForce GTX1080)从这里下载
2: Edit the blacklist.conf:
sudo gedit /etc/modprobe.d/blacklist.conf add : blacklist vga16fb blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv __block_line__
3: sudo apt-get remove –purge nvidia-*
sudo apt-get remove –purge xserver-xorg-video-nouveau
4: reboot and into computer using ‘Ctrl+ALT+F1’ using the ‘Ctrl+ALT+F7’ return xservers
5: sudo /etc/init.d/gdm stop or sudo /etc/init.d/lightdm stop
6: in the driver file,which downloaded in step 1
sudo sh __NVIDIA.run__
7: sudo /etc/init.d/gdm restart or sudo /etc/init.d/lightdm restart
8: sudo reboot
9: maybe we should sudo apt-get install mesa-utils
http://blog.163.com/zhao_en_peng/blog/static/12740422420131202110539/
2.5 Install CUDA (optional)
1: Download the cuda 7.5 from the cuda_driverIMPORTANCE:download .runfile
2: reboot and ctrl+alt+F1
sudo /etc/init.d/lightdm stop
3: sudo sh cuda.run
IMPORTANCE:ALL SHOULD INSTALL EXCEPT:DRIVER(because we have installed the nvidia driver and the cuda.runfile don’t include the nvidia driver)
4: sudo /etc/init.d/lightdm restart and reboot
http://www.cnblogs.com/GingerZeng/p/5709032.htm
2.6 Install VAAPI (optional)
sudo dpkg -i debs/{libva,i965}*deb sudo apt-get install -f
2.7 Install OpenNI2 (optional)
sudo apt-add-repository ppa:deb-rob/ros-trusty && sudo apt-get update(You don't need this if you have ROS repos) sudo apt-get install libopenni2-dev
2.8 Build the libfreenect2
cd ..mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2 -DENABLE_CXX11=ON
make
make install
NOTE:CMAKE_INSTALL_PREFIX=’$HOME/freenect2’ the install position will be used later
3: Using the kinect2
1 : sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/2 : run the demo :
./bin/Protonect( in the build folder )
4: Using the kinect in ros
accoding this linkaccoding this link
4.1 install the iai-kinect2
cd ~/catkin_ws/src/ git clone https://github.com/code-iai/iai_kinect2.git cd iai_kinect2 rosdep install -r --from-paths . cd ~/catkin_ws catkin_make -DCMAKE_BUILD_TYPE="Release" -Dfreenect2_DIR=path_to_freenect2/lib/cmake/freenect2 __NOTE:the <path_to_freenect2>is the '$HOME/freenect2' just setting before building the libfreenect2__
4.2 get the image in the ros topic
roslaunch kinect2_bridge kinect2_bridge.launch rosrun kinect2_viewer kinect2_viewer sd cloud (we can use 'rostopic list' to get the note publish topic about the kinect )
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- Ubuntu Linux使用体验
- Kinect结合Unity3D引擎开发体感游戏(一)
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Ubuntu 12.04和Windows 7双系统安装图解
- Ubuntu /home下中文目录如何修改成英文?
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?
- 100 个最佳 Ubuntu 应用(中)