学习使用turtlebot2——ROS上安装turtlebot2
安装环境:
安装Ubuntu 14.04版本和ROS Indigo
参考:http://wiki.ros.org/turtlebot/Tutorials
安装步骤
有两种安装方法,一种直接的安装命令,另外一种源码编译安装,区别在于:直接安装命令是安装在电脑默认路径/opt/ros/indigo/share里面不便于更改代码,因为默认路径下文件一般有访问权限,无法直接更改,需要使用sudo chmod -R 777 /opt更改其权限,使得每个使用的人都可以更改;源码编译,安装的文件在Home主目录中,方便更改。
1、直接安装命令
sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator ros-indigo-kobuki-ftdi ros-indigo-rocon-remocon ros-indigo-rocon-qt-library ros-indigo-ar-track-alvar-msgs
2、源码方式安装
1)先安装依赖项
sudo apt-get install python-rosdep python-wstool ros-indigo-ros
sudo rosdep init
rosdep update
2)建立Turtlebot工作空间
#创建三个文件夹,分别存放rocon、kobuki、turtlebot,复制相应的代码、设置文件所在路径工作环境、编译 mkdir ~/rocon cd ~/rocon wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/indigo/rocon.rosinstall source /opt/ros/indigo/setup.bash rosdep install --from-paths src -i -y catkin_make mkdir ~/kobuki cd ~/kobuki wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/kobuki.rosinstall source ~/rocon/devel/setup.bash rosdep install --from-paths src -i -y catkin_make mkdir ~/turtlebot cd ~/turtlebot wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/master/rosinstalls/indigo/turtlebot.rosinstall source ~/kobuki/devel/setup.bash rosdep install --from-paths src -i -y catkin_make
安装完成后,测试命令:
roslaunch turtlebot_bringup minimal.launch
如果正常可以看到以下界面
fjx@giimbot:~$ roslaunch turtlebot_bringup minimal.launch
... logging to /home/fjx/.ros/log/e9549e36-850f-11e8-ab48-543530c06929/roslaunch-giimbot-19656.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://giimbot:36504/
SUMMARY
========
PARAMETERS
* /app_manager/auto_rapp_installation: False
* /app_manager/auto_start_rapp:
...........(中间省略)
process[interactions-12]: started with pid [19769]
process[zeroconf/zeroconf-13]: started with pid [19781]
[ INFO] [1531316403.920700304]: Zeroconf: service successfully established [turtlebot][_ros-master._tcp][11311]