cd ~/catkin_ws/src
#FORMAT
catkin_create_pkg <package_name> [depend1] [depend2] […]
#EXAMPLE
catkin_create_pkg MySigintHandler roscpp rospy std_msg
cd ~/catkin_ws
catkin_make
. ~/catkin_ws/devel/setup.bash
It will automatically create the package.xml and CMakeList.txt with the content it needs.
Package.xml
<package format="2">
...
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msg</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msg</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msg</exec_depend>
...
</package>
CMakeList.txt
cmake_minimum_required(VERSION 2.8.3)
project(MySigintHandler)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msg
)
...