1.终端命令(不解释,指令含义没啥大用)
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-indigo-desktop-full
sudo rosdep init
rosdep update
sudo apt-get install python-rosinstall
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
roscore@H_403_36@
如果最后一条命令正确执行,则表示安装成功。
2.可能出现的问题
1.sudo rosdep init提示
“
ERROR: cannot download default sources list from:
https://raw.github.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.”
方法1:sudo -E rosdep init
方法2:在/etc/environment中加入(注意改成自己的信息)
http_proxy=http://[user:password@]proxy_server:port/
https_proxy=https://[user:password@]proxy_server:port/@H_403_36@
方法3:在home下新建20-default.list文件,将写入下列内容并保存。
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy,Hydro,...) must not be listed anymore,they are being fetched from the rosdistro index.yaml instead@H_403_36@
然后
cd /etc
sudo mkdir -p ros/rosdep/sources.list.d
sudo cp ~/20-default.list /etc/ros/rosdep/sources.list.d@H_403_36@
再执行rosdep update
2.roscore提示Unable to contact my own server at …
export ROS_MASTER_URI=http://ip:11311
export ROS_HOSTNAME=ip@H_403_36@
改成
export ROS_MASTER_URI=http://laptop_name:11311
export ROS_HOSTNAME=laptop_name@H_403_36@