版本lunar, 系统版本debian 9.8
参考: http://wiki.ros.org/lunar/Installation/Source
1. Installing bootstrap dependencies
$ sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
2. Initializing rosdep
$ sudo rosdep init $ rosdep update
$ mkdir ~/ros_catkin_ws $ cd ~/ros_catkin_ws
2.1 Desktop-Full Install: ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
$ rosinstall_generator desktop_full --rosdistro lunar --deps --tar > lunar-desktop-full.rosinstall $ wstool init -j8 src lunar-desktop-full.rosinstall
2.2 Desktop Install (recommended): ROS, rqt, rviz, and robot-generic libraries
$ rosinstall_generator desktop --rosdistro lunar --deps --tar > lunar-desktop.rosinstall $ wstool init -j8 src lunar-desktop.rosinsta
2.3 ROS-Comm: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
$ rosinstall_generator ros_comm --rosdistro lunar --deps --tar > lunar-ros_comm.rosinstall $ wstool init -j8 src lunar-ros_comm.rosinstall
PS: If wstool init fails or is interrupted, you can resume the download by running:
3. Resolving Dependencies
$ rosdep install --from-paths src --ignore-src --rosdistro lunar -y
4. 编译 Building the catkin Workspace
$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
默认安装在:
~/ros_catkin_ws/install_isolated
如果想改变安装路径:
--install-space /opt/ros/lunar
5.
$ source ~/ros_catkin_ws/install_isolated/setup.bash