当前位置:网站首页>Installation series of ROS system (I): installation steps

Installation series of ROS system (I): installation steps

2022-06-12 08:12:00 Here comes the classmate

1、 To configure Ubuntu Software and updates for

To configure Ubuntu Software and updates for , Allow installation of non certified software . open “ Software and updates ” Dialog box , The details can be found in Ubuntu Search... In the search button .
 Insert picture description here

After opening, configure according to the following figure .
 Insert picture description here

2、 Set installation source

Due to the domestic wall and other reasons , Tsinghua University is recommended 、 China University of science and technology and other domestic resources , Faster installation .

Official default installation source :

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

Tsinghua University installation source :

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

Installation source of University of science and technology of China :

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

3、 Add key

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

4、 Update source list

sudo apt-get update

5、 install ROS Kinetic Full version

sudo apt-get install ros-kinetic-desktop-full

6、 initialization rosdep

sudo rosdep init
rosdep update

7、 Configure environment variables

For convenience, it can be used in any terminal ROS, Configure the following environment variables .

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

8、 Install dependencies

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

9、 verification ROS Is the installation successful

(1) First open the terminal Termial( Shortcut key :Ctrl + Alt + T), Enter the following command , Start a node manager :

roscore

As shown in the figure below , Indicates that the opening is successful .
 Insert picture description here
(2) Open a terminal again (Termial), Enter the following command , Pop up a little turtle window :

rosrun turtlesim turtlesim_node

 Insert picture description here
 Insert picture description here
(3) Open a terminal (Termial), Enter the following command

rosrun turtlesim turtle_teleop_key

 Insert picture description here
Use the direction keys on the keyboard to control the movement of the little turtle , As shown in the figure below
 Insert picture description here
(4) Reopen a Termial, Enter the following command , You can further view ROS Node details :

rosrun rqt_graph rqt_graph

thus , Little Turtle program can be used normally , Express ROS Successfully installed .

原网站

版权声明
本文为[Here comes the classmate]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010551083192.html