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

What I usually do: cpp files are in src folder, h files in include/my_package folder

eg. for files:

src/main.cpp
src/my_class.cpp
include/my_package/my_class.h

CMakeLists.txt will then use:

rosbuild_add_executable(binary_name src/main.cpp src/my_class.cpp)

But there are many ways to achieve the same. You can look at how other packages are structured and choose the one that you like. OR you can look at REP122 to see how the file system hierarchy is done for ROS packages