ros robot operating system installation

The ubuntu version is ubuntu12.04


1 Open the terminal ( ctrl+alt+t ), install the software library

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

illustrate:

ubuntu12.10 needs to change precise to quantal in the above  command 

ubuntu13.04 needs to change precise to raring in the above command

ubuntu14.04 needs to change precise to trusty in the above command

Correspondence between Ubuntu version and ros version

  ROS version Corresponding to Ubutnu version  
2016.3

ROS Kinetic Kame

Ubuntu 16.04 (Xenial) / Ubuntu 15.10 (Wily)  
2015.3

ROS Jade Turtle

Ubuntu 15.04 (Wily) / Ubuntu LTS 14.04 (Trusty)  
2014.7

ROS Indigo Igloo

Ubuntu 14.04 (Trusty)  
2013.9

ROS Hydro Medusa

Ubuntu 12.04 LTS (Precise)  
2012.12

ROS Groovy Galapagos

Ubuntu 12.04 (Precise)   

Installing the software library is to let the system know where to download the program and install the software automatically according to the command.


2 Set the key to make sure the code comes from an authorized website and has not been modified

wget http://packages.ros.org/ros.key -O - | sudo apt-key add -  

3 Upgrade the software to ensure the latest software library and software to avoid problems

sudo apt-get update  

4 Install the software

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

Similarly, as in the first step, different Ubuntu system versions correspond to different ros software. My system is 12.04 so the installation is hydro. Note that different systems need to install the corresponding ros version, otherwise it may not be available.

The full version installed here has all the features and requires the most hard disk space. Specifically installed ROS, rpt toolbox, rviz visualization environment, general robot library, 2D (such as stage) and 3D (such as gazebo) simulation environment, navigation function package set (movement, positioning, mapping, robotic arm control), and other Perception libraries such as vision, lidar and RGBD cameras (depth cameras).


5 Install and initialize rosdep

sudo rosdep init  
rosdep update

6 Configure the environment

At this point, it means that ros has been installed correctly. At this point, some configuration needs to be done to let the system know the location of the executable bin file and other instructions

source /opt/ros/hydro/setup.bash  

This is temporary and needs to be executed every time a new terminal is opened. Very inconvenient.


The following are permanent, i.e. write the instructions into the .bashrc script file.

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


7 Install a very useful command tool rosinstall

sudo apt-get install python-rosinstall  


At this point, the installation of the ROS system has been completed.



Open 2 terminals and execute the following 2 commands respectively

roscore
rosrun turtlesim turtlesim_node

When running roscore, the following error is reported:
[~]$ roscore
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 257, in main
    write_pid_file(options.pid_fn, options.core, options.port)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 110, in write_pid_file
    with open(pid_fn, "w") as f:
IOError: [Errno 13] Permission denied: '/home/dmgy/.ros/roscore-11311.pid'
Solution: Refer to https://blog.csdn.net/turtlebot007/article/details/76047231
Replace sudo rosdep init with sudo rosdep fix-permissions
Do not add sudo before rosdep update
can be solved.

you can see this screen
 
 










Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325890757&siteId=291194637