Ubuntu16 amd64安装
- Set sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- Set keys
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- Installation
sudo apt update
sudo apt install ros-kinetic-desktop-full
- Initialize rosdep
sudo rosdep init
rosdep update
- Environment setup
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
echo >> 命令,采用双>符号,若采用>则清空.bashrc文件中之前内容。
- Dependeccies
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
树莓派安装
- Setup Repositories
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- Install Bootstrap Dependencies(Raspbian Jessie)
sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
- Initializing rosdep
sudo rosdep init
rosdep update
- Create a workspace
mkdir -[ ~/ros_catkin_ws
cd ~/ros_catkin_ws
rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall
wstool init src kinetic-ros-comm-wet.rosinstall
- Dependecncies
mkdir -p ~/ros_catkin_ws/external_src
cd ~/ros_catkin_ws/external_src
wget http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1_no_test_models.zip/download -O assimp-3.1.1_no_test_models.zip
unzip assimp-3.1.1_no_test_models.zip
cd assimp-3.1.1
cmake .
make
sudo make install
cd ~/ros_catkin_ws
rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --os=debian:jessie
- Building workspace
sudo ./src/catkin/bin/catkin_make_isolated --install -DMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
- Add released packages
cd ~/ros_catkin_ws
rosinstall_generator ros_comm ros_control joystick_drivers --rosdistro kinetic --deps --wet-only --tar > kinetic-custom_ros.rosinstall
update workspace with wstool
wstool merge -t src kinetic-custom_ros.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y -r --os=debian:jessie
rebuild
sudo ./src/catkin/bin/catkin_make_isolated --install -DMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic