ros 安装及基础学习
2017-12-03 20:29
316 查看
安装网址(ubuntu 16.04):
http://wiki.ros.org/kinetic/Installation/Ubuntu 安装问题: * Could not resolve 'cn.archive.ubuntu.com' 解决: * sudo gedit /etc/hosts * 末尾添加: 91.189.88.149 archive.ubuntu.com 91.189.88,149 security.ubuntu.com 202.118.1.64 cn.archive.ubuntu.com * /etc/init.d/networking restart * snapd is not configured yet 解决: * 先到 /etc/apt/sources.list更新sources.list,执行sources.list问题的所有命令 * https://www.ubuntuupdates.org/package/core/xenial/main/proposed/snapd * 网页中: apt重新下载安装 即可 * 如果再次安装 ros kinetic出错,那你需要执行以下命令: http://blog.csdn.net/heray1990/article/details/47803541 链接中第19行说要执行:sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/,但是我发现/var/lib/dpkg/info/是个空文件夹,所以没执行19-21的命令,执行运行安装ros kinetic的命令,完美安装完毕 * sources.list问题: 解决: * 更新命令: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo gedit /etc/apt/sources.list , 然后复制文末souces.lists内容到sources.lists内 sudo apt update * 在文末
ros官方网站:
http://www.ros.org/ http://wiki.ros.org/cn
学习博客:
由浅到深理解ROSP: http://www.cnblogs.com/zjiaxing/p/5541733.html
基础学习:
运行catkin_make命令一定要在workspace文件夹下;创建完workspace文件夹后,就有必要将此目录添加到ROS_PACKAGE_PATH
echo “export ROS_PACKAGE_PATH=~/dev/catkin_ws:${ROS_PACKAGE_PATH}” >> ~/.bashrc
~/.bashrc
修改CMakeLists:
查看package.xml, 确保它包含一下两条语句:
message_generation
message_runtime
注意,在构建的时候,我们只需要”message_generation”。然而,在运行的时候,我们只需要”message_runtime”。
Do not just add this line to your CMakeLists.txt, modify the existing line
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation)
catkin_package(
…
CATKIN_DEPENDS message_runtime …
…)
add_message_files(
FILES
Num.msg
)
add_service_files(
FILES
AddTwoInts.srv
)
generate_messages(
DEPENDENCIES
std_msgs
)
In your catkin workspace
$ catkin_make
运行py文件:
Don’t forget to make the node executable:
chmod +x scripts/add_two_ints_client.py
In your catkin workspace
cd ~/catkin_ws
catkin_make
cd ~/catkin_ws
. devel/setup.bash
rosrun package node
sources.list 文件:
# deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://mirrors.aliyun.com/ubuntu/ xenial universe # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
相关文章推荐
- Linux学习手札(二):安装Linux的基础知识
- nginx+PHP服务器环境安装与配置学习(一) - windows系统基础环境搭建
- Hadoop学习笔记(一):零Linux基础安装hadoop过程笔记
- Mongo 基础学习系列 一 Linux下Mongo安装
- ROS学习(十七)安装ARDUINO IDE使用rosserial
- 【MongoDB安装和基础学习系列】
- Oracle基础学习一:安装Oracle9i Database及Client 认识相关工具
- MEMO:Sphinx学习笔记——安装与使用入门(+在ROS中的使用)
- MongoDB的使用学习之(三)安装MongoDB以及一些基础操作
- 学习 Eclipse基础--使用links方式安装Eclipse插件
- Oracle基础学习1--Oracle安装
- [原]零基础学习视频解码之安装ffmpeg
- java语言学习003_开发环境基础配置和安装(jdk,jre,eclipse&myeclipse)
- VMware从零开始学习之01 ESXI 5.5基础安装与网络配置
- 我的LINUX学习之路之十二之批量网络安装不同版本Linux之基础篇
- hadoop学习笔记——基础知识及安装
- Android基础学习-----安装apk文件到Android模拟器(四)
- maven基础学习(二)-简单实例(编译-打包-安装)
- ROS安装学习