Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

compiling files

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included cannot be found. For instance,

#include <ros/ros.h>
#include <ros/package.h>

Am I supposed to include these under different names?

compiling files

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included cannot be found. For instance,included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

compiling files

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>
click to hide/show revision 4
No.4 Revision

compiling filesUnable to find ros/ros.h header files when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

Unable to find ros/ros.h header files when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

Unable to find ros/ros.h header files files, such as ros/ros.h, when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

Unable to find header files, such as ros/ros.h, when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

If I try to use rosmake to build the package, this is output:

robot@neutronstar:~/SkeletonTracking/skeletonTracker$ rosmake
[ rosmake ] No package specified.  Building ['skeletonTracker']                 
[ rosmake ] Packages requested are: ['skeletonTracker']                         
[ rosmake ] Logging to directory/home/robot/.ros/rosmake/rosmake_output-20110713-134607
[ rosmake ] Expanded args ['skeletonTracker'] to:
['skeletonTracker']           
[ rosmake ] Checking rosdeps compliance for packages skeletonTracker.  This may take a few seconds.
[ rosmake ] rosdep check passed all system dependencies in packages             
[rosmake-0] Starting >>> roslib [ make ]                                        
[rosmake-0] Finished <<< roslib ROS_NOBUILD in package roslib                   
[rosmake-1] Starting >>> rosgraph_msgs [ make ]                                 
[rosmake-1] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs     
[rosmake-2] Starting >>> rosbuild [ make ]                                      
[rosmake-2] Finished <<< rosbuild ROS_NOBUILD in package rosbuild
 No Makefile in package rosbuild
[rosmake-3] Starting >>> cpp_common [ make ]                                    
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-1] Starting >>> roslang [ make ]                                       
[rosmake-3] Finished <<< cpp_common ROS_NOBUILD in package cpp_common           
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs               
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
 No Makefile in package roslang
[rosmake-2] Starting >>> xmlrpcpp [ make ]                                      
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-1] Starting >>> rostime [ make ]                                       
[rosmake-2] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp               
[rosmake-3] Starting >>> rospy [ make ]                                         
[rosmake-1] Finished <<< rostime ROS_NOBUILD in package rostime                 
[rosmake-3] Finished <<< rospy ROS_NOBUILD in package rospy                     
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits     
[rosmake-1] Starting >>> roscpp_serialization [ make ]                          
[rosmake-3] Starting >>> rosconsole [ make ]                                    
[rosmake-3] Finished <<< rosconsole ROS_NOBUILD in package rosconsole           
[rosmake-1] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
[rosmake-1] Starting >>> roscpp [ make ]                                        
[rosmake-1] Finished <<< roscpp ROS_NOBUILD in package roscpp                   
[rosmake-1] Starting >>> skeletonTracker [ make ]                               
[ rosmake ] Last 40 lineseletonTracker: 2.8 sec ]    [ 1 Active 14/15 Complete ]
{-------------------------------------------------------------------------------
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [100%] Building CXX object CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:4:38: error: tf/transform_broadcaster.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:5:35: error: tf/transform_listener.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:6:25: error: tf/frames.hpp: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:7:22: error: XnOpenNI.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:8:24: error: XnCodecIDs.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:9:26: error: XnCppWrapper.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp: In function ‘int main(int, char**)’:
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:13: error: ‘ros_init’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: ‘Node’ is not a member of ‘ros’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: expected ‘;’ before ‘Handle’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: expected ‘;’ before ‘listener’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:17: error: ‘node’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: expected ‘;’ before ‘transform’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:20: error: ‘listener’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:21: error: expected ‘;’ before ‘}’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected type-specifier before ‘tf’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘)’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘{’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: ‘::TransformException’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘;’ before ‘ex’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  make[3]: *** [CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o] Error 1
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[2]: *** [CMakeFiles/SkeletonTracker.dir/all] Error 2
  make[2]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package skeletonTracker written to:
[ rosmake ]    /home/robot/.ros/rosmake/rosmake_output-20110713-134607/skeletonTracker/build_output.log
[rosmake-1] Finished <<< skeletonTracker [FAIL] [ 2.87 seconds ]                
[ rosmake ] Halting due to failure in package skeletonTracker. 
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:                                                            
[ rosmake ] Built 15 packages with 1 failures.                                  
[ rosmake ] Summary output to directory                                         
[ rosmake ] /home/robot/.ros/rosmake/rosmake_output-20110713-134607

Unable to find header files, such as ros/ros.h, files when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

If I try to use rosmake to build the package, this is output:

robot@neutronstar:~/SkeletonTracking/skeletonTracker$ rosmake
[ rosmake ] No package specified.  Building ['skeletonTracker']                 
[ rosmake ] Packages requested are: ['skeletonTracker']                         
[ rosmake ] Logging to directory/home/robot/.ros/rosmake/rosmake_output-20110713-134607
[ rosmake ] Expanded args ['skeletonTracker'] to:
['skeletonTracker']           
[ rosmake ] Checking rosdeps compliance for packages skeletonTracker.  This may take a few seconds.
[ rosmake ] rosdep check passed all system dependencies in packages             
[rosmake-0] Starting >>> roslib [ make ]                                        
[rosmake-0] Finished <<< roslib ROS_NOBUILD in package roslib                   
[rosmake-1] Starting >>> rosgraph_msgs [ make ]                                 
[rosmake-1] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs     
[rosmake-2] Starting >>> rosbuild [ make ]                                      
[rosmake-2] Finished <<< rosbuild ROS_NOBUILD in package rosbuild
 No Makefile in package rosbuild
[rosmake-3] Starting >>> cpp_common [ make ]                                    
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-1] Starting >>> roslang [ make ]                                       
[rosmake-3] Finished <<< cpp_common ROS_NOBUILD in package cpp_common           
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs               
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
 No Makefile in package roslang
