安装依赖和更新
sudo apt-get install python-rosdep python-wstool
sudo rosdep init
rosdep update
分别建立三个工作空间rocon,kobuki,turtlebot,下载和编译源码
建立rocon目录,下载和编译,rocon都有对应的kinetic版本
mkdir ~/rocon
cd ~/rocon
wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/kinetic/rocon.rosinstall
source /opt/ros/kinetic/setup.bash
rosdep install --from-paths src -i -y
catkin_make
如果wstool更新失败,可以重新更新:
wstool update -t src
建立kobuki目录,下载和编译.
kobuki使用kinetic的版本下载会失败,先用indigo版本生成下载的rosinstall文件,再修改对应包为kinetic版本
mkdir ~/kobuki
cd ~/kobuki
wget https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall
gedit kobuki.rosinstall #将内容修改为下面kobuki.rosinstall文件的内容
wstool init src -j5 kobuki.rosinstall
source ~/rocon/devel/setup.bash
rosdep install --from-paths src -i -y
catkin_mak
kobuki.rosinstall文件
- git: {local-name: yocs_msgs, version: release/0.6-kinetic, uri: 'https://github.com/yujinrobot/yocs_msgs.git'}
- git: {local-name: yujin_ocs, version: kinetic, uri: 'https://github.com/yujinrobot/yujin_ocs.git'}
- git: {local-name: kobuki_msgs, version: kinetic, uri: 'https://github.com/yujinrobot/kobuki_msgs.git'}
- git: {local-name: kobuki_core, version: kinetic, uri: 'https://github.com/yujinrobot/kobuki_core.git'}
- git: {local-name: kobuki, version: kinetic, uri: 'https://github.com/yujinrobot/kobuki.git'}
- git: {local-name: kobuki_desktop, version: kinetic, uri: 'https://github.com/yujinrobot/kobuki_desktop.git'}
建立turtlebot目录,下载和编译.
turtlebot使用kinetic的版本下载会失败,先用indigo版本生成下载的rosinstall文件,再修改对应包为kinetic版本,没有kinetic版本的保持为indigo版本
mkdir ~/turtlebot
cd ~/turtlebot
wget https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall
gedit turtlebot.rosinstall #将文件修改为下面turtlebot.rosinstall文件的内容
wstool init src -j5 turtlebot.rosinstall
source ~/kobuki/devel/setup.bash
rosdep install --from-paths src -i -y
catkin_make
turtlebot.rosinstall文件
- git: {local-name: turtlebot_msgs, version: indigo, uri: 'https://github.com/turtlebot/turtlebot_msgs.git'}
- git: {local-name: turtlebot_create, version: indigo, uri: 'https://github.com/turtlebot/turtlebot_create.git'}
- git: {local-name: turtlebot, version: kinetic, uri: 'https://github.com/turtlebot/turtlebot.git'}
- git: {local-name: turtlebot_apps, version: indigo, uri: 'https://github.com/turtlebot/turtlebot_apps.git'}
- git: {local-name: turtlebot_interactions, version: indigo, uri: 'https://github.com/turtlebot/turtlebot_interactions.git'}
- git: {local-name: turtlebot_simulator, version: indigo, uri: 'https://github.com/turtlebot/turtlebot_simulator.git'}
- git: {local-name: turtlebot_create_desktop, version: kinetic, uri: 'https://github.com/turtlebot/turtlebot_create_desktop.git'}
添加环境变量
source ~/turtlebot_ws/devel/setup.bash
安装kinetic驱动
sudo apt-get install ros-kinetic-openni-* ros-kinetic-openni2-* ros-kinetic-freenect-*
安装openni
sudo apt-get install ros-kinetic-openni-* ros-kinetic-openni2-*
rospack profile
下面的操作连接上设备进行
生成kobuki别名
rosrun kobuki_ftdi create_udev_rules
检查别名:
输入检测命令:
ls /dev/kobuki
会显示有对应的设备/dev/kobuki,前提是电脑连接设备了
设置环境变量
echo $TURTLEBOT_3D_SENSOR
#Output: kinect
如果你看到一个3D传感器,例如asus_xtion_pro,您将需要设置环境变量的默认值,修改和重新启动终端:
echo "export TURTLEBOT_3D_SENSOR=kinect" >> .bashrc
完成