catkin doesn't create test executable
I'm trying to create subscriber for PR2 kinect, but I'm stuck with the most basic thing. I expected to compile this test package and begin with functionality implementation. But catkin_make doesn't build any executable for this package. my package structure:
./package.xml
./CMakeLists.txt
./src
./src/test.cpp
./include
./include/test
./include/test/test.hpp
CMakeLists:
cmake_minimum_required(VERSION 2.8.3)
project(test)
find_package(catkin REQUIRED COMPONENTS
pcl_ros
roscpp
sensor_msgs
std_msgs
)
catkin_package(
INCLUDE_DIRS include
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_executable(test src/test.cpp)
test.cpp:
#include <test/test.hpp>
void processPoint::processCloud( const sensor_msgs::PointCloud2ConstPtr& cloud )
{
}
int main(int argc, char **argv)
{
init(argc, argv, "test");
//ros::NodeHandle n;
processPoint processPoint;
ros::spin();
return 0;
}
test.hpp:
#include <ros/ros.h>
#include <pcl_ros/point_cloud.h>
#include <sensor_msgs/PointCloud2.h>
using namespace ros;
using namespace sensor_msgs;
class processPoint {
NodeHandle nh;
Subscriber sub;
public:
processPoint() {
sub = nh.subscribe<sensor_msgs::PointCloud2>("/head_mount_kinect/depth/points", 1, &processPoint::processCloud, this);
}
~processPoint() {
}
void processCloud( const sensor_msgs::PointCloud2ConstPtr& cloud );
};
And finally catkin_make result:
Base path: /home/ros-user/catkin_ws
Source space: /home/ros-user/catkin_ws/src
Build space: /home/ros-user/catkin_ws/build
Devel space: /home/ros-user/catkin_ws/devel
Install space: /home/ros-user/catkin_ws/install
####
#### Running command: "cmake /home/ros-user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/ros-user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/ros-user/catkin_ws/install" in "/home/ros-user/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ros-user/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/ros-user/catkin_ws/devel;/opt/ros/hydro
-- This workspace overlays: /home/ros-user/catkin_ws/devel;/opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ros-user/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.89
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - test
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'test'
-- ==> add_subdirectory(test)
-- Using these message generators: gencpp;genlisp;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ros-user/catkin_ws/build
####
#### Running command: "make -j4 -l4" in "/home/ros-user/catkin_ws/build"
####
I think that after Running command: "make -j4 -l4"
should follow compilation of executable test defined by add_executable(test src/test.cpp)
but nothing happens. I had no problems with compiling tutorials so I have no idea why this package doesn't work.