[rosmake-2] Starting >>> xmlrpcpp [ make ]                                      
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-1] Starting >>> rostime [ make ]                                       
[rosmake-2] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp               
[rosmake-3] Starting >>> rospy [ make ]                                         
[rosmake-1] Finished <<< rostime ROS_NOBUILD in package rostime                 
[rosmake-3] Finished <<< rospy ROS_NOBUILD in package rospy                     
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits     
[rosmake-1] Starting >>> roscpp_serialization [ make ]                          
[rosmake-3] Starting >>> rosconsole [ make ]                                    
[rosmake-3] Finished <<< rosconsole ROS_NOBUILD in package rosconsole           
[rosmake-1] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
[rosmake-1] Starting >>> roscpp [ make ]                                        
[rosmake-1] Finished <<< roscpp ROS_NOBUILD in package roscpp                   
[rosmake-1] Starting >>> skeletonTracker [ make ]                               
[ rosmake ] Last 40 lineseletonTracker: 2.8 sec ]    [ 1 Active 14/15 Complete ]
{-------------------------------------------------------------------------------
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [100%] Building CXX object CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:4:38: error: tf/transform_broadcaster.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:5:35: error: tf/transform_listener.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:6:25: error: tf/frames.hpp: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:7:22: error: XnOpenNI.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:8:24: error: XnCodecIDs.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:9:26: error: XnCppWrapper.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp: In function ‘int main(int, char**)’:
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:13: error: ‘ros_init’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: ‘Node’ is not a member of ‘ros’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: expected ‘;’ before ‘Handle’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: expected ‘;’ before ‘listener’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:17: error: ‘node’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: expected ‘;’ before ‘transform’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:20: error: ‘listener’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:21: error: expected ‘;’ before ‘}’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected type-specifier before ‘tf’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘)’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘{’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: ‘::TransformException’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘;’ before ‘ex’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  make[3]: *** [CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o] Error 1
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[2]: *** [CMakeFiles/SkeletonTracker.dir/all] Error 2
  make[2]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package skeletonTracker written to:
[ rosmake ]    /home/robot/.ros/rosmake/rosmake_output-20110713-134607/skeletonTracker/build_output.log
[rosmake-1] Finished <<< skeletonTracker [FAIL] [ 2.87 seconds ]                
[ rosmake ] Halting due to failure in package skeletonTracker. 
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:                                                            
[ rosmake ] Built 15 packages with 1 failures.                                  
[ rosmake ] Summary output to directory                                         
[ rosmake ] /home/robot/.ros/rosmake/rosmake_output-20110713-134607

Unable to find header files when compiing

I am writing a node, and I am trying to use the ROS and tf tutorials to help me. When I try to compile the .cpp file, the files that I have included, such as

#include <ros/ros.h>
#include <ros/package.h>

cannot be found. Am I supposed to include these under different names?

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(SkeletonTracker src/SkeletonTracker.cpp)

This is my manifest.xml:

<package>
  <description brief="skeletonTracker">

     skeletonTracker

  </description>
  <author>robot</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/skeletonTracker</url>
  <depend package="std_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

</package>

If I try to use rosmake to build the package, this is output:

robot@neutronstar:~/SkeletonTracking/skeletonTracker$ rosmake
[ rosmake ] No package specified.  Building ['skeletonTracker']                 
[ rosmake ] Packages requested are: ['skeletonTracker']                         
[ rosmake ] Logging to directory/home/robot/.ros/rosmake/rosmake_output-20110713-134607
[ rosmake ] Expanded args ['skeletonTracker'] to:
['skeletonTracker']           
[ rosmake ] Checking rosdeps compliance for packages skeletonTracker.  This may take a few seconds.
[ rosmake ] rosdep check passed all system dependencies in packages             
[rosmake-0] Starting >>> roslib [ make ]                                        
[rosmake-0] Finished <<< roslib ROS_NOBUILD in package roslib                   
[rosmake-1] Starting >>> rosgraph_msgs [ make ]                                 
[rosmake-1] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs     
[rosmake-2] Starting >>> rosbuild [ make ]                                      
[rosmake-2] Finished <<< rosbuild ROS_NOBUILD in package rosbuild
 No Makefile in package rosbuild
[rosmake-3] Starting >>> cpp_common [ make ]                                    
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-1] Starting >>> roslang [ make ]                                       
[rosmake-3] Finished <<< cpp_common ROS_NOBUILD in package cpp_common           
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs               
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
 No Makefile in package roslang
