turtlebot移动机器人(03):turtlebot-indigo Packages

需要先完成ROS环境配置: 机器人操作系统ROS(03):ROS-Indigo安装 。

需要先完成网络环境配置: 智能机器人(04):通用网络配置 。

如果需要需要先完成网络环境配置: turtlebot移动机器人(05):turtlebot-kobuki和Kinect 。

1、Turtlebot的主机配置

Ubuntu 14.04.4:
Indigo:

1、Configure Ubuntu repositories
设置software sources允许”restricted,” “universe,” and “multiverse”。
2、Setup sources.list
$ sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’
3、Set up keys
$ sudo apt-key adv –keyserver ‘hkp://keyserver.ubuntu.com:80’ –recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4、make sure Debian package is up-to-date
$ sudo apt-get update  && sudo apt-get install dpkg
5、安装 Desktop-Full
$ sudo apt-get install ros-indigo-desktop-full
6、Initialize
$ sudo rosdep init
$ rosdep update
7、设置环境变量
检查ROS_ROOT和ROS_PACKAGE_PATH路径是否设置:
$ printenv | grep ROS
如果未设置则刷新环境:
$ source /opt/ros/indigo/setup.bash
为了方便可以直接加入到bashrc:
$ echo “source /opt/ros/indigo/setup.bash” >> ~/.bashrc
$ source ~/.bashrc (If have more than one ROS distribution, ~/.bashrc must only source the setup.bash for the version you using.)
8、安装 rosinstall
$ sudo apt-get install python-rosinstall
(rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables you to easily download many source trees for ROS packages with one command.)

9、安装TurtleBot相关的Package

$ sudo apt-get update
$ 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
(apt-get update, if you find any errors)

5 upgraded, 201 newly installed, 0 to remove and 412 not upgraded.
Need to get 45.4 MB of archives.
After this operation, 310 MB of additional disk space will be used.

10、catkin工作区

11、网络设置

12、开启ssh服务
$ sudo service ssh status
如果不存在则安装:
$ sudo apt-get install openssh-server

2、Turtlebot的客户机系统配置

1、安装Ubuntu操作系统相同。
2、安装ROS的ros-indigo-desktop-full installation。
3、设置网络:
二、两台的时间同步-Network Time Protocol

对于Turtle和Workstation的时间。
Clock synchronization is important for ROS.
Chrony has been found to be the best ntp client over lossy wireless. In case of robot behaves strange when messages are sent from workstation application(like rviz, rqt, or ros node running in PC), you need clock synchronization.
再例如,在坐标变换出现错误TF complaining about extrapolation into the future时,首先要考虑不同机器之间的时间矛盾:
$ntpdate -q other_computer_ip
必要的话,就安转chrony统一时间。
1. Check one machine against another machine:
$ ntpdate -q other_computer_ip
2. Install Chrony:
$ sudo apt-get install chrony
3. For instance computer c2 gets its time from computer c1 then add following line:
$ sudo /etc/chrony/chrony.conf
server c1 minpoll 0 maxpoll 5 maxdelay .05
4. That machine will then slowly move its time towards the server.
$ sudo /etc/init.d/chrony stop
$ ntpdate other_computer_ip
$ sudo /etc/init.d/chrony start
5. manually sync NTP
$ sudo ntpdate ntp.ubuntu.com

0 回复

发表评论

Want to join the discussion?
Feel free to contribute!

发表评论