Namspace (.h) between packages
Folks,
I created a my_gr_namespace.(h/cpp) in Package_1. The namespace works well for every single node running under Package_1. Now, I am trying to use it in another package (Package_2), but it won't work. I have constants in that name space, and when I print them in Package_2 I get an empty printing. I included the name space this way:
/// Package_2 file: my_package_2.h
#include <Package_1/my_gr_namespace.h> // written in this format even inside Package_1 nodes
/// prints an empty output, like "My Constant: (empty space)"
std::cout << "My Constant: " << gr::CONSTANT << "\n\n";
And the output is empty.
In my Package_1 CMakeList I made sure to include the following items to export the name space across ROS:
catkin_package() # where I put Package_2 include folder, and libraries created
# I tried making the namespace files into a library, and then putting them in catkin_package()
add_library()
install(DIRECTORY ) # to mark the namspace cpp and headers for installation
And, of course, I copied the files directly into Package_2 and did:
/// copying files inside Package_2 did not work either!!!!!!! What the deuce!?
#include <Package_2/my_gr_namespace.h>
I'm not sure what is happening