sudo apt install curl # if you haven't already installed curl curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
B3:Cài đặt :
sudo apt-get update
Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
sudo apt-get install ros-kinetic-desktop-full
Desktop Install: ROS, rqt, rviz, and robot-generic libraries
sudo apt-get install ros-kinetic-desktop
or click here
ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
sudo apt-get install ros-kinetic-ros-base
or click here
Individual Package: You can also install a specific ROS package (replace underscores with dashes of the package name):
sudo apt-get install ros-kinetic-PACKAGE
e.g.sudo apt-get install ros-kinetic-slam-gmapping
To find available packages, use:
apt-cache search ros-kinetic
Bước tiếp theo cài đặt môi trường
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
If you have more than one ROS distribution installed, must only source the for the version you are currently using.
If you just want to change the environment of your current shell, instead of the above you can type:
source /opt/ros/kinetic/setup.bash
If you use zsh instead of bash you need to run the following commands to set up your shell:
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc source ~/.zshrc
Dependencies for building packages
Up to now you have installed what you need to run the core ROS packages. To create and manage your own ROS workspaces, there are various tools and requirements that are distributed separately. For example, rosinstall is a frequently used command-line tool that enables you to easily download many source trees for ROS packages with one command.
To install this tool and other dependencies for building ROS packages, run:
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
Initialize rosdep
Before you can use many ROS tools, you will need to initialize . enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS. If you have not yet installed , do so as follows.
sudo apt install python-rosdep
With the following, you can initialize .
sudo rosdep init rosdep update
Để chạy Thử chúng ta thử chạy :roscore
Trên 1 Terminal
Sau đó chúng ta chạy turtlesim
rosrun turtlesim turtlesim_node
Nếu cài đặt thành công sẽ hiển thị như sau: