$ export ROS_VER_NAME=indigo
$ export OS_VER_NAME=trusty
#如果要生成deb安装包,需要按照顺序操作
$ sudo apt-get install python-bloom
#编译并安装基础核心模块
#-----------------------catkin-------------------------------
$ cd ~/ros_catkin_ws/src/catkin/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
#需要安装,后续的模块编译依赖前面编译的模块
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-catkin*.deb
#部分Python模块依赖我们刚刚编译的模块,把路径加入,否在后续模块编译会报错
$ export PYTHONPATH=$PYTHONPATH:/opt/ros/indigo/lib/python2.7/dist-packages
#-----------------------genmsg-------------------------------
$ cd ~/ros_catkin_ws/src/genmsg/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-genmsg*.deb
#-----------------------genpy-------------------------------
$ cd ~/ros_catkin_ws/src/genpy/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-genpy*.deb
#-----------------------gencpp-------------------------------
$ cd ~/ros_catkin_ws/src/gencpp/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-gencpp*.deb
#-----------------------genlisp-------------------------------
$ cd ~/ros_catkin_ws/src/genlisp/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-genlisp*.deb
#-----------------------message_generation-------------------------------
$ cd ~/ros_catkin_ws/src/message_generation/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-message-generation*.deb
#-----------------------message_runtime-------------------------------
$ cd ~/ros_catkin_ws/src/message_runtime/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-message-runtime*.deb
........................................................................
#-----------------------std_msgs-------------------------------
$ cd ~/ros_catkin_ws/src/std_msgs/
$ bloom-generate rosdebian --os-name ubuntu --os-version $OS_VER_NAME --ros-distro $ROS_VER_NAME
$ fakeroot debian/rules binary
$ sudo dpkg -i ~/ros_catkin_ws/src/ros-$ROS_VER_NAME-std-msgs*.deb