经验分享

ROS安装的注意事项

1 1258
四天超过30个小时的尝试,借助lemaker的资料和ros的论坛,终于配置好ros.
必须的几个步骤:
  1.系统扩容
  编译ros的过程中会消耗大量内存,编译失败往往是由于内存不足导致的(至少10次编译到最后内存变为0byte,)此处必须用16G内存卡,(32G,和64G镜挂载不稳定,容易奔溃)
  用16G卡装载镜像后,发现free space只有1.5G,使用下列语句拓展容量。
  sudo parted /dev/mmcblk0 #mmcblk0 represent SD card or eMMC
...
(parted) print
...
(parted) resizepart #Resize partition
Partition number? 2 #Select partition 2
End? [3670MB]? -1 #Resize to the end
(parted) print #List partitons
...
(parted) q  
  然后重启,再扩展挂载该文件系统即可:
  sudo reboot
  sudo resize2fs /dev/mmcblk0p2
  就可以查看到freespace 变为13G左右。
2.开启交换分区
  lemaker 文档中这样描述:经验证, LeMaker Guitar 1GB 内存在编译 ROS 过程中存在内存不足, 编译报错退出的现象, 故
需要开启 Swap 分区, 缓解内存压力。这里开启 1GB 的 Swap 交换分区:  sudo dd if=/dev/zero of=/var/swap bs=1M count=1024
sudo mkswap /var/swap
sudo    swapon /var/swap  
另外,还需要在系统引导时自动启用新建的 Swap 交换分区, 修改文件/etc/fstab 即可:  

sudo nano /etc/fstab
...
/var/swap swap swap defaults 0 0 #新增本行
3.sudo reboot ,防止分区建立出错
建立和编译ros的常用步骤:
  1.参考ros.org 使用trusty源,
  2.参考http://www.cnros.org/forum.php?m ... =273&extra=page%3D2
  利用这篇文档并不能把ros建立成功,存在若干错误,主要如下:   one:
    捕获.PNG
   用的是wheezy源,backport并不能建立起来,
   two:
   捕获1.PNG
此处为cmake .
而且一般编译不成功
   three:
   rosdep install --from-paths src --ignore-src --rosdistro indigo -y -r --os=debian:wheezy
   这一步骤在此处的操作下并不能安装所有编译所需的依赖项
   four:接下来编译不了catkin工作目录是理所当然的
建立和编译ros的成功实践方案:
  1.参考ros.org
http://wiki.ros.org/indigo/Installation/Source
http://wiki.ros.org/indigo/Installation/UbuntuARM
利用source安装方式,不过源sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

$(lsb_release -sc)改为trusty,
即:sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty 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 install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
$ sudo rosdep init$ rosdep update
$ mkdir ~/ros_catkin_ws$ cd ~/ros_catkin_ws$ rosinstall_generator ros_comm --rosdistro indigo --deps --wet-only --tar > indigo-ros_comm-wet.rosinstall$ wstool init -j8 src indigo-ros_comm-wet.rosinstall$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release至此编译工作完成:
然后添加:
$ source ~/ros_catkin_ws/install_isolated/setup.bash 2.参照lemaker文档:(推荐):
步骤同第一种方式,但
$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
改为
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /usr/share/ros/indigo
解释如下:  
    捕获2.PNG

xiajinyi
ferragamo belt
ferragamo shoes
asics shoes
michael kors outlet
nike outlet factory
coach outlet

jordan shoes
christian louboutin
mlb jerseys
nike shoes
off white outlet
longchamp outlet
moncler jackets
fitflops clearance
coach outlet
adidas clothing
kate spade outlet
moncler outlet
moncler jackets
canada goose outlet
fitflops clearance
coach factory outlet
christian louboutin
clarks outlet
issey miyake

tory burch outlet
adidas outlet
adidas clothing
canada goose outlet
coach factory outlet
christian louboutin outlet
ray ban sunglasses
ugg boots
jordans
nike clothing
louboutin shoes
christian louboutin outlet
ralph lauren polo
valentino shoes
ugg outlet
yeezy boots 350
prada handbags
clarks shoes
adidas yeezy
canadian goose
ugg outlet
soccer shoes
louboutin shoes
jordan uk
canada goose
bottega veneta
christian louboutin outlet
canada goose outlet
north face
ray ban sunglasses
jordan clothing
ugg outlet clearance
dsquared2
moncler outlet
coach outlet
longchamp
red bottom shoes
canada goose outlet
lacoste polo
jordan shoes
birken stock
longchamp outlet
ray ban sunglasses
salomon shoes
jordan shoes
ralph lauren
canada goose
christian louboutin shoes
coach handbags
coach outlet
canada goose jackets
coach outlet
supreme clothing
ecco shoes
coach outlet
louboutin shoes
adidas shoes
pandora charms
jordans
nike shoes outlet
christian louboutin shoes
louboutin shoes
canada goose outlet
nike air max
hermes belt
nike blazers
reebok outlet
nike tn
coach factory outlet
pandora jewelry
moncler outlet
red bottom shoes
canada goose outlet

您需要登录后才可以回帖 登录 | 注册

本版积分规则