ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You should change a litlle bit your layout to have things working (and respect ROS standards), organize your files like that first :

catkin_ws/
  src/
    sphero_imu_reader/
      src/
        topic_reader.cpp
      include/
        topic_reader.h
    sphero_crash_server/
      src/
        server.cpp
     include/
        server.h

Now for your both CMakeLists.txt, just add this inside catkin_package() function :

INCLUDE_DIRS include

Now in server.h you can add this line and use the class ImuTopicReader inside the class CrashServer :

#include "sphero_imu_reader/topic_reader.h"

Note : You might have cpp issues when calling the constructor but your first error should be gone.

You should change a litlle bit your layout to have things working (and respect ROS standards), organize your files like that first :

catkin_ws/
  src/
    sphero_imu_reader/
      src/
        topic_reader.cpp
      include/
        sphero_imu_reader/
          topic_reader.h
    sphero_crash_server/
      src/
        server.cpp
      include/
        sphero_crash_server/
          server.h

Now for your both CMakeLists.txt, just add this inside catkin_package() function :

INCLUDE_DIRS include

Now in server.h you can add this line and use the class ImuTopicReader inside the class CrashServer :

#include "sphero_imu_reader/topic_reader.h"

Note : You might have cpp issues when calling the constructor but your first error should be gone.