Ros setup in the ubuntu18.04

Thanks for the wiki website:ROS wiki

First :Ros version introduce

Kinetic and Melodic

In the first: Kinetic version is published in the 2016 with the ubuntu 16.04
and this version the offical worker said that they will shutdown support this version in the 2021
By the way the Ubuntu 18.04 has always published and Melodic is pubulished in the 2018 they will support help the version update and fix the bug in the next 5years
So i choose the Melodic
Melodic just like the Kinetic

Second: Ros setting

  1. First you should set the third part software setting : choose the best server for you internet ,I choose the aliyun.com
  2. Then you should use this command Setup your sources.list in the terminal:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  1. Set up your keys
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  1. Installation : this command list will cost your few minutes plz waitting for a moment
sudo apt update
sudo apt install ros-melodic-desktop-full

May be you will find the command can’t download the version you set plz use this command in the terminal to find out which version is available for your env.

apt search ros-melodic
  1. Then you can use the Enviroment setting :(this command change the global the env in your PC)
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

this command can set the env temporary just use in the current shell:

source /opt/ros/melodic/setup.bash
  1. Dependencies for building packages
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

Then you will need to init the rosdep:

sudo apt install python-rosdep
sudo rosdep init
rosdep update

Warning: May be you will find out the you cann’t init the rosdep

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list

you should change the download hosts:
use the command :

sudo vim /etc/hosts

add the line 151.101.84.133 raw.githubusercontent.com in the end .Then go on .

sudo apt-get update
sudo rosdep init
rosdep update

Third: Ros

Every one knows in the Ros test command,and know the turtle maybe you should three terminal that you can :
Terminal1:

roscore

Terminal2:

rosrun turtlesim turtlesim_node

Terminal3:

rosrun turtlesim turtle_teleop_key

Then you can use arrow key to move the little turtle.
In the end you ros is OK.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值