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

answered 2016-05-26 16:40:01 -0600

joq gravatar image

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2 and a metapackage.

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2 subpackage_2) and a metapackage.

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2) and a metapackage.

EDIT: If you like, the base class can go in its own package_base at the same level. Then, ``subpackage_1 and 2 would both depend on that.

There is no way to know what CMakeLists.txt changes would be required without you editing the original question to add their current contents.

But, the ROS catkin documentation contains plenty of examples for how to do things like that:

  • Tutorials: http://wiki.ros.org/catkin/Tutorials
  • How-to: http://docs.ros.org/api/catkin/html/howto/format2/index.html

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2) and a metapackage.

EDIT: If you like, the base class can go in its own package_base ROS package at the same level. Then, ``subpackage_1 and 2 would both depend on that.

There is no way to know what CMakeLists.txt changes would be required without you editing the original question to add their current contents.

But, the ROS catkin documentation contains plenty of examples for how to do things like that:

  • Tutorials: http://wiki.ros.org/catkin/Tutorials
  • How-to: http://docs.ros.org/api/catkin/html/howto/format2/index.html

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2) and a metapackage.

EDIT: If you like, the base class can go in its own ROS package at the same level. Then, ``subpackage_1 and 2 subpackage_1 and subpackage_2 would both depend on that.

There is no way to know what CMakeLists.txt changes would be required without you editing the original question to add their current contents.

But, the ROS catkin documentation contains plenty of examples for how to do things like that:

  • Tutorials: http://wiki.ros.org/catkin/Tutorials
  • How-to: http://docs.ros.org/api/catkin/html/howto/format2/index.html

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2) and a metapackage.

EDIT: If you like, the base class can go in its own ROS package at the same level. Then, subpackage_1 and subpackage_2 would both depend on that.

There is no way to know what CMakeLists.txt changes would be required without you editing the original question to add their current contents.

But, the ROS catkin documentation contains plenty of examples for how to do things like that:

  • Tutorials: http://wiki.ros.org/catkin/Tutorials
  • How-to: http://docs.ros.org/api/catkin/html/howto/format2/index.html

Another alternative would be to include everything in a single ROS package. Depending on the structure of your project that might be easier.

  • See: http://answers.ros.org/question/9133/packages-vs-nodes/#13164

ROS does not have a concept of "subpackage" like you seem to describe.

Perhaps the ROS equivalent would be to eliminate the src/package directory and promote each of its contained directories to that level:

 catkin_workspace/src/
                      subpackage_1/src/subpackage_1.cpp
                      subpackage_2/src/subpackage_2.cpp
                      package (Metapackage)

That gives you two ROS packages (subpackage_1 and subpackage_2) and a metapackage.

EDIT: If you like, the base class can go in its own ROS package at the same level. Then, subpackage_1 and subpackage_2 would both depend on that.

There is no way to know what CMakeLists.txt changes would be required without you editing the original question to add their current contents.

But, the ROS catkin documentation contains plenty of examples for how to do things like that:

  • Tutorials: http://wiki.ros.org/catkin/Tutorials
  • How-to: http://docs.ros.org/api/catkin/html/howto/format2/index.html

Another alternative would be to include collect everything in into a single ROS package. Depending on the structure of your project that might be easier.

  • See: http://answers.ros.org/question/9133/packages-vs-nodes/#13164