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

bonbonbaron's profile - activity

2017-05-30 04:04:50 -0500 received badge  Famous Question (source)
2016-09-13 08:35:11 -0500 received badge  Popular Question (source)
2016-09-13 08:35:11 -0500 received badge  Notable Question (source)
2016-06-15 00:06:16 -0500 asked a question Learning ROS Book: Chapter 2 is missing header file

In "Learning ROS for Robotics Programming," Edition 1, Chapter 2, section "Using the new srv and msg files.":

I copied all the code into my chapter2_tutorials/src directory, and I did everything else they mentioned. Then when I run, it tells me that the header file in the include-directives of both example2_a.cpp and example2_b.cpp is not found. This is true: it does not exist. Below is what it looks like in the code:

#include "chapter2_tutorials/chapter2_srv1.h"

... and this is what I get when I run "rosmake chapter2_tutorials":

  Building CXX object CMakeFiles/example2_b.dir/src/example2_b.cpp.o
  /home/viki/dev/rosbook/chapter2_tutorials/src/example2_a.cpp:2:46: fatal error: chapter2_tutorials/chapter2_srv1.h: No such file or directory
   #include "chapter2_tutorials/chapter2_srv1.h"
                                                                     ^
  compilation terminated.
  /home/viki/dev/rosbook/chapter2_tutorials/src/example2_b.cpp:2:46: fatal error: chapter2_tutorials/chapter2_srv1.h: No such file or directory
   #include "chapter2_tutorials/chapter2_srv1.h"
                                                                 ^

Is there something I'm forgetting? The book doesn't tell me anywhere how to make the header file or what I should put in it. I feel like I'm missing something obvious. Please help! Thanks in advance!