[rosmake-2] Starting >>> xmlrpcpp [ make ]                                      
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-1] Starting >>> rostime [ make ]                                       
[rosmake-2] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp               
[rosmake-3] Starting >>> rospy [ make ]                                         
[rosmake-1] Finished <<< rostime ROS_NOBUILD in package rostime                 
[rosmake-3] Finished <<< rospy ROS_NOBUILD in package rospy                     
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits     
[rosmake-1] Starting >>> roscpp_serialization [ make ]                          
[rosmake-3] Starting >>> rosconsole [ make ]                                    
[rosmake-3] Finished <<< rosconsole ROS_NOBUILD in package rosconsole           
[rosmake-1] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
[rosmake-1] Starting >>> roscpp [ make ]                                        
[rosmake-1] Finished <<< roscpp ROS_NOBUILD in package roscpp                   
[rosmake-1] Starting >>> skeletonTracker [ make ]                               
[ rosmake ] Last 40 lineseletonTracker: 2.8 sec ]    [ 1 Active 14/15 Complete ]
{-------------------------------------------------------------------------------
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[3]: Entering directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  [100%] Building CXX object CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:4:38: error: tf/transform_broadcaster.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:5:35: error: tf/transform_listener.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:6:25: error: tf/frames.hpp: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:7:22: error: XnOpenNI.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:8:24: error: XnCodecIDs.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:9:26: error: XnCppWrapper.h: No such file or directory
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp: In function ‘int main(int, char**)’:
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:13: error: ‘ros_init’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: ‘Node’ is not a member of ‘ros’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:14: error: expected ‘;’ before ‘Handle’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:15: error: expected ‘;’ before ‘listener’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:17: error: ‘node’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: ‘tf’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:18: error: expected ‘;’ before ‘transform’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:20: error: ‘listener’ was not declared in this scope
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:21: error: expected ‘;’ before ‘}’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected type-specifier before ‘tf’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘)’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘{’ before ‘::’ token
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: ‘::TransformException’ has not been declared
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:22: error: expected ‘;’ before ‘ex’
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  /home/robot/SkeletonTracking/skeletonTracker/src/SkeletonTracker.cpp:29: error: expected ‘}’ at end of input
  make[3]: *** [CMakeFiles/SkeletonTracker.dir/src/SkeletonTracker.o] Error 1
  make[3]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[2]: *** [CMakeFiles/SkeletonTracker.dir/all] Error 2
  make[2]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/robot/SkeletonTracking/skeletonTracker/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package skeletonTracker written to:
[ rosmake ]    /home/robot/.ros/rosmake/rosmake_output-20110713-134607/skeletonTracker/build_output.log
[rosmake-1] Finished <<< skeletonTracker [FAIL] [ 2.87 seconds ]                
[ rosmake ] Halting due to failure in package skeletonTracker. 
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:                                                            
[ rosmake ] Built 15 packages with 1 failures.                                  
[ rosmake ] Summary output to directory                                         
[ rosmake ] /home/robot/.ros/rosmake/rosmake_output-20110713-134607